diffact 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +2 -0
- package/dist/index-node-OJ3iJPYj.mjs +1 -0
- package/dist/src-CFIPD_RU.mjs +1 -0
- package/dist/src-D1IC9k-b.mjs +73 -0
- package/package.json +9 -9
- package/web/dist/assets/{code-block-37QAKDTI-C97XC0lL.js → code-block-37QAKDTI-D73VmzOZ.js} +1 -1
- package/web/dist/assets/index-DIRXMKEj.js +1463 -0
- package/web/dist/assets/index-lMgdATtC.css +1 -0
- package/web/dist/index.html +2 -2
- package/dist/agent-manager.d.ts +0 -32
- package/dist/agent-manager.js +0 -502
- package/dist/app-server-client.d.ts +0 -38
- package/dist/app-server-client.js +0 -249
- package/dist/capabilities.d.ts +0 -2
- package/dist/capabilities.js +0 -27
- package/dist/cli.d.ts +0 -6
- package/dist/cli.js +0 -13
- package/dist/command-runner.d.ts +0 -83
- package/dist/command-runner.js +0 -427
- package/dist/editors.d.ts +0 -26
- package/dist/editors.js +0 -144
- package/dist/gh.d.ts +0 -61
- package/dist/gh.js +0 -185
- package/dist/git.d.ts +0 -57
- package/dist/git.js +0 -482
- package/dist/http.d.ts +0 -7
- package/dist/http.js +0 -98
- package/dist/index-node.d.ts +0 -5
- package/dist/index-node.js +0 -51
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -1011
- package/dist/list-directories.d.ts +0 -8
- package/dist/list-directories.js +0 -32
- package/dist/log.d.ts +0 -2
- package/dist/log.js +0 -2
- package/dist/open-browser.d.ts +0 -5
- package/dist/open-browser.js +0 -23
- package/dist/project-commands.d.ts +0 -17
- package/dist/project-commands.js +0 -152
- package/dist/project-path.d.ts +0 -5
- package/dist/project-path.js +0 -33
- package/dist/runtime.d.ts +0 -65
- package/dist/runtime.js +0 -235
- package/dist/static.d.ts +0 -10
- package/dist/static.js +0 -127
- package/dist/types.d.ts +0 -17
- package/dist/types.js +0 -1
- package/dist/utils.d.ts +0 -3
- package/dist/utils.js +0 -26
- package/dist/ws-hub.d.ts +0 -20
- package/dist/ws-hub.js +0 -123
- package/web/dist/assets/index-CRDz04kv.css +0 -1
- package/web/dist/assets/index-DWCfDth4.js +0 -1497
|
@@ -0,0 +1,1463 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function rL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Au(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pm={exports:{}},Ml={};var Yv;function iL(){if(Yv)return Ml;Yv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Ml.Fragment=t,Ml.jsx=n,Ml.jsxs=n,Ml}var Qv;function aL(){return Qv||(Qv=1,pm.exports=iL()),pm.exports}var x=aL(),Ro=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},oL=class{#e=sL;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},za=new oL;function lL(e){setTimeout(e,0)}var Qa=typeof window>"u"||"Deno"in globalThis;function mn(){}function uL(e,t){return typeof e=="function"?e(t):e}function k0(e){return typeof e=="number"&&e>=0&&e!==1/0}function D2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oa(e,t){return typeof e=="function"?e(t):e}function ir(e,t){return typeof e=="function"?e(t):e}function Wv(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Ig(l,t.options))return!1}else if(!pu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||o&&!o(t))}function Xv(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Wa(t.options.mutationKey)!==Wa(o))return!1}else if(!pu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function Ig(e,t){return(t?.queryKeyHashFn||Wa)(e)}function Wa(e){return JSON.stringify(e,(t,n)=>N0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pu(e[n],t[n])):!1}var cL=Object.prototype.hasOwnProperty;function I2(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Kv(e)&&Kv(t);if(!r&&!(N0(e)&&N0(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const m=r?p:l[p],b=e[m],y=t[m];if(b===y){d[m]=b,(r?p<o:cL.call(e,m))&&f++;continue}if(b===null||y===null||typeof b!="object"||typeof y!="object"){d[m]=y;continue}const _=I2(b,y,n+1);d[m]=_,_===b&&f++}return o===c&&f===o?e:d}function Hd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function N0(e){if(!Zv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Zv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function dL(e){return new Promise(t=>{za.setTimeout(t,e)})}function R0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?I2(e,t):t}function fL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function hL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Mg=Symbol();function M2(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Mg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pg(e,t){return typeof e=="function"?e(...t):!!e}function pL(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var mL=class extends Ro{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Qa&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Bg=new mL;function L0(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var gL=lL;function bL(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=gL;const o=c=>{t?e.push(c):a(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&a(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{o(()=>{c(...d)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{a=c}}}var Ut=bL(),yL=class extends Ro{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Qa&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Fd=new yL;function EL(e){return Math.min(1e3*2**e,3e4)}function P2(e){return(e??"online")==="online"?Fd.isOnline():!0}var O0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function B2(e){let t=!1,n=0,r;const a=L0(),o=()=>a.status!=="pending",l=T=>{if(!o()){const A=new O0(T);b(A),e.onCancel?.(A)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>Bg.isFocused()&&(e.networkMode==="always"||Fd.isOnline())&&e.canRun(),p=()=>P2(e.networkMode)&&e.canRun(),m=T=>{o()||(r?.(),a.resolve(T))},b=T=>{o()||(r?.(),a.reject(T))},y=()=>new Promise(T=>{r=A=>{(o()||f())&&T(A)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),_=()=>{if(o())return;let T;const A=n===0?e.initialPromise:void 0;try{T=A??e.fn()}catch(C){T=Promise.reject(C)}Promise.resolve(T).then(m).catch(C=>{if(o())return;const k=e.retry??(Qa?0:3),N=e.retryDelay??EL,L=typeof N=="function"?N(n,C):N,O=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,C);if(t||!O){b(C);return}n++,e.onFail?.(n,C),dL(L).then(()=>f()?void 0:y()).then(()=>{t?b(C):_()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?_():y().then(_),a)}}var j2=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),k0(this.gcTime)&&(this.#e=za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qa?1/0:300*1e3))}clearGcTimeout(){this.#e&&(za.clearTimeout(this.#e),this.#e=void 0)}},vL=class extends j2{#e;#t;#n;#i;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=e_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=e_(this.options);t.data!==void 0&&(this.setState(Jv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=R0(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>oa(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!D2(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},a=()=>{const c=M2(this.options,t),f=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#o=!1,this.options.persister?this.options.persister(c,f,this):c(f)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#s({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=B2({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof O0&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#s({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof O0){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#s({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...H2(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Jv(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ut.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function H2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Jv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function e_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var F2=class extends Ro{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=L0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#a;#o;#s;#f;#l;#c;#u;#h;#d;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),t_(this.#t,this.options)?this.#p():this.updateResult(),this.#E())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return D0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return D0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#_(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ir(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!Hd(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&n_(this.#t,n,this.options,t)&&this.#p(),this.updateResult(),r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||oa(this.options.staleTime,this.#t)!==oa(t.staleTime,this.#t))&&this.#g();const a=this.#b();r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||a!==this.#d)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return xL(this,n)&&(this.#i=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#p(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(mn)),t}#g(){this.#v();const e=oa(this.options.staleTime,this.#t);if(Qa||this.#i.isStale||!k0(e))return;const n=D2(this.#i.dataUpdatedAt,e)+1;this.#u=za.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#_(),this.#d=e,!(Qa||ir(this.options.enabled,this.#t)===!1||!k0(this.#d)||this.#d===0)&&(this.#h=za.setInterval(()=>{(this.options.refetchIntervalInBackground||Bg.isFocused())&&this.#p()},this.#d))}#E(){this.#g(),this.#y(this.#b())}#v(){this.#u&&(za.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#h&&(za.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#i,o=this.#r,l=this.#a,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},m=!1,b;if(t._optimisticResults){const G=this.hasListeners(),Z=!G&&t_(e,t),z=G&&n_(e,n,t,r);(Z||z)&&(p={...p,...H2(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:_,status:T}=p;b=p.data;let A=!1;if(t.placeholderData!==void 0&&b===void 0&&T==="pending"){let G;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(G=a.data,A=!0):G=typeof t.placeholderData=="function"?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,G!==void 0&&(T="success",b=R0(a?.data,G,t),m=!0)}if(t.select&&b!==void 0&&!A)if(a&&b===o?.data&&t.select===this.#f)b=this.#l;else try{this.#f=t.select,b=t.select(b),b=R0(a?.data,b,t),this.#l=b,this.#s=null}catch(G){this.#s=G}this.#s&&(y=this.#s,b=this.#l,_=Date.now(),T="error");const C=p.fetchStatus==="fetching",k=T==="pending",N=T==="error",L=k&&C,O=b!==void 0,V={status:T,fetchStatus:p.fetchStatus,isPending:k,isSuccess:T==="success",isError:N,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!k,isLoadingError:N&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:N&&O,isStale:jg(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ir(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const G=V.data!==void 0,Z=V.status==="error"&&!G,z=he=>{Z?he.reject(V.error):G&&he.resolve(V.data)},re=()=>{const he=this.#o=V.promise=L0();z(he)},W=this.#o;switch(W.status){case"pending":e.queryHash===n.queryHash&&z(W);break;case"fulfilled":(Z||V.data!==W.value)&&re();break;case"rejected":(!Z||V.error!==W.reason)&&re();break}}return V}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#c=this.#t),Hd(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#m.size)return!0;const o=new Set(a??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(l=>{const c=l;return this.#i[c]!==e[c]&&o.has(c)})};this.#T({listeners:n()})}#x(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#E()}#T(e){Ut.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _L(e,t){return ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function t_(e,t){return _L(e,t)||e.state.data!==void 0&&D0(e,t,t.refetchOnMount)}function D0(e,t,n){if(ir(t.enabled,e)!==!1&&oa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&jg(e,t)}return!1}function n_(e,t,n,r){return(e!==t||ir(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&jg(e,n)}function jg(e,t){return ir(t.enabled,e)!==!1&&e.isStaleByTime(oa(t.staleTime,e))}function xL(e,t){return!Hd(e.getCurrentResult(),t)}function Ud(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const m=_=>{pL(_,()=>t.signal,()=>p=!0)},b=M2(t.options,t.fetchOptions),y=async(_,T,A)=>{if(p)return Promise.reject();if(T==null&&_.pages.length)return Promise.resolve(_);const k=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:T,direction:A?"backward":"forward",meta:t.options.meta};return m(P),P})(),N=await b(k),{maxPages:L}=t.options,O=A?hL:fL;return{pages:O(_.pages,N,L),pageParams:O(_.pageParams,T,L)}};if(a&&o.length){const _=a==="backward",T=_?U2:I0,A={pages:o,pageParams:l},C=T(r,A);c=await y(A,C,_)}else{const _=e??o.length;do{const T=d===0?l[0]??r.initialPageParam:I0(r,c);if(d>0&&T==null)break;c=await y(c,T),d++}while(d<_)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function I0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function U2(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function TL(e,t){return t?I0(e,t)!=null:!1}function SL(e,t){return!t||!e.getPreviousPageParam?!1:U2(e,t)!=null}var CL=class extends F2{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Ud()})}getOptimisticResult(e){return e.behavior=Ud(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,r=super.createResult(e,t),{isFetching:a,isRefetching:o,isError:l,isRefetchError:c}=r,d=n.fetchMeta?.fetchMore?.direction,f=l&&d==="forward",p=a&&d==="forward",m=l&&d==="backward",b=a&&d==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:TL(t,n.data),hasPreviousPage:SL(t,n.data),isFetchNextPageError:f,isFetchingNextPage:p,isFetchPreviousPageError:m,isFetchingPreviousPage:b,isRefetchError:c&&!f&&!m,isRefetching:o&&!p&&!b}}},wL=class extends j2{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||z2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=B2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#r({type:"failed",failureCount:o,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:a})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ut.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function z2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var AL=class extends Ro{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new wL({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=rd(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=rd(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=rd(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=rd(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ut.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Xv(t,n))}findAll(e={}){return this.getAll().filter(t=>Xv(e,t))}notify(e){Ut.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ut.batch(()=>Promise.all(e.map(t=>t.continue().catch(mn))))}};function rd(e){return e.options.scope?.id}var kL=class extends Ro{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Hd(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Wa(n.mutationKey)!==Wa(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??z2();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){Ut.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,r,a)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,n,r,a)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,a)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,n,r,a)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#t)})})}},NL=class extends Ro{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??Ig(r,t);let o=this.get(a);return o||(o=new vL({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Wv(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Wv(e,n)):t}notify(e){Ut.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},RL=class{#e;#t;#n;#i;#r;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new NL,this.#t=e.mutationCache||new AL,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Bg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Fd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(oa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,l=uL(t,o);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ut.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ut.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ut.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ut.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(mn).catch(mn)}invalidateQueries(e,t={}){return Ut.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ut.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(mn)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(mn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(oa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mn).catch(mn)}fetchInfiniteQuery(e){return e.behavior=Ud(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mn).catch(mn)}ensureInfiniteQueryData(e){return e.behavior=Ud(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Wa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{pu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Wa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{pu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ig(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Mg&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},mm={exports:{}},Oe={};var r_;function LL(){if(r_)return Oe;r_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y($){return $===null||typeof $!="object"?null:($=b&&$[b]||$["@@iterator"],typeof $=="function"?$:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function C($,ae,D){this.props=$,this.context=ae,this.refs=A,this.updater=D||_}C.prototype.isReactComponent={},C.prototype.setState=function($,ae){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,ae,"setState")},C.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function k(){}k.prototype=C.prototype;function N($,ae,D){this.props=$,this.context=ae,this.refs=A,this.updater=D||_}var L=N.prototype=new k;L.constructor=N,T(L,C.prototype),L.isPureReactComponent=!0;var O=Array.isArray;function P(){}var V={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function Z($,ae,D){var fe=D.ref;return{$$typeof:e,type:$,key:ae,ref:fe!==void 0?fe:null,props:D}}function z($,ae){return Z($.type,ae,$.props)}function re($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function W($){var ae={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(D){return ae[D]})}var he=/\/+/g;function ue($,ae){return typeof $=="object"&&$!==null&&$.key!=null?W(""+$.key):ae.toString(36)}function se($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(P,P):($.status="pending",$.then(function(ae){$.status==="pending"&&($.status="fulfilled",$.value=ae)},function(ae){$.status==="pending"&&($.status="rejected",$.reason=ae)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function B($,ae,D,fe,we){var Se=typeof $;(Se==="undefined"||Se==="boolean")&&($=null);var ve=!1;if($===null)ve=!0;else switch(Se){case"bigint":case"string":case"number":ve=!0;break;case"object":switch($.$$typeof){case e:case t:ve=!0;break;case p:return ve=$._init,B(ve($._payload),ae,D,fe,we)}}if(ve)return we=we($),ve=fe===""?"."+ue($,0):fe,O(we)?(D="",ve!=null&&(D=ve.replace(he,"$&/")+"/"),B(we,ae,D,"",function(yt){return yt})):we!=null&&(re(we)&&(we=z(we,D+(we.key==null||$&&$.key===we.key?"":(""+we.key).replace(he,"$&/")+"/")+ve)),ae.push(we)),1;ve=0;var je=fe===""?".":fe+":";if(O($))for(var ze=0;ze<$.length;ze++)fe=$[ze],Se=je+ue(fe,ze),ve+=B(fe,ae,D,Se,we);else if(ze=y($),typeof ze=="function")for($=ze.call($),ze=0;!(fe=$.next()).done;)fe=fe.value,Se=je+ue(fe,ze++),ve+=B(fe,ae,D,Se,we);else if(Se==="object"){if(typeof $.then=="function")return B(se($),ae,D,fe,we);throw ae=String($),Error("Objects are not valid as a React child (found: "+(ae==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":ae)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Q($,ae,D){if($==null)return $;var fe=[],we=0;return B($,fe,"","",function(Se){return ae.call(D,Se,we++)}),fe}function X($){if($._status===-1){var ae=$._result;ae=ae(),ae.then(function(D){($._status===0||$._status===-1)&&($._status=1,$._result=D)},function(D){($._status===0||$._status===-1)&&($._status=2,$._result=D)}),$._status===-1&&($._status=0,$._result=ae)}if($._status===1)return $._result.default;throw $._result}var Ee=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ae=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(ae))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},H={map:Q,forEach:function($,ae,D){Q($,function(){ae.apply(this,arguments)},D)},count:function($){var ae=0;return Q($,function(){ae++}),ae},toArray:function($){return Q($,function(ae){return ae})||[]},only:function($){if(!re($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Oe.Activity=m,Oe.Children=H,Oe.Component=C,Oe.Fragment=n,Oe.Profiler=a,Oe.PureComponent=N,Oe.StrictMode=r,Oe.Suspense=d,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Oe.__COMPILER_RUNTIME={__proto__:null,c:function($){return V.H.useMemoCache($)}},Oe.cache=function($){return function(){return $.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function($,ae,D){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var fe=T({},$.props),we=$.key;if(ae!=null)for(Se in ae.key!==void 0&&(we=""+ae.key),ae)!G.call(ae,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&ae.ref===void 0||(fe[Se]=ae[Se]);var Se=arguments.length-2;if(Se===1)fe.children=D;else if(1<Se){for(var ve=Array(Se),je=0;je<Se;je++)ve[je]=arguments[je+2];fe.children=ve}return Z($.type,we,fe)},Oe.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:o,_context:$},$},Oe.createElement=function($,ae,D){var fe,we={},Se=null;if(ae!=null)for(fe in ae.key!==void 0&&(Se=""+ae.key),ae)G.call(ae,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(we[fe]=ae[fe]);var ve=arguments.length-2;if(ve===1)we.children=D;else if(1<ve){for(var je=Array(ve),ze=0;ze<ve;ze++)je[ze]=arguments[ze+2];we.children=je}if($&&$.defaultProps)for(fe in ve=$.defaultProps,ve)we[fe]===void 0&&(we[fe]=ve[fe]);return Z($,Se,we)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function($){return{$$typeof:c,render:$}},Oe.isValidElement=re,Oe.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:X}},Oe.memo=function($,ae){return{$$typeof:f,type:$,compare:ae===void 0?null:ae}},Oe.startTransition=function($){var ae=V.T,D={};V.T=D;try{var fe=$(),we=V.S;we!==null&&we(D,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(P,Ee)}catch(Se){Ee(Se)}finally{ae!==null&&D.types!==null&&(ae.types=D.types),V.T=ae}},Oe.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Oe.use=function($){return V.H.use($)},Oe.useActionState=function($,ae,D){return V.H.useActionState($,ae,D)},Oe.useCallback=function($,ae){return V.H.useCallback($,ae)},Oe.useContext=function($){return V.H.useContext($)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function($,ae){return V.H.useDeferredValue($,ae)},Oe.useEffect=function($,ae){return V.H.useEffect($,ae)},Oe.useEffectEvent=function($){return V.H.useEffectEvent($)},Oe.useId=function(){return V.H.useId()},Oe.useImperativeHandle=function($,ae,D){return V.H.useImperativeHandle($,ae,D)},Oe.useInsertionEffect=function($,ae){return V.H.useInsertionEffect($,ae)},Oe.useLayoutEffect=function($,ae){return V.H.useLayoutEffect($,ae)},Oe.useMemo=function($,ae){return V.H.useMemo($,ae)},Oe.useOptimistic=function($,ae){return V.H.useOptimistic($,ae)},Oe.useReducer=function($,ae,D){return V.H.useReducer($,ae,D)},Oe.useRef=function($){return V.H.useRef($)},Oe.useState=function($){return V.H.useState($)},Oe.useSyncExternalStore=function($,ae,D){return V.H.useSyncExternalStore($,ae,D)},Oe.useTransition=function(){return V.H.useTransition()},Oe.version="19.2.4",Oe}var i_;function Hg(){return i_||(i_=1,mm.exports=LL()),mm.exports}var w=Hg();const ho=Au(w),$2=rL({__proto__:null,default:ho},[w]);var V2=w.createContext(void 0),Fg=e=>{const t=w.useContext(V2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},OL=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(V2.Provider,{value:e,children:t})),q2=w.createContext(!1),DL=()=>w.useContext(q2);q2.Provider;function IL(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ML=w.createContext(IL()),PL=()=>w.useContext(ML),BL=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Pg(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},jL=e=>{w.useEffect(()=>{e.clearReset()},[e])},HL=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||Pg(n,[e.error,r])),FL=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},UL=(e,t)=>e.isLoading&&e.isFetching&&!t,zL=(e,t)=>e?.suspense&&t.isPending,a_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function G2(e,t,n){const r=DL(),a=PL(),o=Fg(),l=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",FL(l),BL(l,a,c),jL(a);const d=!o.getQueryCache().get(l.queryHash),[f]=w.useState(()=>new t(o,l)),p=f.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(b=>{const y=m?f.subscribe(Ut.batchCalls(b)):mn;return f.updateResult(),y},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),w.useEffect(()=>{f.setOptions(l)},[l,f]),zL(l,p))throw a_(l,f,a);if(HL({result:p,errorResetBoundary:a,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Qa&&UL(p,r)&&(d?a_(l,f,a):c?.promise)?.catch(mn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function gn(e,t){return G2(e,F2)}function zd(e,t){const n=Fg(),[r]=w.useState(()=>new kL(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const a=w.useSyncExternalStore(w.useCallback(l=>r.subscribe(Ut.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=w.useCallback((l,c)=>{r.mutate(l,c).catch(mn)},[r]);if(a.error&&Pg(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}function Tf(e,t){return G2(e,CL)}var gm={exports:{}},Pl={},bm={exports:{}},ym={};var s_;function $L(){return s_||(s_=1,(function(e){function t(B,Q){var X=B.length;B.push(Q);e:for(;0<X;){var Ee=X-1>>>1,H=B[Ee];if(0<a(H,Q))B[Ee]=Q,B[X]=H,X=Ee;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],X=B.pop();if(X!==Q){B[0]=X;e:for(var Ee=0,H=B.length,$=H>>>1;Ee<$;){var ae=2*(Ee+1)-1,D=B[ae],fe=ae+1,we=B[fe];if(0>a(D,X))fe<H&&0>a(we,D)?(B[Ee]=we,B[fe]=X,Ee=fe):(B[Ee]=D,B[ae]=X,Ee=ae);else if(fe<H&&0>a(we,X))B[Ee]=we,B[fe]=X,Ee=fe;else break e}}return Q}function a(B,Q){var X=B.sortIndex-Q.sortIndex;return X!==0?X:B.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,m=null,b=3,y=!1,_=!1,T=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var Q=n(f);Q!==null;){if(Q.callback===null)r(f);else if(Q.startTime<=B)r(f),Q.sortIndex=Q.expirationTime,t(d,Q);else break;Q=n(f)}}function O(B){if(T=!1,L(B),!_)if(n(d)!==null)_=!0,P||(P=!0,W());else{var Q=n(f);Q!==null&&se(O,Q.startTime-B)}}var P=!1,V=-1,G=5,Z=-1;function z(){return A?!0:!(e.unstable_now()-Z<G)}function re(){if(A=!1,P){var B=e.unstable_now();Z=B;var Q=!0;try{e:{_=!1,T&&(T=!1,k(V),V=-1),y=!0;var X=b;try{t:{for(L(B),m=n(d);m!==null&&!(m.expirationTime>B&&z());){var Ee=m.callback;if(typeof Ee=="function"){m.callback=null,b=m.priorityLevel;var H=Ee(m.expirationTime<=B);if(B=e.unstable_now(),typeof H=="function"){m.callback=H,L(B),Q=!0;break t}m===n(d)&&r(d),L(B)}else r(d);m=n(d)}if(m!==null)Q=!0;else{var $=n(f);$!==null&&se(O,$.startTime-B),Q=!1}}break e}finally{m=null,b=X,y=!1}Q=void 0}}finally{Q?W():P=!1}}}var W;if(typeof N=="function")W=function(){N(re)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ue=he.port2;he.port1.onmessage=re,W=function(){ue.postMessage(null)}}else W=function(){C(re,0)};function se(B,Q){V=C(function(){B(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var X=b;b=Q;try{return B()}finally{b=X}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var X=b;b=B;try{return Q()}finally{b=X}},e.unstable_scheduleCallback=function(B,Q,X){var Ee=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?Ee+X:Ee):X=Ee,B){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=X+H,B={id:p++,callback:Q,priorityLevel:B,startTime:X,expirationTime:H,sortIndex:-1},X>Ee?(B.sortIndex=X,t(f,B),n(d)===null&&B===n(f)&&(T?(k(V),V=-1):T=!0,se(O,X-Ee))):(B.sortIndex=H,t(d,B),_||y||(_=!0,P||(P=!0,W()))),B},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(B){var Q=b;return function(){var X=b;b=Q;try{return B.apply(this,arguments)}finally{b=X}}}})(ym)),ym}var o_;function VL(){return o_||(o_=1,bm.exports=$L()),bm.exports}var Em={exports:{}},sn={};var l_;function qL(){if(l_)return sn;l_=1;var e=Hg();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,f,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,sn.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,p)},sn.flushSync=function(d){var f=l.T,p=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=p,r.d.f()}},sn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},sn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},sn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):p==="script"&&r.d.X(d,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},sn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},sn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin);r.d.L(d,p,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},sn.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},sn.requestFormReset=function(d){r.d.r(d)},sn.unstable_batchedUpdates=function(d,f){return d(f)},sn.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},sn.useFormStatus=function(){return l.H.useHostTransitionStatus()},sn.version="19.2.4",sn}var u_;function Y2(){if(u_)return Em.exports;u_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Em.exports=qL(),Em.exports}var c_;function GL(){if(c_)return Pl;c_=1;var e=VL(),t=Hg(),n=Y2();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(r(188))}function f(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var u=i,h=s;;){var g=u.return;if(g===null)break;var E=g.alternate;if(E===null){if(h=g.return,h!==null){u=h;continue}break}if(g.child===E.child){for(E=g.child;E;){if(E===u)return d(g),i;if(E===h)return d(g),s;E=E.sibling}throw Error(r(188))}if(u.return!==h.return)u=g,h=E;else{for(var S=!1,R=g.child;R;){if(R===u){S=!0,u=g,h=E;break}if(R===h){S=!0,h=g,u=E;break}R=R.sibling}if(!S){for(R=E.child;R;){if(R===u){S=!0,u=E,h=g;break}if(R===h){S=!0,h=E,u=g;break}R=R.sibling}if(!S)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:s}function p(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=p(i),s!==null)return s;i=i.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=re&&i[re]||i["@@iterator"],typeof i=="function"?i:null)}var he=Symbol.for("react.client.reference");function ue(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===he?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case T:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList";case Z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case _:return"Portal";case N:return i.displayName||"Context";case k:return(i._context.displayName||"Context")+".Consumer";case L:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case V:return s=i.displayName||null,s!==null?s:ue(i.type)||"Memo";case G:s=i._payload,i=i._init;try{return ue(i(s))}catch{}}return null}var se=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},Ee=[],H=-1;function $(i){return{current:i}}function ae(i){0>H||(i.current=Ee[H],Ee[H]=null,H--)}function D(i,s){H++,Ee[H]=i.current,i.current=s}var fe=$(null),we=$(null),Se=$(null),ve=$(null);function je(i,s){switch(D(Se,s),D(we,i),D(fe,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?gv(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=gv(s),i=bv(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}ae(fe),D(fe,i)}function ze(){ae(fe),ae(we),ae(Se)}function yt(i){i.memoizedState!==null&&D(ve,i);var s=fe.current,u=bv(s,i.type);s!==u&&(D(we,i),D(fe,u))}function Xt(i){we.current===i&&(ae(fe),ae(we)),ve.current===i&&(ae(ve),Ll._currentValue=X)}var fn,dr;function Gn(i){if(fn===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);fn=s&&s[1]||"",dr=-1<u.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+fn+i+dr}var Ci=!1;function Vr(i,s){if(!i||Ci)return"";Ci=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ne){var te=ne}Reflect.construct(i,[],de)}else{try{de.call()}catch(ne){te=ne}i.call(de.prototype)}}else{try{throw Error()}catch(ne){te=ne}(de=i())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=h.DetermineComponentFrameRoot(),S=E[0],R=E[1];if(S&&R){var U=S.split(`
|
|
5
|
+
`),ee=R.split(`
|
|
6
|
+
`);for(g=h=0;h<U.length&&!U[h].includes("DetermineComponentFrameRoot");)h++;for(;g<ee.length&&!ee[g].includes("DetermineComponentFrameRoot");)g++;if(h===U.length||g===ee.length)for(h=U.length-1,g=ee.length-1;1<=h&&0<=g&&U[h]!==ee[g];)g--;for(;1<=h&&0<=g;h--,g--)if(U[h]!==ee[g]){if(h!==1||g!==1)do if(h--,g--,0>g||U[h]!==ee[g]){var oe=`
|
|
7
|
+
`+U[h].replace(" at new "," at ");return i.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",i.displayName)),oe}while(1<=h&&0<=g);break}}}finally{Ci=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Gn(u):""}function hn(i,s){switch(i.tag){case 26:case 27:case 5:return Gn(i.type);case 16:return Gn("Lazy");case 13:return i.child!==s&&s!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return Vr(i.type,!1);case 11:return Vr(i.type.render,!1);case 1:return Vr(i.type,!0);case 31:return Gn("Activity");default:return""}}function Kt(i){try{var s="",u=null;do s+=hn(i,u),u=i,i=i.return;while(i);return s}catch(h){return`
|
|
8
|
+
Error generating stack: `+h.message+`
|
|
9
|
+
`+h.stack}}var Ln=Object.prototype.hasOwnProperty,En=e.unstable_scheduleCallback,vn=e.unstable_cancelCallback,qr=e.unstable_shouldYield,fr=e.unstable_requestPaint,Pt=e.unstable_now,$u=e.unstable_getCurrentPriorityLevel,le=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Ne=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,xt=e.log,hr=e.unstable_setDisableYieldValue,Zt=null,Tt=null;function St(i){if(typeof xt=="function"&&hr(i),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(Zt,i)}catch{}}var rt=Math.clz32?Math.clz32:Vo,Sr=Math.log,On=Math.LN2;function Vo(i){return i>>>=0,i===0?32:31-(Sr(i)/On|0)|0}var us=256,cs=262144,ds=4194304;function Gr(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function fs(i,s,u){var h=i.pendingLanes;if(h===0)return 0;var g=0,E=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var R=h&134217727;return R!==0?(h=R&~E,h!==0?g=Gr(h):(S&=R,S!==0?g=Gr(S):u||(u=R&~i,u!==0&&(g=Gr(u))))):(R=h&~E,R!==0?g=Gr(R):S!==0?g=Gr(S):u||(u=h&~i,u!==0&&(g=Gr(u)))),g===0?0:s!==0&&s!==g&&(s&E)===0&&(E=g&-g,u=s&-s,E>=u||E===32&&(u&4194048)!==0)?s:g}function ya(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function rh(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vu(){var i=ds;return ds<<=1,(ds&62914560)===0&&(ds=4194304),i}function me(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function He(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ct(i,s,u,h,g,E){var S=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var R=i.entanglements,U=i.expirationTimes,ee=i.hiddenUpdates;for(u=S&~u;0<u;){var oe=31-rt(u),de=1<<oe;R[oe]=0,U[oe]=-1;var te=ee[oe];if(te!==null)for(ee[oe]=null,oe=0;oe<te.length;oe++){var ne=te[oe];ne!==null&&(ne.lane&=-536870913)}u&=~de}h!==0&&wi(i,h,0),E!==0&&g===0&&i.tag!==0&&(i.suspendedLanes|=E&~(S&~s))}function wi(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-rt(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|u&261930}function hs(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var h=31-rt(u),g=1<<h;g&s|i[h]&s&&(i[h]|=s),u&=~g}}function ps(i,s){var u=s&-s;return u=(u&42)!==0?1:qo(u),(u&(i.suspendedLanes|s))!==0?0:u}function qo(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ih(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function t1(){var i=Q.p;return i!==0?i:(i=window.event,i===void 0?32:Fv(i.type))}function n1(i,s){var u=Q.p;try{return Q.p=i,s()}finally{Q.p=u}}var Ai=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Ai,_n="__reactProps$"+Ai,ms="__reactContainer$"+Ai,ah="__reactEvents$"+Ai,G3="__reactListeners$"+Ai,Y3="__reactHandles$"+Ai,r1="__reactResources$"+Ai,Go="__reactMarker$"+Ai;function sh(i){delete i[Jt],delete i[_n],delete i[ah],delete i[G3],delete i[Y3]}function gs(i){var s=i[Jt];if(s)return s;for(var u=i.parentNode;u;){if(s=u[ms]||u[Jt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=Sv(i);i!==null;){if(u=i[Jt])return u;i=Sv(i)}return s}i=u,u=i.parentNode}return null}function bs(i){if(i=i[Jt]||i[ms]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Yo(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function ys(i){var s=i[r1];return s||(s=i[r1]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function $t(i){i[Go]=!0}var i1=new Set,a1={};function Ea(i,s){Es(i,s),Es(i+"Capture",s)}function Es(i,s){for(a1[i]=s,i=0;i<s.length;i++)i1.add(s[i])}var Q3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),s1={},o1={};function W3(i){return Ln.call(o1,i)?!0:Ln.call(s1,i)?!1:Q3.test(i)?o1[i]=!0:(s1[i]=!0,!1)}function qu(i,s,u){if(W3(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function Gu(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function Yr(i,s,u,h){if(h===null)i.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+h)}}function Yn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function l1(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function X3(i,s,u){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var g=h.get,E=h.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(S){u=""+S,E.call(this,S)}}),Object.defineProperty(i,s,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(S){u=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function oh(i){if(!i._valueTracker){var s=l1(i)?"checked":"value";i._valueTracker=X3(i,s,""+i[s])}}function u1(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),h="";return i&&(h=l1(i)?i.checked?"true":"false":i.value),i=h,i!==u?(s.setValue(i),!0):!1}function Yu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var K3=/[\n"\\]/g;function Qn(i){return i.replace(K3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lh(i,s,u,h,g,E,S,R){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),s!=null?S==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Yn(s)):i.value!==""+Yn(s)&&(i.value=""+Yn(s)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),s!=null?uh(i,S,Yn(s)):u!=null?uh(i,S,Yn(u)):h!=null&&i.removeAttribute("value"),g==null&&E!=null&&(i.defaultChecked=!!E),g!=null&&(i.checked=g&&typeof g!="function"&&typeof g!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?i.name=""+Yn(R):i.removeAttribute("name")}function c1(i,s,u,h,g,E,S,R){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.type=E),s!=null||u!=null){if(!(E!=="submit"&&E!=="reset"||s!=null)){oh(i);return}u=u!=null?""+Yn(u):"",s=s!=null?""+Yn(s):u,R||s===i.value||(i.value=s),i.defaultValue=s}h=h??g,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=R?i.checked:!!h,i.defaultChecked=!!h,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),oh(i)}function uh(i,s,u){s==="number"&&Yu(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function vs(i,s,u,h){if(i=i.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<i.length;u++)g=s.hasOwnProperty("$"+i[u].value),i[u].selected!==g&&(i[u].selected=g),g&&h&&(i[u].defaultSelected=!0)}else{for(u=""+Yn(u),s=null,g=0;g<i.length;g++){if(i[g].value===u){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function d1(i,s,u){if(s!=null&&(s=""+Yn(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+Yn(u):""}function f1(i,s,u,h){if(s==null){if(h!=null){if(u!=null)throw Error(r(92));if(se(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),s=u}u=Yn(s),i.defaultValue=u,h=i.textContent,h===u&&h!==""&&h!==null&&(i.value=h),oh(i)}function _s(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var Z3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function h1(i,s,u){var h=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":h?i.setProperty(s,u):typeof u!="number"||u===0||Z3.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function p1(i,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var g in s)h=s[g],s.hasOwnProperty(g)&&u[g]!==h&&h1(i,g,h)}else for(var E in s)s.hasOwnProperty(E)&&h1(i,E,s[E])}function ch(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var J3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),eN=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qu(i){return eN.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Qr(){}var dh=null;function fh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xs=null,Ts=null;function m1(i){var s=bs(i);if(s&&(i=s.stateNode)){var u=i[_n]||null;e:switch(i=s.stateNode,s.type){case"input":if(lh(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Qn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var h=u[s];if(h!==i&&h.form===i.form){var g=h[_n]||null;if(!g)throw Error(r(90));lh(h,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)h=u[s],h.form===i.form&&u1(h)}break e;case"textarea":d1(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&vs(i,!!u.multiple,s,!1)}}}var hh=!1;function g1(i,s,u){if(hh)return i(s,u);hh=!0;try{var h=i(s);return h}finally{if(hh=!1,(xs!==null||Ts!==null)&&(Mc(),xs&&(s=xs,i=Ts,Ts=xs=null,m1(s),i)))for(s=0;s<i.length;s++)m1(i[s])}}function Qo(i,s){var u=i.stateNode;if(u===null)return null;var h=u[_n]||null;if(h===null)return null;u=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var Wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ph=!1;if(Wr)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){ph=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{ph=!1}var ki=null,mh=null,Wu=null;function b1(){if(Wu)return Wu;var i,s=mh,u=s.length,h,g="value"in ki?ki.value:ki.textContent,E=g.length;for(i=0;i<u&&s[i]===g[i];i++);var S=u-i;for(h=1;h<=S&&s[u-h]===g[E-h];h++);return Wu=g.slice(i,1<h?1-h:void 0)}function Xu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ku(){return!0}function y1(){return!1}function xn(i){function s(u,h,g,E,S){this._reactName=u,this._targetInst=g,this.type=h,this.nativeEvent=E,this.target=S,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(u=i[R],this[R]=u?u(E):E[R]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Ku:y1,this.isPropagationStopped=y1,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ku)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ku)},persist:function(){},isPersistent:Ku}),s}var va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zu=xn(va),Xo=m({},va,{view:0,detail:0}),tN=xn(Xo),gh,bh,Ko,Ju=m({},Xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ko&&(Ko&&i.type==="mousemove"?(gh=i.screenX-Ko.screenX,bh=i.screenY-Ko.screenY):bh=gh=0,Ko=i),gh)},movementY:function(i){return"movementY"in i?i.movementY:bh}}),E1=xn(Ju),nN=m({},Ju,{dataTransfer:0}),rN=xn(nN),iN=m({},Xo,{relatedTarget:0}),yh=xn(iN),aN=m({},va,{animationName:0,elapsedTime:0,pseudoElement:0}),sN=xn(aN),oN=m({},va,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),lN=xn(oN),uN=m({},va,{data:0}),v1=xn(uN),cN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hN(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=fN[i])?!!s[i]:!1}function Eh(){return hN}var pN=m({},Xo,{key:function(i){if(i.key){var s=cN[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Xu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?dN[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(i){return i.type==="keypress"?Xu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Xu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),mN=xn(pN),gN=m({},Ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_1=xn(gN),bN=m({},Xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),yN=xn(bN),EN=m({},va,{propertyName:0,elapsedTime:0,pseudoElement:0}),vN=xn(EN),_N=m({},Ju,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),xN=xn(_N),TN=m({},va,{newState:0,oldState:0}),SN=xn(TN),CN=[9,13,27,32],vh=Wr&&"CompositionEvent"in window,Zo=null;Wr&&"documentMode"in document&&(Zo=document.documentMode);var wN=Wr&&"TextEvent"in window&&!Zo,x1=Wr&&(!vh||Zo&&8<Zo&&11>=Zo),T1=" ",S1=!1;function C1(i,s){switch(i){case"keyup":return CN.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w1(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ss=!1;function AN(i,s){switch(i){case"compositionend":return w1(s);case"keypress":return s.which!==32?null:(S1=!0,T1);case"textInput":return i=s.data,i===T1&&S1?null:i;default:return null}}function kN(i,s){if(Ss)return i==="compositionend"||!vh&&C1(i,s)?(i=b1(),Wu=mh=ki=null,Ss=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return x1&&s.locale!=="ko"?null:s.data;default:return null}}var NN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function A1(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!NN[i.type]:s==="textarea"}function k1(i,s,u,h){xs?Ts?Ts.push(h):Ts=[h]:xs=h,s=zc(s,"onChange"),0<s.length&&(u=new Zu("onChange","change",null,u,h),i.push({event:u,listeners:s}))}var Jo=null,el=null;function RN(i){cv(i,0)}function ec(i){var s=Yo(i);if(u1(s))return i}function N1(i,s){if(i==="change")return s}var R1=!1;if(Wr){var _h;if(Wr){var xh="oninput"in document;if(!xh){var L1=document.createElement("div");L1.setAttribute("oninput","return;"),xh=typeof L1.oninput=="function"}_h=xh}else _h=!1;R1=_h&&(!document.documentMode||9<document.documentMode)}function O1(){Jo&&(Jo.detachEvent("onpropertychange",D1),el=Jo=null)}function D1(i){if(i.propertyName==="value"&&ec(el)){var s=[];k1(s,el,i,fh(i)),g1(RN,s)}}function LN(i,s,u){i==="focusin"?(O1(),Jo=s,el=u,Jo.attachEvent("onpropertychange",D1)):i==="focusout"&&O1()}function ON(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ec(el)}function DN(i,s){if(i==="click")return ec(s)}function IN(i,s){if(i==="input"||i==="change")return ec(s)}function MN(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Dn=typeof Object.is=="function"?Object.is:MN;function tl(i,s){if(Dn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),h=Object.keys(s);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var g=u[h];if(!Ln.call(s,g)||!Dn(i[g],s[g]))return!1}return!0}function I1(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function M1(i,s){var u=I1(i);i=0;for(var h;u;){if(u.nodeType===3){if(h=i+u.textContent.length,i<=s&&h>=s)return{node:u,offset:s-i};i=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=I1(u)}}function P1(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?P1(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function B1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Yu(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=Yu(i.document)}return s}function Th(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var PN=Wr&&"documentMode"in document&&11>=document.documentMode,Cs=null,Sh=null,nl=null,Ch=!1;function j1(i,s,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ch||Cs==null||Cs!==Yu(h)||(h=Cs,"selectionStart"in h&&Th(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),nl&&tl(nl,h)||(nl=h,h=zc(Sh,"onSelect"),0<h.length&&(s=new Zu("onSelect","select",null,s,u),i.push({event:s,listeners:h}),s.target=Cs)))}function _a(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var ws={animationend:_a("Animation","AnimationEnd"),animationiteration:_a("Animation","AnimationIteration"),animationstart:_a("Animation","AnimationStart"),transitionrun:_a("Transition","TransitionRun"),transitionstart:_a("Transition","TransitionStart"),transitioncancel:_a("Transition","TransitionCancel"),transitionend:_a("Transition","TransitionEnd")},wh={},H1={};Wr&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function xa(i){if(wh[i])return wh[i];if(!ws[i])return i;var s=ws[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in H1)return wh[i]=s[u];return i}var F1=xa("animationend"),U1=xa("animationiteration"),z1=xa("animationstart"),BN=xa("transitionrun"),jN=xa("transitionstart"),HN=xa("transitioncancel"),$1=xa("transitionend"),V1=new Map,Ah="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ah.push("scrollEnd");function pr(i,s){V1.set(i,s),Ea(s,[i])}var tc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Wn=[],As=0,kh=0;function nc(){for(var i=As,s=kh=As=0;s<i;){var u=Wn[s];Wn[s++]=null;var h=Wn[s];Wn[s++]=null;var g=Wn[s];Wn[s++]=null;var E=Wn[s];if(Wn[s++]=null,h!==null&&g!==null){var S=h.pending;S===null?g.next=g:(g.next=S.next,S.next=g),h.pending=g}E!==0&&q1(u,g,E)}}function rc(i,s,u,h){Wn[As++]=i,Wn[As++]=s,Wn[As++]=u,Wn[As++]=h,kh|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Nh(i,s,u,h){return rc(i,s,u,h),ic(i)}function Ta(i,s){return rc(i,null,null,s),ic(i)}function q1(i,s,u){i.lanes|=u;var h=i.alternate;h!==null&&(h.lanes|=u);for(var g=!1,E=i.return;E!==null;)E.childLanes|=u,h=E.alternate,h!==null&&(h.childLanes|=u),E.tag===22&&(i=E.stateNode,i===null||i._visibility&1||(g=!0)),i=E,E=E.return;return i.tag===3?(E=i.stateNode,g&&s!==null&&(g=31-rt(u),i=E.hiddenUpdates,h=i[g],h===null?i[g]=[s]:h.push(s),s.lane=u|536870912),E):null}function ic(i){if(50<Sl)throw Sl=0,jp=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var ks={};function FN(i,s,u,h){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(i,s,u,h){return new FN(i,s,u,h)}function Rh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Xr(i,s){var u=i.alternate;return u===null?(u=In(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function G1(i,s){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function ac(i,s,u,h,g,E){var S=0;if(h=i,typeof i=="function")Rh(i)&&(S=1);else if(typeof i=="string")S=qR(i,u,fe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case Z:return i=In(31,u,s,g),i.elementType=Z,i.lanes=E,i;case T:return Sa(u.children,g,E,s);case A:S=8,g|=24;break;case C:return i=In(12,u,s,g|2),i.elementType=C,i.lanes=E,i;case O:return i=In(13,u,s,g),i.elementType=O,i.lanes=E,i;case P:return i=In(19,u,s,g),i.elementType=P,i.lanes=E,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case N:S=10;break e;case k:S=9;break e;case L:S=11;break e;case V:S=14;break e;case G:S=16,h=null;break e}S=29,u=Error(r(130,i===null?"null":typeof i,"")),h=null}return s=In(S,u,s,g),s.elementType=i,s.type=h,s.lanes=E,s}function Sa(i,s,u,h){return i=In(7,i,h,s),i.lanes=u,i}function Lh(i,s,u){return i=In(6,i,null,s),i.lanes=u,i}function Y1(i){var s=In(18,null,null,0);return s.stateNode=i,s}function Oh(i,s,u){return s=In(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var Q1=new WeakMap;function Xn(i,s){if(typeof i=="object"&&i!==null){var u=Q1.get(i);return u!==void 0?u:(s={value:i,source:s,stack:Kt(s)},Q1.set(i,s),s)}return{value:i,source:s,stack:Kt(s)}}var Ns=[],Rs=0,sc=null,rl=0,Kn=[],Zn=0,Ni=null,Cr=1,wr="";function Kr(i,s){Ns[Rs++]=rl,Ns[Rs++]=sc,sc=i,rl=s}function W1(i,s,u){Kn[Zn++]=Cr,Kn[Zn++]=wr,Kn[Zn++]=Ni,Ni=i;var h=Cr;i=wr;var g=32-rt(h)-1;h&=~(1<<g),u+=1;var E=32-rt(s)+g;if(30<E){var S=g-g%5;E=(h&(1<<S)-1).toString(32),h>>=S,g-=S,Cr=1<<32-rt(s)+g|u<<g|h,wr=E+i}else Cr=1<<E|u<<g|h,wr=i}function Dh(i){i.return!==null&&(Kr(i,1),W1(i,1,0))}function Ih(i){for(;i===sc;)sc=Ns[--Rs],Ns[Rs]=null,rl=Ns[--Rs],Ns[Rs]=null;for(;i===Ni;)Ni=Kn[--Zn],Kn[Zn]=null,wr=Kn[--Zn],Kn[Zn]=null,Cr=Kn[--Zn],Kn[Zn]=null}function X1(i,s){Kn[Zn++]=Cr,Kn[Zn++]=wr,Kn[Zn++]=Ni,Cr=s.id,wr=s.overflow,Ni=i}var en=null,ht=null,Qe=!1,Ri=null,Jn=!1,Mh=Error(r(519));function Li(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw il(Xn(s,i)),Mh}function K1(i){var s=i.stateNode,u=i.type,h=i.memoizedProps;switch(s[Jt]=i,s[_n]=h,u){case"dialog":Ve("cancel",s),Ve("close",s);break;case"iframe":case"object":case"embed":Ve("load",s);break;case"video":case"audio":for(u=0;u<wl.length;u++)Ve(wl[u],s);break;case"source":Ve("error",s);break;case"img":case"image":case"link":Ve("error",s),Ve("load",s);break;case"details":Ve("toggle",s);break;case"input":Ve("invalid",s),c1(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Ve("invalid",s);break;case"textarea":Ve("invalid",s),f1(s,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||h.suppressHydrationWarning===!0||pv(s.textContent,u)?(h.popover!=null&&(Ve("beforetoggle",s),Ve("toggle",s)),h.onScroll!=null&&Ve("scroll",s),h.onScrollEnd!=null&&Ve("scrollend",s),h.onClick!=null&&(s.onclick=Qr),s=!0):s=!1,s||Li(i,!0)}function Z1(i){for(en=i.return;en;)switch(en.tag){case 5:case 31:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:en=en.return}}function Ls(i){if(i!==en)return!1;if(!Qe)return Z1(i),Qe=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Jp(i.type,i.memoizedProps)),u=!u),u&&ht&&Li(i),Z1(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));ht=Tv(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));ht=Tv(i)}else s===27?(s=ht,qi(i.type)?(i=im,im=null,ht=i):ht=s):ht=en?tr(i.stateNode.nextSibling):null;return!0}function Ca(){ht=en=null,Qe=!1}function Ph(){var i=Ri;return i!==null&&(wn===null?wn=i:wn.push.apply(wn,i),Ri=null),i}function il(i){Ri===null?Ri=[i]:Ri.push(i)}var Bh=$(null),wa=null,Zr=null;function Oi(i,s,u){D(Bh,s._currentValue),s._currentValue=u}function Jr(i){i._currentValue=Bh.current,ae(Bh)}function jh(i,s,u){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===u)break;i=i.return}}function Hh(i,s,u,h){var g=i.child;for(g!==null&&(g.return=i);g!==null;){var E=g.dependencies;if(E!==null){var S=g.child;E=E.firstContext;e:for(;E!==null;){var R=E;E=g;for(var U=0;U<s.length;U++)if(R.context===s[U]){E.lanes|=u,R=E.alternate,R!==null&&(R.lanes|=u),jh(E.return,u,i),h||(S=null);break e}E=R.next}}else if(g.tag===18){if(S=g.return,S===null)throw Error(r(341));S.lanes|=u,E=S.alternate,E!==null&&(E.lanes|=u),jh(S,u,i),S=null}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===i){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}}function Os(i,s,u,h){i=null;for(var g=s,E=!1;g!==null;){if(!E){if((g.flags&524288)!==0)E=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var S=g.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var R=g.type;Dn(g.pendingProps.value,S.value)||(i!==null?i.push(R):i=[R])}}else if(g===ve.current){if(S=g.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(i!==null?i.push(Ll):i=[Ll])}g=g.return}i!==null&&Hh(s,i,u,h),s.flags|=262144}function oc(i){for(i=i.firstContext;i!==null;){if(!Dn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Aa(i){wa=i,Zr=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function tn(i){return J1(wa,i)}function lc(i,s){return wa===null&&Aa(i),J1(i,s)}function J1(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Zr===null){if(i===null)throw Error(r(308));Zr=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else Zr=Zr.next=s;return u}var UN=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,h){i.push(h)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},zN=e.unstable_scheduleCallback,$N=e.unstable_NormalPriority,Rt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fh(){return{controller:new UN,data:new Map,refCount:0}}function al(i){i.refCount--,i.refCount===0&&zN($N,function(){i.controller.abort()})}var sl=null,Uh=0,Ds=0,Is=null;function VN(i,s){if(sl===null){var u=sl=[];Uh=0,Ds=Vp(),Is={status:"pending",value:void 0,then:function(h){u.push(h)}}}return Uh++,s.then(ey,ey),s}function ey(){if(--Uh===0&&sl!==null){Is!==null&&(Is.status="fulfilled");var i=sl;sl=null,Ds=0,Is=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function qN(i,s){var u=[],h={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return i.then(function(){h.status="fulfilled",h.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(h.status="rejected",h.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),h}var ty=B.S;B.S=function(i,s){jE=Pt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&VN(i,s),ty!==null&&ty(i,s)};var ka=$(null);function zh(){var i=ka.current;return i!==null?i:ct.pooledCache}function uc(i,s){s===null?D(ka,ka.current):D(ka,s.pool)}function ny(){var i=zh();return i===null?null:{parent:Rt._currentValue,pool:i}}var Ms=Error(r(460)),$h=Error(r(474)),cc=Error(r(542)),dc={then:function(){}};function ry(i){return i=i.status,i==="fulfilled"||i==="rejected"}function iy(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(Qr,Qr),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,sy(i),i;default:if(typeof s.status=="string")s.then(Qr,Qr);else{if(i=ct,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(h){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=h}},function(h){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,sy(i),i}throw Ra=s,Ms}}function Na(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ra=u,Ms):u}}var Ra=null;function ay(){if(Ra===null)throw Error(r(459));var i=Ra;return Ra=null,i}function sy(i){if(i===Ms||i===cc)throw Error(r(483))}var Ps=null,ol=0;function fc(i){var s=ol;return ol+=1,Ps===null&&(Ps=[]),iy(Ps,i,s)}function ll(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function hc(i,s){throw s.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function oy(i){function s(Y,q){if(i){var J=Y.deletions;J===null?(Y.deletions=[q],Y.flags|=16):J.push(q)}}function u(Y,q){if(!i)return null;for(;q!==null;)s(Y,q),q=q.sibling;return null}function h(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function g(Y,q){return Y=Xr(Y,q),Y.index=0,Y.sibling=null,Y}function E(Y,q,J){return Y.index=J,i?(J=Y.alternate,J!==null?(J=J.index,J<q?(Y.flags|=67108866,q):J):(Y.flags|=67108866,q)):(Y.flags|=1048576,q)}function S(Y){return i&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,q,J,ce){return q===null||q.tag!==6?(q=Lh(J,Y.mode,ce),q.return=Y,q):(q=g(q,J),q.return=Y,q)}function U(Y,q,J,ce){var Ae=J.type;return Ae===T?oe(Y,q,J.props.children,ce,J.key):q!==null&&(q.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===G&&Na(Ae)===q.type)?(q=g(q,J.props),ll(q,J),q.return=Y,q):(q=ac(J.type,J.key,J.props,null,Y.mode,ce),ll(q,J),q.return=Y,q)}function ee(Y,q,J,ce){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=Oh(J,Y.mode,ce),q.return=Y,q):(q=g(q,J.children||[]),q.return=Y,q)}function oe(Y,q,J,ce,Ae){return q===null||q.tag!==7?(q=Sa(J,Y.mode,ce,Ae),q.return=Y,q):(q=g(q,J),q.return=Y,q)}function de(Y,q,J){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Lh(""+q,Y.mode,J),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case y:return J=ac(q.type,q.key,q.props,null,Y.mode,J),ll(J,q),J.return=Y,J;case _:return q=Oh(q,Y.mode,J),q.return=Y,q;case G:return q=Na(q),de(Y,q,J)}if(se(q)||W(q))return q=Sa(q,Y.mode,J,null),q.return=Y,q;if(typeof q.then=="function")return de(Y,fc(q),J);if(q.$$typeof===N)return de(Y,lc(Y,q),J);hc(Y,q)}return null}function te(Y,q,J,ce){var Ae=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Ae!==null?null:R(Y,q,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return J.key===Ae?U(Y,q,J,ce):null;case _:return J.key===Ae?ee(Y,q,J,ce):null;case G:return J=Na(J),te(Y,q,J,ce)}if(se(J)||W(J))return Ae!==null?null:oe(Y,q,J,ce,null);if(typeof J.then=="function")return te(Y,q,fc(J),ce);if(J.$$typeof===N)return te(Y,q,lc(Y,J),ce);hc(Y,J)}return null}function ne(Y,q,J,ce,Ae){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Y=Y.get(J)||null,R(q,Y,""+ce,Ae);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return Y=Y.get(ce.key===null?J:ce.key)||null,U(q,Y,ce,Ae);case _:return Y=Y.get(ce.key===null?J:ce.key)||null,ee(q,Y,ce,Ae);case G:return ce=Na(ce),ne(Y,q,J,ce,Ae)}if(se(ce)||W(ce))return Y=Y.get(J)||null,oe(q,Y,ce,Ae,null);if(typeof ce.then=="function")return ne(Y,q,J,fc(ce),Ae);if(ce.$$typeof===N)return ne(Y,q,J,lc(q,ce),Ae);hc(q,ce)}return null}function _e(Y,q,J,ce){for(var Ae=null,Ze=null,Ce=q,Pe=q=0,Ye=null;Ce!==null&&Pe<J.length;Pe++){Ce.index>Pe?(Ye=Ce,Ce=null):Ye=Ce.sibling;var Je=te(Y,Ce,J[Pe],ce);if(Je===null){Ce===null&&(Ce=Ye);break}i&&Ce&&Je.alternate===null&&s(Y,Ce),q=E(Je,q,Pe),Ze===null?Ae=Je:Ze.sibling=Je,Ze=Je,Ce=Ye}if(Pe===J.length)return u(Y,Ce),Qe&&Kr(Y,Pe),Ae;if(Ce===null){for(;Pe<J.length;Pe++)Ce=de(Y,J[Pe],ce),Ce!==null&&(q=E(Ce,q,Pe),Ze===null?Ae=Ce:Ze.sibling=Ce,Ze=Ce);return Qe&&Kr(Y,Pe),Ae}for(Ce=h(Ce);Pe<J.length;Pe++)Ye=ne(Ce,Y,Pe,J[Pe],ce),Ye!==null&&(i&&Ye.alternate!==null&&Ce.delete(Ye.key===null?Pe:Ye.key),q=E(Ye,q,Pe),Ze===null?Ae=Ye:Ze.sibling=Ye,Ze=Ye);return i&&Ce.forEach(function(Xi){return s(Y,Xi)}),Qe&&Kr(Y,Pe),Ae}function Re(Y,q,J,ce){if(J==null)throw Error(r(151));for(var Ae=null,Ze=null,Ce=q,Pe=q=0,Ye=null,Je=J.next();Ce!==null&&!Je.done;Pe++,Je=J.next()){Ce.index>Pe?(Ye=Ce,Ce=null):Ye=Ce.sibling;var Xi=te(Y,Ce,Je.value,ce);if(Xi===null){Ce===null&&(Ce=Ye);break}i&&Ce&&Xi.alternate===null&&s(Y,Ce),q=E(Xi,q,Pe),Ze===null?Ae=Xi:Ze.sibling=Xi,Ze=Xi,Ce=Ye}if(Je.done)return u(Y,Ce),Qe&&Kr(Y,Pe),Ae;if(Ce===null){for(;!Je.done;Pe++,Je=J.next())Je=de(Y,Je.value,ce),Je!==null&&(q=E(Je,q,Pe),Ze===null?Ae=Je:Ze.sibling=Je,Ze=Je);return Qe&&Kr(Y,Pe),Ae}for(Ce=h(Ce);!Je.done;Pe++,Je=J.next())Je=ne(Ce,Y,Pe,Je.value,ce),Je!==null&&(i&&Je.alternate!==null&&Ce.delete(Je.key===null?Pe:Je.key),q=E(Je,q,Pe),Ze===null?Ae=Je:Ze.sibling=Je,Ze=Je);return i&&Ce.forEach(function(nL){return s(Y,nL)}),Qe&&Kr(Y,Pe),Ae}function lt(Y,q,J,ce){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case y:e:{for(var Ae=J.key;q!==null;){if(q.key===Ae){if(Ae=J.type,Ae===T){if(q.tag===7){u(Y,q.sibling),ce=g(q,J.props.children),ce.return=Y,Y=ce;break e}}else if(q.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===G&&Na(Ae)===q.type){u(Y,q.sibling),ce=g(q,J.props),ll(ce,J),ce.return=Y,Y=ce;break e}u(Y,q);break}else s(Y,q);q=q.sibling}J.type===T?(ce=Sa(J.props.children,Y.mode,ce,J.key),ce.return=Y,Y=ce):(ce=ac(J.type,J.key,J.props,null,Y.mode,ce),ll(ce,J),ce.return=Y,Y=ce)}return S(Y);case _:e:{for(Ae=J.key;q!==null;){if(q.key===Ae)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){u(Y,q.sibling),ce=g(q,J.children||[]),ce.return=Y,Y=ce;break e}else{u(Y,q);break}else s(Y,q);q=q.sibling}ce=Oh(J,Y.mode,ce),ce.return=Y,Y=ce}return S(Y);case G:return J=Na(J),lt(Y,q,J,ce)}if(se(J))return _e(Y,q,J,ce);if(W(J)){if(Ae=W(J),typeof Ae!="function")throw Error(r(150));return J=Ae.call(J),Re(Y,q,J,ce)}if(typeof J.then=="function")return lt(Y,q,fc(J),ce);if(J.$$typeof===N)return lt(Y,q,lc(Y,J),ce);hc(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,q!==null&&q.tag===6?(u(Y,q.sibling),ce=g(q,J),ce.return=Y,Y=ce):(u(Y,q),ce=Lh(J,Y.mode,ce),ce.return=Y,Y=ce),S(Y)):u(Y,q)}return function(Y,q,J,ce){try{ol=0;var Ae=lt(Y,q,J,ce);return Ps=null,Ae}catch(Ce){if(Ce===Ms||Ce===cc)throw Ce;var Ze=In(29,Ce,null,Y.mode);return Ze.lanes=ce,Ze.return=Y,Ze}}}var La=oy(!0),ly=oy(!1),Di=!1;function Vh(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qh(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ii(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Mi(i,s,u){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(tt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,s=ic(i),q1(i,null,u),s}return rc(i,h,s,u),ic(i)}function ul(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var h=s.lanes;h&=i.pendingLanes,u|=h,s.lanes=u,hs(i,u)}}function Gh(i,s){var u=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var g=null,E=null;if(u=u.firstBaseUpdate,u!==null){do{var S={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};E===null?g=E=S:E=E.next=S,u=u.next}while(u!==null);E===null?g=E=s:E=E.next=s}else g=E=s;u={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:E,shared:h.shared,callbacks:h.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var Yh=!1;function cl(){if(Yh){var i=Is;if(i!==null)throw i}}function dl(i,s,u,h){Yh=!1;var g=i.updateQueue;Di=!1;var E=g.firstBaseUpdate,S=g.lastBaseUpdate,R=g.shared.pending;if(R!==null){g.shared.pending=null;var U=R,ee=U.next;U.next=null,S===null?E=ee:S.next=ee,S=U;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,R=oe.lastBaseUpdate,R!==S&&(R===null?oe.firstBaseUpdate=ee:R.next=ee,oe.lastBaseUpdate=U))}if(E!==null){var de=g.baseState;S=0,oe=ee=U=null,R=E;do{var te=R.lane&-536870913,ne=te!==R.lane;if(ne?(Ge&te)===te:(h&te)===te){te!==0&&te===Ds&&(Yh=!0),oe!==null&&(oe=oe.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var _e=i,Re=R;te=s;var lt=u;switch(Re.tag){case 1:if(_e=Re.payload,typeof _e=="function"){de=_e.call(lt,de,te);break e}de=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Re.payload,te=typeof _e=="function"?_e.call(lt,de,te):_e,te==null)break e;de=m({},de,te);break e;case 2:Di=!0}}te=R.callback,te!==null&&(i.flags|=64,ne&&(i.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:R.tag,payload:R.payload,callback:R.callback,next:null},oe===null?(ee=oe=ne,U=de):oe=oe.next=ne,S|=te;if(R=R.next,R===null){if(R=g.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);oe===null&&(U=de),g.baseState=U,g.firstBaseUpdate=ee,g.lastBaseUpdate=oe,E===null&&(g.shared.lanes=0),Fi|=S,i.lanes=S,i.memoizedState=de}}function uy(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function cy(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)uy(u[i],s)}var Bs=$(null),pc=$(0);function dy(i,s){i=li,D(pc,i),D(Bs,s),li=i|s.baseLanes}function Qh(){D(pc,li),D(Bs,Bs.current)}function Wh(){li=pc.current,ae(Bs),ae(pc)}var Mn=$(null),er=null;function Pi(i){var s=i.alternate;D(wt,wt.current&1),D(Mn,i),er===null&&(s===null||Bs.current!==null||s.memoizedState!==null)&&(er=i)}function Xh(i){D(wt,wt.current),D(Mn,i),er===null&&(er=i)}function fy(i){i.tag===22?(D(wt,wt.current),D(Mn,i),er===null&&(er=i)):Bi()}function Bi(){D(wt,wt.current),D(Mn,Mn.current)}function Pn(i){ae(Mn),er===i&&(er=null),ae(wt)}var wt=$(0);function mc(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||nm(u)||rm(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ei=0,Ie=null,st=null,Lt=null,gc=!1,js=!1,Oa=!1,bc=0,fl=0,Hs=null,GN=0;function Et(){throw Error(r(321))}function Kh(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Dn(i[u],s[u]))return!1;return!0}function Zh(i,s,u,h,g,E){return ei=E,Ie=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=i===null||i.memoizedState===null?Wy:hp,Oa=!1,E=u(h,g),Oa=!1,js&&(E=py(s,u,h,g)),hy(i),E}function hy(i){B.H=ml;var s=st!==null&&st.next!==null;if(ei=0,Lt=st=Ie=null,gc=!1,fl=0,Hs=null,s)throw Error(r(300));i===null||Ot||(i=i.dependencies,i!==null&&oc(i)&&(Ot=!0))}function py(i,s,u,h){Ie=i;var g=0;do{if(js&&(Hs=null),fl=0,js=!1,25<=g)throw Error(r(301));if(g+=1,Lt=st=null,i.updateQueue!=null){var E=i.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}B.H=Xy,E=s(u,h)}while(js);return E}function YN(){var i=B.H,s=i.useState()[0];return s=typeof s.then=="function"?hl(s):s,i=i.useState()[0],(st!==null?st.memoizedState:null)!==i&&(Ie.flags|=1024),s}function Jh(){var i=bc!==0;return bc=0,i}function ep(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function tp(i){if(gc){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}gc=!1}ei=0,Lt=st=Ie=null,js=!1,fl=bc=0,Hs=null}function pn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ie.memoizedState=Lt=i:Lt=Lt.next=i,Lt}function At(){if(st===null){var i=Ie.alternate;i=i!==null?i.memoizedState:null}else i=st.next;var s=Lt===null?Ie.memoizedState:Lt.next;if(s!==null)Lt=s,st=i;else{if(i===null)throw Ie.alternate===null?Error(r(467)):Error(r(310));st=i,i={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},Lt===null?Ie.memoizedState=Lt=i:Lt=Lt.next=i}return Lt}function yc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hl(i){var s=fl;return fl+=1,Hs===null&&(Hs=[]),i=iy(Hs,i,s),s=Ie,(Lt===null?s.memoizedState:Lt.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?Wy:hp),i}function Ec(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return hl(i);if(i.$$typeof===N)return tn(i)}throw Error(r(438,String(i)))}function np(i){var s=null,u=Ie.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var h=Ie.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=yc(),Ie.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),h=0;h<i;h++)u[h]=z;return s.index++,u}function ti(i,s){return typeof s=="function"?s(i):s}function vc(i){var s=At();return rp(s,st,i)}function rp(i,s,u){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var g=i.baseQueue,E=h.pending;if(E!==null){if(g!==null){var S=g.next;g.next=E.next,E.next=S}s.baseQueue=g=E,h.pending=null}if(E=i.baseState,g===null)i.memoizedState=E;else{s=g.next;var R=S=null,U=null,ee=s,oe=!1;do{var de=ee.lane&-536870913;if(de!==ee.lane?(Ge&de)===de:(ei&de)===de){var te=ee.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),de===Ds&&(oe=!0);else if((ei&te)===te){ee=ee.next,te===Ds&&(oe=!0);continue}else de={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(R=U=de,S=E):U=U.next=de,Ie.lanes|=te,Fi|=te;de=ee.action,Oa&&u(E,de),E=ee.hasEagerState?ee.eagerState:u(E,de)}else te={lane:de,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(R=U=te,S=E):U=U.next=te,Ie.lanes|=de,Fi|=de;ee=ee.next}while(ee!==null&&ee!==s);if(U===null?S=E:U.next=R,!Dn(E,i.memoizedState)&&(Ot=!0,oe&&(u=Is,u!==null)))throw u;i.memoizedState=E,i.baseState=S,i.baseQueue=U,h.lastRenderedState=E}return g===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function ip(i){var s=At(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var h=u.dispatch,g=u.pending,E=s.memoizedState;if(g!==null){u.pending=null;var S=g=g.next;do E=i(E,S.action),S=S.next;while(S!==g);Dn(E,s.memoizedState)||(Ot=!0),s.memoizedState=E,s.baseQueue===null&&(s.baseState=E),u.lastRenderedState=E}return[E,h]}function my(i,s,u){var h=Ie,g=At(),E=Qe;if(E){if(u===void 0)throw Error(r(407));u=u()}else u=s();var S=!Dn((st||g).memoizedState,u);if(S&&(g.memoizedState=u,Ot=!0),g=g.queue,op(yy.bind(null,h,g,i),[i]),g.getSnapshot!==s||S||Lt!==null&&Lt.memoizedState.tag&1){if(h.flags|=2048,Fs(9,{destroy:void 0},by.bind(null,h,g,u,s),null),ct===null)throw Error(r(349));E||(ei&127)!==0||gy(h,s,u)}return u}function gy(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=Ie.updateQueue,s===null?(s=yc(),Ie.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function by(i,s,u,h){s.value=u,s.getSnapshot=h,Ey(s)&&vy(i)}function yy(i,s,u){return u(function(){Ey(s)&&vy(i)})}function Ey(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Dn(i,u)}catch{return!0}}function vy(i){var s=Ta(i,2);s!==null&&An(s,i,2)}function ap(i){var s=pn();if(typeof i=="function"){var u=i;if(i=u(),Oa){St(!0);try{u()}finally{St(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:i},s}function _y(i,s,u,h){return i.baseState=u,rp(i,st,typeof h=="function"?h:ti)}function QN(i,s,u,h,g){if(Tc(i))throw Error(r(485));if(i=s.action,i!==null){var E={payload:g,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){E.listeners.push(S)}};B.T!==null?u(!0):E.isTransition=!1,h(E),u=s.pending,u===null?(E.next=s.pending=E,xy(s,E)):(E.next=u.next,s.pending=u.next=E)}}function xy(i,s){var u=s.action,h=s.payload,g=i.state;if(s.isTransition){var E=B.T,S={};B.T=S;try{var R=u(g,h),U=B.S;U!==null&&U(S,R),Ty(i,s,R)}catch(ee){sp(i,s,ee)}finally{E!==null&&S.types!==null&&(E.types=S.types),B.T=E}}else try{E=u(g,h),Ty(i,s,E)}catch(ee){sp(i,s,ee)}}function Ty(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){Sy(i,s,h)},function(h){return sp(i,s,h)}):Sy(i,s,u)}function Sy(i,s,u){s.status="fulfilled",s.value=u,Cy(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,xy(i,u)))}function sp(i,s,u){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=u,Cy(s),s=s.next;while(s!==h)}i.action=null}function Cy(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function wy(i,s){return s}function Ay(i,s){if(Qe){var u=ct.formState;if(u!==null){e:{var h=Ie;if(Qe){if(ht){t:{for(var g=ht,E=Jn;g.nodeType!==8;){if(!E){g=null;break t}if(g=tr(g.nextSibling),g===null){g=null;break t}}E=g.data,g=E==="F!"||E==="F"?g:null}if(g){ht=tr(g.nextSibling),h=g.data==="F!";break e}}Li(h)}h=!1}h&&(s=u[0])}}return u=pn(),u.memoizedState=u.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wy,lastRenderedState:s},u.queue=h,u=Gy.bind(null,Ie,h),h.dispatch=u,h=ap(!1),E=fp.bind(null,Ie,!1,h.queue),h=pn(),g={state:s,dispatch:null,action:i,pending:null},h.queue=g,u=QN.bind(null,Ie,g,E,u),g.dispatch=u,h.memoizedState=i,[s,u,!1]}function ky(i){var s=At();return Ny(s,st,i)}function Ny(i,s,u){if(s=rp(i,s,wy)[0],i=vc(ti)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=hl(s)}catch(S){throw S===Ms?cc:S}else h=s;s=At();var g=s.queue,E=g.dispatch;return u!==s.memoizedState&&(Ie.flags|=2048,Fs(9,{destroy:void 0},WN.bind(null,g,u),null)),[h,E,i]}function WN(i,s){i.action=s}function Ry(i){var s=At(),u=st;if(u!==null)return Ny(s,u,i);At(),s=s.memoizedState,u=At();var h=u.queue.dispatch;return u.memoizedState=i,[s,h,!1]}function Fs(i,s,u,h){return i={tag:i,create:u,deps:h,inst:s,next:null},s=Ie.updateQueue,s===null&&(s=yc(),Ie.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(h=u.next,u.next=i,i.next=h,s.lastEffect=i),i}function Ly(){return At().memoizedState}function _c(i,s,u,h){var g=pn();Ie.flags|=i,g.memoizedState=Fs(1|s,{destroy:void 0},u,h===void 0?null:h)}function xc(i,s,u,h){var g=At();h=h===void 0?null:h;var E=g.memoizedState.inst;st!==null&&h!==null&&Kh(h,st.memoizedState.deps)?g.memoizedState=Fs(s,E,u,h):(Ie.flags|=i,g.memoizedState=Fs(1|s,E,u,h))}function Oy(i,s){_c(8390656,8,i,s)}function op(i,s){xc(2048,8,i,s)}function XN(i){Ie.flags|=4;var s=Ie.updateQueue;if(s===null)s=yc(),Ie.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function Dy(i){var s=At().memoizedState;return XN({ref:s,nextImpl:i}),function(){if((tt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Iy(i,s){return xc(4,2,i,s)}function My(i,s){return xc(4,4,i,s)}function Py(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function By(i,s,u){u=u!=null?u.concat([i]):null,xc(4,4,Py.bind(null,s,i),u)}function lp(){}function jy(i,s){var u=At();s=s===void 0?null:s;var h=u.memoizedState;return s!==null&&Kh(s,h[1])?h[0]:(u.memoizedState=[i,s],i)}function Hy(i,s){var u=At();s=s===void 0?null:s;var h=u.memoizedState;if(s!==null&&Kh(s,h[1]))return h[0];if(h=i(),Oa){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[h,s],h}function up(i,s,u){return u===void 0||(ei&1073741824)!==0&&(Ge&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=FE(),Ie.lanes|=i,Fi|=i,u)}function Fy(i,s,u,h){return Dn(u,s)?u:Bs.current!==null?(i=up(i,u,h),Dn(i,s)||(Ot=!0),i):(ei&42)===0||(ei&1073741824)!==0&&(Ge&261930)===0?(Ot=!0,i.memoizedState=u):(i=FE(),Ie.lanes|=i,Fi|=i,s)}function Uy(i,s,u,h,g){var E=Q.p;Q.p=E!==0&&8>E?E:8;var S=B.T,R={};B.T=R,fp(i,!1,s,u);try{var U=g(),ee=B.S;if(ee!==null&&ee(R,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var oe=qN(U,h);pl(i,s,oe,Hn(i))}else pl(i,s,h,Hn(i))}catch(de){pl(i,s,{then:function(){},status:"rejected",reason:de},Hn())}finally{Q.p=E,S!==null&&R.types!==null&&(S.types=R.types),B.T=S}}function KN(){}function cp(i,s,u,h){if(i.tag!==5)throw Error(r(476));var g=zy(i).queue;Uy(i,g,s,X,u===null?KN:function(){return $y(i),u(h)})}function zy(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:X},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function $y(i){var s=zy(i);s.next===null&&(s=i.alternate.memoizedState),pl(i,s.next.queue,{},Hn())}function dp(){return tn(Ll)}function Vy(){return At().memoizedState}function qy(){return At().memoizedState}function ZN(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=Hn();i=Ii(u);var h=Mi(s,i,u);h!==null&&(An(h,s,u),ul(h,s,u)),s={cache:Fh()},i.payload=s;return}s=s.return}}function JN(i,s,u){var h=Hn();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Tc(i)?Yy(s,u):(u=Nh(i,s,u,h),u!==null&&(An(u,i,h),Qy(u,s,h)))}function Gy(i,s,u){var h=Hn();pl(i,s,u,h)}function pl(i,s,u,h){var g={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Tc(i))Yy(s,g);else{var E=i.alternate;if(i.lanes===0&&(E===null||E.lanes===0)&&(E=s.lastRenderedReducer,E!==null))try{var S=s.lastRenderedState,R=E(S,u);if(g.hasEagerState=!0,g.eagerState=R,Dn(R,S))return rc(i,s,g,0),ct===null&&nc(),!1}catch{}if(u=Nh(i,s,g,h),u!==null)return An(u,i,h),Qy(u,s,h),!0}return!1}function fp(i,s,u,h){if(h={lane:2,revertLane:Vp(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Tc(i)){if(s)throw Error(r(479))}else s=Nh(i,u,h,2),s!==null&&An(s,i,2)}function Tc(i){var s=i.alternate;return i===Ie||s!==null&&s===Ie}function Yy(i,s){js=gc=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function Qy(i,s,u){if((u&4194048)!==0){var h=s.lanes;h&=i.pendingLanes,u|=h,s.lanes=u,hs(i,u)}}var ml={readContext:tn,use:Ec,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};ml.useEffectEvent=Et;var Wy={readContext:tn,use:Ec,useCallback:function(i,s){return pn().memoizedState=[i,s===void 0?null:s],i},useContext:tn,useEffect:Oy,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,_c(4194308,4,Py.bind(null,s,i),u)},useLayoutEffect:function(i,s){return _c(4194308,4,i,s)},useInsertionEffect:function(i,s){_c(4,2,i,s)},useMemo:function(i,s){var u=pn();s=s===void 0?null:s;var h=i();if(Oa){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[h,s],h},useReducer:function(i,s,u){var h=pn();if(u!==void 0){var g=u(s);if(Oa){St(!0);try{u(s)}finally{St(!1)}}}else g=s;return h.memoizedState=h.baseState=g,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:g},h.queue=i,i=i.dispatch=JN.bind(null,Ie,i),[h.memoizedState,i]},useRef:function(i){var s=pn();return i={current:i},s.memoizedState=i},useState:function(i){i=ap(i);var s=i.queue,u=Gy.bind(null,Ie,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:lp,useDeferredValue:function(i,s){var u=pn();return up(u,i,s)},useTransition:function(){var i=ap(!1);return i=Uy.bind(null,Ie,i.queue,!0,!1),pn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var h=Ie,g=pn();if(Qe){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),ct===null)throw Error(r(349));(Ge&127)!==0||gy(h,s,u)}g.memoizedState=u;var E={value:u,getSnapshot:s};return g.queue=E,Oy(yy.bind(null,h,E,i),[i]),h.flags|=2048,Fs(9,{destroy:void 0},by.bind(null,h,E,u,s),null),u},useId:function(){var i=pn(),s=ct.identifierPrefix;if(Qe){var u=wr,h=Cr;u=(h&~(1<<32-rt(h)-1)).toString(32)+u,s="_"+s+"R_"+u,u=bc++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=GN++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:dp,useFormState:Ay,useActionState:Ay,useOptimistic:function(i){var s=pn();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=fp.bind(null,Ie,!0,u),u.dispatch=s,[i,s]},useMemoCache:np,useCacheRefresh:function(){return pn().memoizedState=ZN.bind(null,Ie)},useEffectEvent:function(i){var s=pn(),u={impl:i};return s.memoizedState=u,function(){if((tt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},hp={readContext:tn,use:Ec,useCallback:jy,useContext:tn,useEffect:op,useImperativeHandle:By,useInsertionEffect:Iy,useLayoutEffect:My,useMemo:Hy,useReducer:vc,useRef:Ly,useState:function(){return vc(ti)},useDebugValue:lp,useDeferredValue:function(i,s){var u=At();return Fy(u,st.memoizedState,i,s)},useTransition:function(){var i=vc(ti)[0],s=At().memoizedState;return[typeof i=="boolean"?i:hl(i),s]},useSyncExternalStore:my,useId:Vy,useHostTransitionStatus:dp,useFormState:ky,useActionState:ky,useOptimistic:function(i,s){var u=At();return _y(u,st,i,s)},useMemoCache:np,useCacheRefresh:qy};hp.useEffectEvent=Dy;var Xy={readContext:tn,use:Ec,useCallback:jy,useContext:tn,useEffect:op,useImperativeHandle:By,useInsertionEffect:Iy,useLayoutEffect:My,useMemo:Hy,useReducer:ip,useRef:Ly,useState:function(){return ip(ti)},useDebugValue:lp,useDeferredValue:function(i,s){var u=At();return st===null?up(u,i,s):Fy(u,st.memoizedState,i,s)},useTransition:function(){var i=ip(ti)[0],s=At().memoizedState;return[typeof i=="boolean"?i:hl(i),s]},useSyncExternalStore:my,useId:Vy,useHostTransitionStatus:dp,useFormState:Ry,useActionState:Ry,useOptimistic:function(i,s){var u=At();return st!==null?_y(u,st,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:np,useCacheRefresh:qy};Xy.useEffectEvent=Dy;function pp(i,s,u,h){s=i.memoizedState,u=u(h,s),u=u==null?s:m({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var mp={enqueueSetState:function(i,s,u){i=i._reactInternals;var h=Hn(),g=Ii(h);g.payload=s,u!=null&&(g.callback=u),s=Mi(i,g,h),s!==null&&(An(s,i,h),ul(s,i,h))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var h=Hn(),g=Ii(h);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=Mi(i,g,h),s!==null&&(An(s,i,h),ul(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=Hn(),h=Ii(u);h.tag=2,s!=null&&(h.callback=s),s=Mi(i,h,u),s!==null&&(An(s,i,u),ul(s,i,u))}};function Ky(i,s,u,h,g,E,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,E,S):s.prototype&&s.prototype.isPureReactComponent?!tl(u,h)||!tl(g,E):!0}function Zy(i,s,u,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,h),s.state!==i&&mp.enqueueReplaceState(s,s.state,null)}function Da(i,s){var u=s;if("ref"in s){u={};for(var h in s)h!=="ref"&&(u[h]=s[h])}if(i=i.defaultProps){u===s&&(u=m({},u));for(var g in i)u[g]===void 0&&(u[g]=i[g])}return u}function Jy(i){tc(i)}function eE(i){console.error(i)}function tE(i){tc(i)}function Sc(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function nE(i,s,u){try{var h=i.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function gp(i,s,u){return u=Ii(u),u.tag=3,u.payload={element:null},u.callback=function(){Sc(i,s)},u}function rE(i){return i=Ii(i),i.tag=3,i}function iE(i,s,u,h){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var E=h.value;i.payload=function(){return g(E)},i.callback=function(){nE(s,u,h)}}var S=u.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){nE(s,u,h),typeof g!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var R=h.stack;this.componentDidCatch(h.value,{componentStack:R!==null?R:""})})}function eR(i,s,u,h,g){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=u.alternate,s!==null&&Os(s,u,g,!0),u=Mn.current,u!==null){switch(u.tag){case 31:case 13:return er===null?Pc():u.alternate===null&&vt===0&&(vt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,h===dc?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([h]):s.add(h),Up(i,h,g)),!1;case 22:return u.flags|=65536,h===dc?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([h]):u.add(h)),Up(i,h,g)),!1}throw Error(r(435,u.tag))}return Up(i,h,g),Pc(),!1}if(Qe)return s=Mn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,h!==Mh&&(i=Error(r(422),{cause:h}),il(Xn(i,u)))):(h!==Mh&&(s=Error(r(423),{cause:h}),il(Xn(s,u))),i=i.current.alternate,i.flags|=65536,g&=-g,i.lanes|=g,h=Xn(h,u),g=gp(i.stateNode,h,g),Gh(i,g),vt!==4&&(vt=2)),!1;var E=Error(r(520),{cause:h});if(E=Xn(E,u),Tl===null?Tl=[E]:Tl.push(E),vt!==4&&(vt=2),s===null)return!0;h=Xn(h,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=g&-g,u.lanes|=i,i=gp(u.stateNode,h,i),Gh(u,i),!1;case 1:if(s=u.type,E=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Ui===null||!Ui.has(E))))return u.flags|=65536,g&=-g,u.lanes|=g,g=rE(g),iE(g,i,u,h),Gh(u,g),!1}u=u.return}while(u!==null);return!1}var bp=Error(r(461)),Ot=!1;function nn(i,s,u,h){s.child=i===null?ly(s,null,u,h):La(s,i.child,u,h)}function aE(i,s,u,h,g){u=u.render;var E=s.ref;if("ref"in h){var S={};for(var R in h)R!=="ref"&&(S[R]=h[R])}else S=h;return Aa(s),h=Zh(i,s,u,S,E,g),R=Jh(),i!==null&&!Ot?(ep(i,s,g),ni(i,s,g)):(Qe&&R&&Dh(s),s.flags|=1,nn(i,s,h,g),s.child)}function sE(i,s,u,h,g){if(i===null){var E=u.type;return typeof E=="function"&&!Rh(E)&&E.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=E,oE(i,s,E,h,g)):(i=ac(u.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(E=i.child,!Cp(i,g)){var S=E.memoizedProps;if(u=u.compare,u=u!==null?u:tl,u(S,h)&&i.ref===s.ref)return ni(i,s,g)}return s.flags|=1,i=Xr(E,h),i.ref=s.ref,i.return=s,s.child=i}function oE(i,s,u,h,g){if(i!==null){var E=i.memoizedProps;if(tl(E,h)&&i.ref===s.ref)if(Ot=!1,s.pendingProps=h=E,Cp(i,g))(i.flags&131072)!==0&&(Ot=!0);else return s.lanes=i.lanes,ni(i,s,g)}return yp(i,s,u,h,g)}function lE(i,s,u,h){var g=h.children,E=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(E=E!==null?E.baseLanes|u:u,i!==null){for(h=s.child=i.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;h=g&~E}else h=0,s.child=null;return uE(i,s,E,u,h)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&uc(s,E!==null?E.cachePool:null),E!==null?dy(s,E):Qh(),fy(s);else return h=s.lanes=536870912,uE(i,s,E!==null?E.baseLanes|u:u,u,h)}else E!==null?(uc(s,E.cachePool),dy(s,E),Bi(),s.memoizedState=null):(i!==null&&uc(s,null),Qh(),Bi());return nn(i,s,g,u),s.child}function gl(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function uE(i,s,u,h,g){var E=zh();return E=E===null?null:{parent:Rt._currentValue,pool:E},s.memoizedState={baseLanes:u,cachePool:E},i!==null&&uc(s,null),Qh(),fy(s),i!==null&&Os(i,s,h,!0),s.childLanes=g,null}function Cc(i,s){return s=Ac({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function cE(i,s,u){return La(s,i.child,null,u),i=Cc(s,s.pendingProps),i.flags|=2,Pn(s),s.memoizedState=null,i}function tR(i,s,u){var h=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(Qe){if(h.mode==="hidden")return i=Cc(s,h),s.lanes=536870912,gl(null,i);if(Xh(s),(i=ht)?(i=xv(i,Jn),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ni!==null?{id:Cr,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},u=Y1(i),u.return=s,s.child=u,en=s,ht=null)):i=null,i===null)throw Li(s);return s.lanes=536870912,null}return Cc(s,h)}var E=i.memoizedState;if(E!==null){var S=E.dehydrated;if(Xh(s),g)if(s.flags&256)s.flags&=-257,s=cE(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(Ot||Os(i,s,u,!1),g=(u&i.childLanes)!==0,Ot||g){if(h=ct,h!==null&&(S=ps(h,u),S!==0&&S!==E.retryLane))throw E.retryLane=S,Ta(i,S),An(h,i,S),bp;Pc(),s=cE(i,s,u)}else i=E.treeContext,ht=tr(S.nextSibling),en=s,Qe=!0,Ri=null,Jn=!1,i!==null&&X1(s,i),s=Cc(s,h),s.flags|=4096;return s}return i=Xr(i.child,{mode:h.mode,children:h.children}),i.ref=s.ref,s.child=i,i.return=s,i}function wc(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function yp(i,s,u,h,g){return Aa(s),u=Zh(i,s,u,h,void 0,g),h=Jh(),i!==null&&!Ot?(ep(i,s,g),ni(i,s,g)):(Qe&&h&&Dh(s),s.flags|=1,nn(i,s,u,g),s.child)}function dE(i,s,u,h,g,E){return Aa(s),s.updateQueue=null,u=py(s,h,u,g),hy(i),h=Jh(),i!==null&&!Ot?(ep(i,s,E),ni(i,s,E)):(Qe&&h&&Dh(s),s.flags|=1,nn(i,s,u,E),s.child)}function fE(i,s,u,h,g){if(Aa(s),s.stateNode===null){var E=ks,S=u.contextType;typeof S=="object"&&S!==null&&(E=tn(S)),E=new u(h,E),s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=mp,s.stateNode=E,E._reactInternals=s,E=s.stateNode,E.props=h,E.state=s.memoizedState,E.refs={},Vh(s),S=u.contextType,E.context=typeof S=="object"&&S!==null?tn(S):ks,E.state=s.memoizedState,S=u.getDerivedStateFromProps,typeof S=="function"&&(pp(s,u,S,h),E.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(S=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),S!==E.state&&mp.enqueueReplaceState(E,E.state,null),dl(s,h,E,g),cl(),E.state=s.memoizedState),typeof E.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){E=s.stateNode;var R=s.memoizedProps,U=Da(u,R);E.props=U;var ee=E.context,oe=u.contextType;S=ks,typeof oe=="object"&&oe!==null&&(S=tn(oe));var de=u.getDerivedStateFromProps;oe=typeof de=="function"||typeof E.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,oe||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(R||ee!==S)&&Zy(s,E,h,S),Di=!1;var te=s.memoizedState;E.state=te,dl(s,h,E,g),cl(),ee=s.memoizedState,R||te!==ee||Di?(typeof de=="function"&&(pp(s,u,de,h),ee=s.memoizedState),(U=Di||Ky(s,u,U,h,te,ee,S))?(oe||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=ee),E.props=h,E.state=ee,E.context=S,h=U):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{E=s.stateNode,qh(i,s),S=s.memoizedProps,oe=Da(u,S),E.props=oe,de=s.pendingProps,te=E.context,ee=u.contextType,U=ks,typeof ee=="object"&&ee!==null&&(U=tn(ee)),R=u.getDerivedStateFromProps,(ee=typeof R=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(S!==de||te!==U)&&Zy(s,E,h,U),Di=!1,te=s.memoizedState,E.state=te,dl(s,h,E,g),cl();var ne=s.memoizedState;S!==de||te!==ne||Di||i!==null&&i.dependencies!==null&&oc(i.dependencies)?(typeof R=="function"&&(pp(s,u,R,h),ne=s.memoizedState),(oe=Di||Ky(s,u,oe,h,te,ne,U)||i!==null&&i.dependencies!==null&&oc(i.dependencies))?(ee||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(h,ne,U),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(h,ne,U)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||S===i.memoizedProps&&te===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&te===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ne),E.props=h,E.state=ne,E.context=U,h=oe):(typeof E.componentDidUpdate!="function"||S===i.memoizedProps&&te===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&te===i.memoizedState||(s.flags|=1024),h=!1)}return E=h,wc(i,s),h=(s.flags&128)!==0,E||h?(E=s.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:E.render(),s.flags|=1,i!==null&&h?(s.child=La(s,i.child,null,g),s.child=La(s,null,u,g)):nn(i,s,u,g),s.memoizedState=E.state,i=s.child):i=ni(i,s,g),i}function hE(i,s,u,h){return Ca(),s.flags|=256,nn(i,s,u,h),s.child}var Ep={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vp(i){return{baseLanes:i,cachePool:ny()}}function _p(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=jn),i}function pE(i,s,u){var h=s.pendingProps,g=!1,E=(s.flags&128)!==0,S;if((S=E)||(S=i!==null&&i.memoizedState===null?!1:(wt.current&2)!==0),S&&(g=!0,s.flags&=-129),S=(s.flags&32)!==0,s.flags&=-33,i===null){if(Qe){if(g?Pi(s):Bi(),(i=ht)?(i=xv(i,Jn),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ni!==null?{id:Cr,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},u=Y1(i),u.return=s,s.child=u,en=s,ht=null)):i=null,i===null)throw Li(s);return rm(i)?s.lanes=32:s.lanes=536870912,null}var R=h.children;return h=h.fallback,g?(Bi(),g=s.mode,R=Ac({mode:"hidden",children:R},g),h=Sa(h,g,u,null),R.return=s,h.return=s,R.sibling=h,s.child=R,h=s.child,h.memoizedState=vp(u),h.childLanes=_p(i,S,u),s.memoizedState=Ep,gl(null,h)):(Pi(s),xp(s,R))}var U=i.memoizedState;if(U!==null&&(R=U.dehydrated,R!==null)){if(E)s.flags&256?(Pi(s),s.flags&=-257,s=Tp(i,s,u)):s.memoizedState!==null?(Bi(),s.child=i.child,s.flags|=128,s=null):(Bi(),R=h.fallback,g=s.mode,h=Ac({mode:"visible",children:h.children},g),R=Sa(R,g,u,null),R.flags|=2,h.return=s,R.return=s,h.sibling=R,s.child=h,La(s,i.child,null,u),h=s.child,h.memoizedState=vp(u),h.childLanes=_p(i,S,u),s.memoizedState=Ep,s=gl(null,h));else if(Pi(s),rm(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var ee=S.dgst;S=ee,h=Error(r(419)),h.stack="",h.digest=S,il({value:h,source:null,stack:null}),s=Tp(i,s,u)}else if(Ot||Os(i,s,u,!1),S=(u&i.childLanes)!==0,Ot||S){if(S=ct,S!==null&&(h=ps(S,u),h!==0&&h!==U.retryLane))throw U.retryLane=h,Ta(i,h),An(S,i,h),bp;nm(R)||Pc(),s=Tp(i,s,u)}else nm(R)?(s.flags|=192,s.child=i.child,s=null):(i=U.treeContext,ht=tr(R.nextSibling),en=s,Qe=!0,Ri=null,Jn=!1,i!==null&&X1(s,i),s=xp(s,h.children),s.flags|=4096);return s}return g?(Bi(),R=h.fallback,g=s.mode,U=i.child,ee=U.sibling,h=Xr(U,{mode:"hidden",children:h.children}),h.subtreeFlags=U.subtreeFlags&65011712,ee!==null?R=Xr(ee,R):(R=Sa(R,g,u,null),R.flags|=2),R.return=s,h.return=s,h.sibling=R,s.child=h,gl(null,h),h=s.child,R=i.child.memoizedState,R===null?R=vp(u):(g=R.cachePool,g!==null?(U=Rt._currentValue,g=g.parent!==U?{parent:U,pool:U}:g):g=ny(),R={baseLanes:R.baseLanes|u,cachePool:g}),h.memoizedState=R,h.childLanes=_p(i,S,u),s.memoizedState=Ep,gl(i.child,h)):(Pi(s),u=i.child,i=u.sibling,u=Xr(u,{mode:"visible",children:h.children}),u.return=s,u.sibling=null,i!==null&&(S=s.deletions,S===null?(s.deletions=[i],s.flags|=16):S.push(i)),s.child=u,s.memoizedState=null,u)}function xp(i,s){return s=Ac({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function Ac(i,s){return i=In(22,i,null,s),i.lanes=0,i}function Tp(i,s,u){return La(s,i.child,null,u),i=xp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function mE(i,s,u){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),jh(i.return,s,u)}function Sp(i,s,u,h,g,E){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:g,treeForkCount:E}:(S.isBackwards=s,S.rendering=null,S.renderingStartTime=0,S.last=h,S.tail=u,S.tailMode=g,S.treeForkCount=E)}function gE(i,s,u){var h=s.pendingProps,g=h.revealOrder,E=h.tail;h=h.children;var S=wt.current,R=(S&2)!==0;if(R?(S=S&1|2,s.flags|=128):S&=1,D(wt,S),nn(i,s,h,u),h=Qe?rl:0,!R&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&mE(i,u,s);else if(i.tag===19)mE(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)i=u.alternate,i!==null&&mc(i)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),Sp(s,!1,g,u,E,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&mc(i)===null){s.child=g;break}i=g.sibling,g.sibling=u,u=g,g=i}Sp(s,!0,u,null,E,h);break;case"together":Sp(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function ni(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),Fi|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(Os(i,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,u=Xr(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=Xr(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function Cp(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&oc(i)))}function nR(i,s,u){switch(s.tag){case 3:je(s,s.stateNode.containerInfo),Oi(s,Rt,i.memoizedState.cache),Ca();break;case 27:case 5:yt(s);break;case 4:je(s,s.stateNode.containerInfo);break;case 10:Oi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Xh(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Pi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?pE(i,s,u):(Pi(s),i=ni(i,s,u),i!==null?i.sibling:null);Pi(s);break;case 19:var g=(i.flags&128)!==0;if(h=(u&s.childLanes)!==0,h||(Os(i,s,u,!1),h=(u&s.childLanes)!==0),g){if(h)return gE(i,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),D(wt,wt.current),h)break;return null;case 22:return s.lanes=0,lE(i,s,u,s.pendingProps);case 24:Oi(s,Rt,i.memoizedState.cache)}return ni(i,s,u)}function bE(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)Ot=!0;else{if(!Cp(i,u)&&(s.flags&128)===0)return Ot=!1,nR(i,s,u);Ot=(i.flags&131072)!==0}else Ot=!1,Qe&&(s.flags&1048576)!==0&&W1(s,rl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(i=Na(s.elementType),s.type=i,typeof i=="function")Rh(i)?(h=Da(i,h),s.tag=1,s=fE(null,s,i,h,u)):(s.tag=0,s=yp(null,s,i,h,u));else{if(i!=null){var g=i.$$typeof;if(g===L){s.tag=11,s=aE(null,s,i,h,u);break e}else if(g===V){s.tag=14,s=sE(null,s,i,h,u);break e}}throw s=ue(i)||i,Error(r(306,s,""))}}return s;case 0:return yp(i,s,s.type,s.pendingProps,u);case 1:return h=s.type,g=Da(h,s.pendingProps),fE(i,s,h,g,u);case 3:e:{if(je(s,s.stateNode.containerInfo),i===null)throw Error(r(387));h=s.pendingProps;var E=s.memoizedState;g=E.element,qh(i,s),dl(s,h,null,u);var S=s.memoizedState;if(h=S.cache,Oi(s,Rt,h),h!==E.cache&&Hh(s,[Rt],u,!0),cl(),h=S.element,E.isDehydrated)if(E={element:h,isDehydrated:!1,cache:S.cache},s.updateQueue.baseState=E,s.memoizedState=E,s.flags&256){s=hE(i,s,h,u);break e}else if(h!==g){g=Xn(Error(r(424)),s),il(g),s=hE(i,s,h,u);break e}else for(i=s.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,ht=tr(i.firstChild),en=s,Qe=!0,Ri=null,Jn=!0,u=ly(s,null,h,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ca(),h===g){s=ni(i,s,u);break e}nn(i,s,h,u)}s=s.child}return s;case 26:return wc(i,s),i===null?(u=kv(s.type,null,s.pendingProps,null))?s.memoizedState=u:Qe||(u=s.type,i=s.pendingProps,h=$c(Se.current).createElement(u),h[Jt]=s,h[_n]=i,rn(h,u,i),$t(h),s.stateNode=h):s.memoizedState=kv(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return yt(s),i===null&&Qe&&(h=s.stateNode=Cv(s.type,s.pendingProps,Se.current),en=s,Jn=!0,g=ht,qi(s.type)?(im=g,ht=tr(h.firstChild)):ht=g),nn(i,s,s.pendingProps.children,u),wc(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&Qe&&((g=h=ht)&&(h=OR(h,s.type,s.pendingProps,Jn),h!==null?(s.stateNode=h,en=s,ht=tr(h.firstChild),Jn=!1,g=!0):g=!1),g||Li(s)),yt(s),g=s.type,E=s.pendingProps,S=i!==null?i.memoizedProps:null,h=E.children,Jp(g,E)?h=null:S!==null&&Jp(g,S)&&(s.flags|=32),s.memoizedState!==null&&(g=Zh(i,s,YN,null,null,u),Ll._currentValue=g),wc(i,s),nn(i,s,h,u),s.child;case 6:return i===null&&Qe&&((i=u=ht)&&(u=DR(u,s.pendingProps,Jn),u!==null?(s.stateNode=u,en=s,ht=null,i=!0):i=!1),i||Li(s)),null;case 13:return pE(i,s,u);case 4:return je(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=La(s,null,h,u):nn(i,s,h,u),s.child;case 11:return aE(i,s,s.type,s.pendingProps,u);case 7:return nn(i,s,s.pendingProps,u),s.child;case 8:return nn(i,s,s.pendingProps.children,u),s.child;case 12:return nn(i,s,s.pendingProps.children,u),s.child;case 10:return h=s.pendingProps,Oi(s,s.type,h.value),nn(i,s,h.children,u),s.child;case 9:return g=s.type._context,h=s.pendingProps.children,Aa(s),g=tn(g),h=h(g),s.flags|=1,nn(i,s,h,u),s.child;case 14:return sE(i,s,s.type,s.pendingProps,u);case 15:return oE(i,s,s.type,s.pendingProps,u);case 19:return gE(i,s,u);case 31:return tR(i,s,u);case 22:return lE(i,s,u,s.pendingProps);case 24:return Aa(s),h=tn(Rt),i===null?(g=zh(),g===null&&(g=ct,E=Fh(),g.pooledCache=E,E.refCount++,E!==null&&(g.pooledCacheLanes|=u),g=E),s.memoizedState={parent:h,cache:g},Vh(s),Oi(s,Rt,g)):((i.lanes&u)!==0&&(qh(i,s),dl(s,null,null,u),cl()),g=i.memoizedState,E=s.memoizedState,g.parent!==h?(g={parent:h,cache:h},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),Oi(s,Rt,h)):(h=E.cache,Oi(s,Rt,h),h!==g.cache&&Hh(s,[Rt],u,!0))),nn(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function ri(i){i.flags|=4}function wp(i,s,u,h,g){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(g&335544128)===g)if(i.stateNode.complete)i.flags|=8192;else if(VE())i.flags|=8192;else throw Ra=dc,$h}else i.flags&=-16777217}function yE(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Dv(s))if(VE())i.flags|=8192;else throw Ra=dc,$h}function kc(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Vu():536870912,i.lanes|=s,Vs|=s)}function bl(i,s){if(!Qe)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function pt(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,h=0;if(s)for(var g=i.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags&65011712,h|=g.flags&65011712,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=u,s}function rR(i,s,u){var h=s.pendingProps;switch(Ih(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(s),null;case 1:return pt(s),null;case 3:return u=s.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Jr(Rt),ze(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ls(s)?ri(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ph())),pt(s),null;case 26:var g=s.type,E=s.memoizedState;return i===null?(ri(s),E!==null?(pt(s),yE(s,E)):(pt(s),wp(s,g,null,h,u))):E?E!==i.memoizedState?(ri(s),pt(s),yE(s,E)):(pt(s),s.flags&=-16777217):(i=i.memoizedProps,i!==h&&ri(s),pt(s),wp(s,g,i,h,u)),null;case 27:if(Xt(s),u=Se.current,g=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&ri(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return pt(s),null}i=fe.current,Ls(s)?K1(s):(i=Cv(g,h,u),s.stateNode=i,ri(s))}return pt(s),null;case 5:if(Xt(s),g=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&ri(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return pt(s),null}if(E=fe.current,Ls(s))K1(s);else{var S=$c(Se.current);switch(E){case 1:E=S.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:E=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":E=S.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":E=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":E=S.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof h.is=="string"?S.createElement("select",{is:h.is}):S.createElement("select"),h.multiple?E.multiple=!0:h.size&&(E.size=h.size);break;default:E=typeof h.is=="string"?S.createElement(g,{is:h.is}):S.createElement(g)}}E[Jt]=s,E[_n]=h;e:for(S=s.child;S!==null;){if(S.tag===5||S.tag===6)E.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===s)break e;for(;S.sibling===null;){if(S.return===null||S.return===s)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}s.stateNode=E;e:switch(rn(E,g,h),g){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ri(s)}}return pt(s),wp(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&ri(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=Se.current,Ls(s)){if(i=s.stateNode,u=s.memoizedProps,h=null,g=en,g!==null)switch(g.tag){case 27:case 5:h=g.memoizedProps}i[Jt]=s,i=!!(i.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||pv(i.nodeValue,u)),i||Li(s,!0)}else i=$c(i).createTextNode(h),i[Jt]=s,s.stateNode=i}return pt(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(h=Ls(s),u!==null){if(i===null){if(!h)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Jt]=s}else Ca(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;pt(s),i=!1}else u=Ph(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(Pn(s),s):(Pn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return pt(s),null;case 13:if(h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(g=Ls(s),h!==null&&h.dehydrated!==null){if(i===null){if(!g)throw Error(r(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[Jt]=s}else Ca(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;pt(s),g=!1}else g=Ph(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Pn(s),s):(Pn(s),null)}return Pn(s),(s.flags&128)!==0?(s.lanes=u,s):(u=h!==null,i=i!==null&&i.memoizedState!==null,u&&(h=s.child,g=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(g=h.alternate.memoizedState.cachePool.pool),E=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(E=h.memoizedState.cachePool.pool),E!==g&&(h.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),kc(s,s.updateQueue),pt(s),null);case 4:return ze(),i===null&&Qp(s.stateNode.containerInfo),pt(s),null;case 10:return Jr(s.type),pt(s),null;case 19:if(ae(wt),h=s.memoizedState,h===null)return pt(s),null;if(g=(s.flags&128)!==0,E=h.rendering,E===null)if(g)bl(h,!1);else{if(vt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=mc(i),E!==null){for(s.flags|=128,bl(h,!1),i=E.updateQueue,s.updateQueue=i,kc(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)G1(u,i),u=u.sibling;return D(wt,wt.current&1|2),Qe&&Kr(s,h.treeForkCount),s.child}i=i.sibling}h.tail!==null&&Pt()>Dc&&(s.flags|=128,g=!0,bl(h,!1),s.lanes=4194304)}else{if(!g)if(i=mc(E),i!==null){if(s.flags|=128,g=!0,i=i.updateQueue,s.updateQueue=i,kc(s,i),bl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!E.alternate&&!Qe)return pt(s),null}else 2*Pt()-h.renderingStartTime>Dc&&u!==536870912&&(s.flags|=128,g=!0,bl(h,!1),s.lanes=4194304);h.isBackwards?(E.sibling=s.child,s.child=E):(i=h.last,i!==null?i.sibling=E:s.child=E,h.last=E)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=Pt(),i.sibling=null,u=wt.current,D(wt,g?u&1|2:u&1),Qe&&Kr(s,h.treeForkCount),i):(pt(s),null);case 22:case 23:return Pn(s),Wh(),h=s.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(u&536870912)!==0&&(s.flags&128)===0&&(pt(s),s.subtreeFlags&6&&(s.flags|=8192)):pt(s),u=s.updateQueue,u!==null&&kc(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048),i!==null&&ae(ka),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Jr(Rt),pt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function iR(i,s){switch(Ih(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Jr(Rt),ze(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Xt(s),null;case 31:if(s.memoizedState!==null){if(Pn(s),s.alternate===null)throw Error(r(340));Ca()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Pn(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Ca()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ae(wt),null;case 4:return ze(),null;case 10:return Jr(s.type),null;case 22:case 23:return Pn(s),Wh(),i!==null&&ae(ka),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return Jr(Rt),null;case 25:return null;default:return null}}function EE(i,s){switch(Ih(s),s.tag){case 3:Jr(Rt),ze();break;case 26:case 27:case 5:Xt(s);break;case 4:ze();break;case 31:s.memoizedState!==null&&Pn(s);break;case 13:Pn(s);break;case 19:ae(wt);break;case 10:Jr(s.type);break;case 22:case 23:Pn(s),Wh(),i!==null&&ae(ka);break;case 24:Jr(Rt)}}function yl(i,s){try{var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var g=h.next;u=g;do{if((u.tag&i)===i){h=void 0;var E=u.create,S=u.inst;h=E(),S.destroy=h}u=u.next}while(u!==g)}}catch(R){at(s,s.return,R)}}function ji(i,s,u){try{var h=s.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var E=g.next;h=E;do{if((h.tag&i)===i){var S=h.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,g=s;var U=u,ee=R;try{ee()}catch(oe){at(g,U,oe)}}}h=h.next}while(h!==E)}}catch(oe){at(s,s.return,oe)}}function vE(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{cy(s,u)}catch(h){at(i,i.return,h)}}}function _E(i,s,u){u.props=Da(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(h){at(i,s,h)}}function El(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof u=="function"?i.refCleanup=u(h):u.current=h}}catch(g){at(i,s,g)}}function Ar(i,s){var u=i.ref,h=i.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(g){at(i,s,g)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){at(i,s,g)}else u.current=null}function xE(i){var s=i.type,u=i.memoizedProps,h=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(g){at(i,i.return,g)}}function Ap(i,s,u){try{var h=i.stateNode;wR(h,i.type,u,s),h[_n]=s}catch(g){at(i,i.return,g)}}function TE(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&qi(i.type)||i.tag===4}function kp(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||TE(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&qi(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Np(i,s,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=Qr));else if(h!==4&&(h===27&&qi(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(Np(i,s,u),i=i.sibling;i!==null;)Np(i,s,u),i=i.sibling}function Nc(i,s,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(h!==4&&(h===27&&qi(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Nc(i,s,u),i=i.sibling;i!==null;)Nc(i,s,u),i=i.sibling}function SE(i){var s=i.stateNode,u=i.memoizedProps;try{for(var h=i.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);rn(s,h,u),s[Jt]=i,s[_n]=u}catch(E){at(i,i.return,E)}}var ii=!1,Dt=!1,Rp=!1,CE=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function aR(i,s){if(i=i.containerInfo,Kp=Xc,i=B1(i),Th(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var g=h.anchorOffset,E=h.focusNode;h=h.focusOffset;try{u.nodeType,E.nodeType}catch{u=null;break e}var S=0,R=-1,U=-1,ee=0,oe=0,de=i,te=null;t:for(;;){for(var ne;de!==u||g!==0&&de.nodeType!==3||(R=S+g),de!==E||h!==0&&de.nodeType!==3||(U=S+h),de.nodeType===3&&(S+=de.nodeValue.length),(ne=de.firstChild)!==null;)te=de,de=ne;for(;;){if(de===i)break t;if(te===u&&++ee===g&&(R=S),te===E&&++oe===h&&(U=S),(ne=de.nextSibling)!==null)break;de=te,te=de.parentNode}de=ne}u=R===-1||U===-1?null:{start:R,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(Zp={focusedElem:i,selectionRange:u},Xc=!1,Vt=s;Vt!==null;)if(s=Vt,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Vt=i;else for(;Vt!==null;){switch(s=Vt,E=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)g=i[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&E!==null){i=void 0,u=s,g=E.memoizedProps,E=E.memoizedState,h=u.stateNode;try{var _e=Da(u.type,g);i=h.getSnapshotBeforeUpdate(_e,E),h.__reactInternalSnapshotBeforeUpdate=i}catch(Re){at(u,u.return,Re)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)tm(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":tm(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Vt=i;break}Vt=s.return}}function wE(i,s,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:si(i,u),h&4&&yl(5,u);break;case 1:if(si(i,u),h&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(S){at(u,u.return,S)}else{var g=Da(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(g,s,i.__reactInternalSnapshotBeforeUpdate)}catch(S){at(u,u.return,S)}}h&64&&vE(u),h&512&&El(u,u.return);break;case 3:if(si(i,u),h&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{cy(i,s)}catch(S){at(u,u.return,S)}}break;case 27:s===null&&h&4&&SE(u);case 26:case 5:si(i,u),s===null&&h&4&&xE(u),h&512&&El(u,u.return);break;case 12:si(i,u);break;case 31:si(i,u),h&4&&NE(i,u);break;case 13:si(i,u),h&4&&RE(i,u),h&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=pR.bind(null,u),IR(i,u))));break;case 22:if(h=u.memoizedState!==null||ii,!h){s=s!==null&&s.memoizedState!==null||Dt,g=ii;var E=Dt;ii=h,(Dt=s)&&!E?oi(i,u,(u.subtreeFlags&8772)!==0):si(i,u),ii=g,Dt=E}break;case 30:break;default:si(i,u)}}function AE(i){var s=i.alternate;s!==null&&(i.alternate=null,AE(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&sh(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var mt=null,Tn=!1;function ai(i,s,u){for(u=u.child;u!==null;)kE(i,s,u),u=u.sibling}function kE(i,s,u){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(Zt,u)}catch{}switch(u.tag){case 26:Dt||Ar(u,s),ai(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Dt||Ar(u,s);var h=mt,g=Tn;qi(u.type)&&(mt=u.stateNode,Tn=!1),ai(i,s,u),kl(u.stateNode),mt=h,Tn=g;break;case 5:Dt||Ar(u,s);case 6:if(h=mt,g=Tn,mt=null,ai(i,s,u),mt=h,Tn=g,mt!==null)if(Tn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(u.stateNode)}catch(E){at(u,s,E)}else try{mt.removeChild(u.stateNode)}catch(E){at(u,s,E)}break;case 18:mt!==null&&(Tn?(i=mt,vv(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Zs(i)):vv(mt,u.stateNode));break;case 4:h=mt,g=Tn,mt=u.stateNode.containerInfo,Tn=!0,ai(i,s,u),mt=h,Tn=g;break;case 0:case 11:case 14:case 15:ji(2,u,s),Dt||ji(4,u,s),ai(i,s,u);break;case 1:Dt||(Ar(u,s),h=u.stateNode,typeof h.componentWillUnmount=="function"&&_E(u,s,h)),ai(i,s,u);break;case 21:ai(i,s,u);break;case 22:Dt=(h=Dt)||u.memoizedState!==null,ai(i,s,u),Dt=h;break;default:ai(i,s,u)}}function NE(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Zs(i)}catch(u){at(s,s.return,u)}}}function RE(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Zs(i)}catch(u){at(s,s.return,u)}}function sR(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new CE),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new CE),s;default:throw Error(r(435,i.tag))}}function Rc(i,s){var u=sR(i);s.forEach(function(h){if(!u.has(h)){u.add(h);var g=mR.bind(null,i,h);h.then(g,g)}})}function Sn(i,s){var u=s.deletions;if(u!==null)for(var h=0;h<u.length;h++){var g=u[h],E=i,S=s,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(qi(R.type)){mt=R.stateNode,Tn=!1;break e}break;case 5:mt=R.stateNode,Tn=!1;break e;case 3:case 4:mt=R.stateNode.containerInfo,Tn=!0;break e}R=R.return}if(mt===null)throw Error(r(160));kE(E,S,g),mt=null,Tn=!1,E=g.alternate,E!==null&&(E.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)LE(s,i),s=s.sibling}var mr=null;function LE(i,s){var u=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Sn(s,i),Cn(i),h&4&&(ji(3,i,i.return),yl(3,i),ji(5,i,i.return));break;case 1:Sn(s,i),Cn(i),h&512&&(Dt||u===null||Ar(u,u.return)),h&64&&ii&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var g=mr;if(Sn(s,i),Cn(i),h&512&&(Dt||u===null||Ar(u,u.return)),h&4){var E=u!==null?u.memoizedState:null;if(h=i.memoizedState,u===null)if(h===null)if(i.stateNode===null){e:{h=i.type,u=i.memoizedProps,g=g.ownerDocument||g;t:switch(h){case"title":E=g.getElementsByTagName("title")[0],(!E||E[Go]||E[Jt]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=g.createElement(h),g.head.insertBefore(E,g.querySelector("head > title"))),rn(E,h,u),E[Jt]=i,$t(E),h=E;break e;case"link":var S=Lv("link","href",g).get(h+(u.href||""));if(S){for(var R=0;R<S.length;R++)if(E=S[R],E.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&E.getAttribute("rel")===(u.rel==null?null:u.rel)&&E.getAttribute("title")===(u.title==null?null:u.title)&&E.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){S.splice(R,1);break t}}E=g.createElement(h),rn(E,h,u),g.head.appendChild(E);break;case"meta":if(S=Lv("meta","content",g).get(h+(u.content||""))){for(R=0;R<S.length;R++)if(E=S[R],E.getAttribute("content")===(u.content==null?null:""+u.content)&&E.getAttribute("name")===(u.name==null?null:u.name)&&E.getAttribute("property")===(u.property==null?null:u.property)&&E.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&E.getAttribute("charset")===(u.charSet==null?null:u.charSet)){S.splice(R,1);break t}}E=g.createElement(h),rn(E,h,u),g.head.appendChild(E);break;default:throw Error(r(468,h))}E[Jt]=i,$t(E),h=E}i.stateNode=h}else Ov(g,i.type,i.stateNode);else i.stateNode=Rv(g,h,i.memoizedProps);else E!==h?(E===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):E.count--,h===null?Ov(g,i.type,i.stateNode):Rv(g,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Ap(i,i.memoizedProps,u.memoizedProps)}break;case 27:Sn(s,i),Cn(i),h&512&&(Dt||u===null||Ar(u,u.return)),u!==null&&h&4&&Ap(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Sn(s,i),Cn(i),h&512&&(Dt||u===null||Ar(u,u.return)),i.flags&32){g=i.stateNode;try{_s(g,"")}catch(_e){at(i,i.return,_e)}}h&4&&i.stateNode!=null&&(g=i.memoizedProps,Ap(i,g,u!==null?u.memoizedProps:g)),h&1024&&(Rp=!0);break;case 6:if(Sn(s,i),Cn(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,u=i.stateNode;try{u.nodeValue=h}catch(_e){at(i,i.return,_e)}}break;case 3:if(Gc=null,g=mr,mr=Vc(s.containerInfo),Sn(s,i),mr=g,Cn(i),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Zs(s.containerInfo)}catch(_e){at(i,i.return,_e)}Rp&&(Rp=!1,OE(i));break;case 4:h=mr,mr=Vc(i.stateNode.containerInfo),Sn(s,i),Cn(i),mr=h;break;case 12:Sn(s,i),Cn(i);break;case 31:Sn(s,i),Cn(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rc(i,h)));break;case 13:Sn(s,i),Cn(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Oc=Pt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rc(i,h)));break;case 22:g=i.memoizedState!==null;var U=u!==null&&u.memoizedState!==null,ee=ii,oe=Dt;if(ii=ee||g,Dt=oe||U,Sn(s,i),Dt=oe,ii=ee,Cn(i),h&8192)e:for(s=i.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||U||ii||Dt||Ia(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){U=u=s;try{if(E=U.stateNode,g)S=E.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=U.stateNode;var de=U.memoizedProps.style,te=de!=null&&de.hasOwnProperty("display")?de.display:null;R.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(_e){at(U,U.return,_e)}}}else if(s.tag===6){if(u===null){U=s;try{U.stateNode.nodeValue=g?"":U.memoizedProps}catch(_e){at(U,U.return,_e)}}}else if(s.tag===18){if(u===null){U=s;try{var ne=U.stateNode;g?_v(ne,!0):_v(U.stateNode,!1)}catch(_e){at(U,U.return,_e)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=i.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Rc(i,u))));break;case 19:Sn(s,i),Cn(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rc(i,h)));break;case 30:break;case 21:break;default:Sn(s,i),Cn(i)}}function Cn(i){var s=i.flags;if(s&2){try{for(var u,h=i.return;h!==null;){if(TE(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,E=kp(i);Nc(i,E,g);break;case 5:var S=u.stateNode;u.flags&32&&(_s(S,""),u.flags&=-33);var R=kp(i);Nc(i,R,S);break;case 3:case 4:var U=u.stateNode.containerInfo,ee=kp(i);Np(i,ee,U);break;default:throw Error(r(161))}}catch(oe){at(i,i.return,oe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function OE(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;OE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function si(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)wE(i,s.alternate,s),s=s.sibling}function Ia(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:ji(4,s,s.return),Ia(s);break;case 1:Ar(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&_E(s,s.return,u),Ia(s);break;case 27:kl(s.stateNode);case 26:case 5:Ar(s,s.return),Ia(s);break;case 22:s.memoizedState===null&&Ia(s);break;case 30:Ia(s);break;default:Ia(s)}i=i.sibling}}function oi(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,g=i,E=s,S=E.flags;switch(E.tag){case 0:case 11:case 15:oi(g,E,u),yl(4,E);break;case 1:if(oi(g,E,u),h=E,g=h.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(ee){at(h,h.return,ee)}if(h=E,g=h.updateQueue,g!==null){var R=h.stateNode;try{var U=g.shared.hiddenCallbacks;if(U!==null)for(g.shared.hiddenCallbacks=null,g=0;g<U.length;g++)uy(U[g],R)}catch(ee){at(h,h.return,ee)}}u&&S&64&&vE(E),El(E,E.return);break;case 27:SE(E);case 26:case 5:oi(g,E,u),u&&h===null&&S&4&&xE(E),El(E,E.return);break;case 12:oi(g,E,u);break;case 31:oi(g,E,u),u&&S&4&&NE(g,E);break;case 13:oi(g,E,u),u&&S&4&&RE(g,E);break;case 22:E.memoizedState===null&&oi(g,E,u),El(E,E.return);break;case 30:break;default:oi(g,E,u)}s=s.sibling}}function Lp(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&al(u))}function Op(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&al(i))}function gr(i,s,u,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)DE(i,s,u,h),s=s.sibling}function DE(i,s,u,h){var g=s.flags;switch(s.tag){case 0:case 11:case 15:gr(i,s,u,h),g&2048&&yl(9,s);break;case 1:gr(i,s,u,h);break;case 3:gr(i,s,u,h),g&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&al(i)));break;case 12:if(g&2048){gr(i,s,u,h),i=s.stateNode;try{var E=s.memoizedProps,S=E.id,R=E.onPostCommit;typeof R=="function"&&R(S,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(U){at(s,s.return,U)}}else gr(i,s,u,h);break;case 31:gr(i,s,u,h);break;case 13:gr(i,s,u,h);break;case 23:break;case 22:E=s.stateNode,S=s.alternate,s.memoizedState!==null?E._visibility&2?gr(i,s,u,h):vl(i,s):E._visibility&2?gr(i,s,u,h):(E._visibility|=2,Us(i,s,u,h,(s.subtreeFlags&10256)!==0||!1)),g&2048&&Lp(S,s);break;case 24:gr(i,s,u,h),g&2048&&Op(s.alternate,s);break;default:gr(i,s,u,h)}}function Us(i,s,u,h,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var E=i,S=s,R=u,U=h,ee=S.flags;switch(S.tag){case 0:case 11:case 15:Us(E,S,R,U,g),yl(8,S);break;case 23:break;case 22:var oe=S.stateNode;S.memoizedState!==null?oe._visibility&2?Us(E,S,R,U,g):vl(E,S):(oe._visibility|=2,Us(E,S,R,U,g)),g&&ee&2048&&Lp(S.alternate,S);break;case 24:Us(E,S,R,U,g),g&&ee&2048&&Op(S.alternate,S);break;default:Us(E,S,R,U,g)}s=s.sibling}}function vl(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,h=s,g=h.flags;switch(h.tag){case 22:vl(u,h),g&2048&&Lp(h.alternate,h);break;case 24:vl(u,h),g&2048&&Op(h.alternate,h);break;default:vl(u,h)}s=s.sibling}}var _l=8192;function zs(i,s,u){if(i.subtreeFlags&_l)for(i=i.child;i!==null;)IE(i,s,u),i=i.sibling}function IE(i,s,u){switch(i.tag){case 26:zs(i,s,u),i.flags&_l&&i.memoizedState!==null&&GR(u,mr,i.memoizedState,i.memoizedProps);break;case 5:zs(i,s,u);break;case 3:case 4:var h=mr;mr=Vc(i.stateNode.containerInfo),zs(i,s,u),mr=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=_l,_l=16777216,zs(i,s,u),_l=h):zs(i,s,u));break;default:zs(i,s,u)}}function ME(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function xl(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];Vt=h,BE(h,i)}ME(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)PE(i),i=i.sibling}function PE(i){switch(i.tag){case 0:case 11:case 15:xl(i),i.flags&2048&&ji(9,i,i.return);break;case 3:xl(i);break;case 12:xl(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,Lc(i)):xl(i);break;default:xl(i)}}function Lc(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];Vt=h,BE(h,i)}ME(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:ji(8,s,s.return),Lc(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Lc(s));break;default:Lc(s)}i=i.sibling}}function BE(i,s){for(;Vt!==null;){var u=Vt;switch(u.tag){case 0:case 11:case 15:ji(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:al(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Vt=h;else e:for(u=i;Vt!==null;){h=Vt;var g=h.sibling,E=h.return;if(AE(h),h===u){Vt=null;break e}if(g!==null){g.return=E,Vt=g;break e}Vt=E}}}var oR={getCacheForType:function(i){var s=tn(Rt),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return tn(Rt).controller.signal}},lR=typeof WeakMap=="function"?WeakMap:Map,tt=0,ct=null,$e=null,Ge=0,it=0,Bn=null,Hi=!1,$s=!1,Dp=!1,li=0,vt=0,Fi=0,Ma=0,Ip=0,jn=0,Vs=0,Tl=null,wn=null,Mp=!1,Oc=0,jE=0,Dc=1/0,Ic=null,Ui=null,Bt=0,zi=null,qs=null,ui=0,Pp=0,Bp=null,HE=null,Sl=0,jp=null;function Hn(){return(tt&2)!==0&&Ge!==0?Ge&-Ge:B.T!==null?Vp():t1()}function FE(){if(jn===0)if((Ge&536870912)===0||Qe){var i=cs;cs<<=1,(cs&3932160)===0&&(cs=262144),jn=i}else jn=536870912;return i=Mn.current,i!==null&&(i.flags|=32),jn}function An(i,s,u){(i===ct&&(it===2||it===9)||i.cancelPendingCommit!==null)&&(Gs(i,0),$i(i,Ge,jn,!1)),He(i,u),((tt&2)===0||i!==ct)&&(i===ct&&((tt&2)===0&&(Ma|=u),vt===4&&$i(i,Ge,jn,!1)),kr(i))}function UE(i,s,u){if((tt&6)!==0)throw Error(r(327));var h=!u&&(s&127)===0&&(s&i.expiredLanes)===0||ya(i,s),g=h?dR(i,s):Fp(i,s,!0),E=h;do{if(g===0){$s&&!h&&$i(i,s,0,!1);break}else{if(u=i.current.alternate,E&&!uR(u)){g=Fp(i,s,!1),E=!1;continue}if(g===2){if(E=s,i.errorRecoveryDisabledLanes&E)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){s=S;e:{var R=i;g=Tl;var U=R.current.memoizedState.isDehydrated;if(U&&(Gs(R,S).flags|=256),S=Fp(R,S,!1),S!==2){if(Dp&&!U){R.errorRecoveryDisabledLanes|=E,Ma|=E,g=4;break e}E=wn,wn=g,E!==null&&(wn===null?wn=E:wn.push.apply(wn,E))}g=S}if(E=!1,g!==2)continue}}if(g===1){Gs(i,0),$i(i,s,0,!0);break}e:{switch(h=i,E=g,E){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:$i(h,s,jn,!Hi);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(g=Oc+300-Pt(),10<g)){if($i(h,s,jn,!Hi),fs(h,0,!0)!==0)break e;ui=s,h.timeoutHandle=yv(zE.bind(null,h,u,wn,Ic,Mp,s,jn,Ma,Vs,Hi,E,"Throttled",-0,0),g);break e}zE(h,u,wn,Ic,Mp,s,jn,Ma,Vs,Hi,E,null,-0,0)}}break}while(!0);kr(i)}function zE(i,s,u,h,g,E,S,R,U,ee,oe,de,te,ne){if(i.timeoutHandle=-1,de=s.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},IE(s,E,de);var _e=(E&62914560)===E?Oc-Pt():(E&4194048)===E?jE-Pt():0;if(_e=YR(de,_e),_e!==null){ui=E,i.cancelPendingCommit=_e(XE.bind(null,i,s,E,u,h,g,S,R,U,oe,de,null,te,ne)),$i(i,E,S,!ee);return}}XE(i,s,E,u,h,g,S,R,U)}function uR(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var g=u[h],E=g.getSnapshot;g=g.value;try{if(!Dn(E(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function $i(i,s,u,h){s&=~Ip,s&=~Ma,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var g=s;0<g;){var E=31-rt(g),S=1<<E;h[E]=-1,g&=~S}u!==0&&wi(i,u,s)}function Mc(){return(tt&6)===0?(Cl(0),!1):!0}function Hp(){if($e!==null){if(it===0)var i=$e.return;else i=$e,Zr=wa=null,tp(i),Ps=null,ol=0,i=$e;for(;i!==null;)EE(i.alternate,i),i=i.return;$e=null}}function Gs(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,NR(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ui=0,Hp(),ct=i,$e=u=Xr(i.current,null),Ge=s,it=0,Bn=null,Hi=!1,$s=ya(i,s),Dp=!1,Vs=jn=Ip=Ma=Fi=vt=0,wn=Tl=null,Mp=!1,(s&8)!==0&&(s|=s&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=s;0<h;){var g=31-rt(h),E=1<<g;s|=i[g],h&=~E}return li=s,nc(),u}function $E(i,s){Ie=null,B.H=ml,s===Ms||s===cc?(s=ay(),it=3):s===$h?(s=ay(),it=4):it=s===bp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Bn=s,$e===null&&(vt=1,Sc(i,Xn(s,i.current)))}function VE(){var i=Mn.current;return i===null?!0:(Ge&4194048)===Ge?er===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?i===er:!1}function qE(){var i=B.H;return B.H=ml,i===null?ml:i}function GE(){var i=B.A;return B.A=oR,i}function Pc(){vt=4,Hi||(Ge&4194048)!==Ge&&Mn.current!==null||($s=!0),(Fi&134217727)===0&&(Ma&134217727)===0||ct===null||$i(ct,Ge,jn,!1)}function Fp(i,s,u){var h=tt;tt|=2;var g=qE(),E=GE();(ct!==i||Ge!==s)&&(Ic=null,Gs(i,s)),s=!1;var S=vt;e:do try{if(it!==0&&$e!==null){var R=$e,U=Bn;switch(it){case 8:Hp(),S=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(s=!0);var ee=it;if(it=0,Bn=null,Ys(i,R,U,ee),u&&$s){S=0;break e}break;default:ee=it,it=0,Bn=null,Ys(i,R,U,ee)}}cR(),S=vt;break}catch(oe){$E(i,oe)}while(!0);return s&&i.shellSuspendCounter++,Zr=wa=null,tt=h,B.H=g,B.A=E,$e===null&&(ct=null,Ge=0,nc()),S}function cR(){for(;$e!==null;)YE($e)}function dR(i,s){var u=tt;tt|=2;var h=qE(),g=GE();ct!==i||Ge!==s?(Ic=null,Dc=Pt()+500,Gs(i,s)):$s=ya(i,s);e:do try{if(it!==0&&$e!==null){s=$e;var E=Bn;t:switch(it){case 1:it=0,Bn=null,Ys(i,s,E,1);break;case 2:case 9:if(ry(E)){it=0,Bn=null,QE(s);break}s=function(){it!==2&&it!==9||ct!==i||(it=7),kr(i)},E.then(s,s);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:ry(E)?(it=0,Bn=null,QE(s)):(it=0,Bn=null,Ys(i,s,E,7));break;case 5:var S=null;switch($e.tag){case 26:S=$e.memoizedState;case 5:case 27:var R=$e;if(S?Dv(S):R.stateNode.complete){it=0,Bn=null;var U=R.sibling;if(U!==null)$e=U;else{var ee=R.return;ee!==null?($e=ee,Bc(ee)):$e=null}break t}}it=0,Bn=null,Ys(i,s,E,5);break;case 6:it=0,Bn=null,Ys(i,s,E,6);break;case 8:Hp(),vt=6;break e;default:throw Error(r(462))}}fR();break}catch(oe){$E(i,oe)}while(!0);return Zr=wa=null,B.H=h,B.A=g,tt=u,$e!==null?0:(ct=null,Ge=0,nc(),vt)}function fR(){for(;$e!==null&&!qr();)YE($e)}function YE(i){var s=bE(i.alternate,i,li);i.memoizedProps=i.pendingProps,s===null?Bc(i):$e=s}function QE(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=dE(u,s,s.pendingProps,s.type,void 0,Ge);break;case 11:s=dE(u,s,s.pendingProps,s.type.render,s.ref,Ge);break;case 5:tp(s);default:EE(u,s),s=$e=G1(s,li),s=bE(u,s,li)}i.memoizedProps=i.pendingProps,s===null?Bc(i):$e=s}function Ys(i,s,u,h){Zr=wa=null,tp(s),Ps=null,ol=0;var g=s.return;try{if(eR(i,g,s,u,Ge)){vt=1,Sc(i,Xn(u,i.current)),$e=null;return}}catch(E){if(g!==null)throw $e=g,E;vt=1,Sc(i,Xn(u,i.current)),$e=null;return}s.flags&32768?(Qe||h===1?i=!0:$s||(Ge&536870912)!==0?i=!1:(Hi=i=!0,(h===2||h===9||h===3||h===6)&&(h=Mn.current,h!==null&&h.tag===13&&(h.flags|=16384))),WE(s,i)):Bc(s)}function Bc(i){var s=i;do{if((s.flags&32768)!==0){WE(s,Hi);return}i=s.return;var u=rR(s.alternate,s,li);if(u!==null){$e=u;return}if(s=s.sibling,s!==null){$e=s;return}$e=s=i}while(s!==null);vt===0&&(vt=5)}function WE(i,s){do{var u=iR(i.alternate,i);if(u!==null){u.flags&=32767,$e=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){$e=i;return}$e=i=u}while(i!==null);vt=6,$e=null}function XE(i,s,u,h,g,E,S,R,U){i.cancelPendingCommit=null;do jc();while(Bt!==0);if((tt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(E=s.lanes|s.childLanes,E|=kh,Ct(i,u,E,S,R,U),i===ct&&($e=ct=null,Ge=0),qs=s,zi=i,ui=u,Pp=E,Bp=g,HE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,gR(Ne,function(){return tv(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,g=Q.p,Q.p=2,S=tt,tt|=4;try{aR(i,s,u)}finally{tt=S,Q.p=g,B.T=h}}Bt=1,KE(),ZE(),JE()}}function KE(){if(Bt===1){Bt=0;var i=zi,s=qs,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=B.T,B.T=null;var h=Q.p;Q.p=2;var g=tt;tt|=4;try{LE(s,i);var E=Zp,S=B1(i.containerInfo),R=E.focusedElem,U=E.selectionRange;if(S!==R&&R&&R.ownerDocument&&P1(R.ownerDocument.documentElement,R)){if(U!==null&&Th(R)){var ee=U.start,oe=U.end;if(oe===void 0&&(oe=ee),"selectionStart"in R)R.selectionStart=ee,R.selectionEnd=Math.min(oe,R.value.length);else{var de=R.ownerDocument||document,te=de&&de.defaultView||window;if(te.getSelection){var ne=te.getSelection(),_e=R.textContent.length,Re=Math.min(U.start,_e),lt=U.end===void 0?Re:Math.min(U.end,_e);!ne.extend&&Re>lt&&(S=lt,lt=Re,Re=S);var Y=M1(R,Re),q=M1(R,lt);if(Y&&q&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var J=de.createRange();J.setStart(Y.node,Y.offset),ne.removeAllRanges(),Re>lt?(ne.addRange(J),ne.extend(q.node,q.offset)):(J.setEnd(q.node,q.offset),ne.addRange(J))}}}}for(de=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&de.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<de.length;R++){var ce=de[R];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Xc=!!Kp,Zp=Kp=null}finally{tt=g,Q.p=h,B.T=u}}i.current=s,Bt=2}}function ZE(){if(Bt===2){Bt=0;var i=zi,s=qs,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=B.T,B.T=null;var h=Q.p;Q.p=2;var g=tt;tt|=4;try{wE(i,s.alternate,s)}finally{tt=g,Q.p=h,B.T=u}}Bt=3}}function JE(){if(Bt===4||Bt===3){Bt=0,fr();var i=zi,s=qs,u=ui,h=HE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Bt=5:(Bt=0,qs=zi=null,ev(i,i.pendingLanes));var g=i.pendingLanes;if(g===0&&(Ui=null),ih(u),s=s.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(Zt,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,g=Q.p,Q.p=2,B.T=null;try{for(var E=i.onRecoverableError,S=0;S<h.length;S++){var R=h[S];E(R.value,{componentStack:R.stack})}}finally{B.T=s,Q.p=g}}(ui&3)!==0&&jc(),kr(i),g=i.pendingLanes,(u&261930)!==0&&(g&42)!==0?i===jp?Sl++:(Sl=0,jp=i):Sl=0,Cl(0)}}function ev(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,al(s)))}function jc(){return KE(),ZE(),JE(),tv()}function tv(){if(Bt!==5)return!1;var i=zi,s=Pp;Pp=0;var u=ih(ui),h=B.T,g=Q.p;try{Q.p=32>u?32:u,B.T=null,u=Bp,Bp=null;var E=zi,S=ui;if(Bt=0,qs=zi=null,ui=0,(tt&6)!==0)throw Error(r(331));var R=tt;if(tt|=4,PE(E.current),DE(E,E.current,S,u),tt=R,Cl(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(Zt,E)}catch{}return!0}finally{Q.p=g,B.T=h,ev(i,s)}}function nv(i,s,u){s=Xn(u,s),s=gp(i.stateNode,s,2),i=Mi(i,s,2),i!==null&&(He(i,2),kr(i))}function at(i,s,u){if(i.tag===3)nv(i,i,u);else for(;s!==null;){if(s.tag===3){nv(s,i,u);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ui===null||!Ui.has(h))){i=Xn(u,i),u=rE(2),h=Mi(s,u,2),h!==null&&(iE(u,h,s,i),He(h,2),kr(h));break}}s=s.return}}function Up(i,s,u){var h=i.pingCache;if(h===null){h=i.pingCache=new lR;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(u)||(Dp=!0,g.add(u),i=hR.bind(null,i,s,u),s.then(i,i))}function hR(i,s,u){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,ct===i&&(Ge&u)===u&&(vt===4||vt===3&&(Ge&62914560)===Ge&&300>Pt()-Oc?(tt&2)===0&&Gs(i,0):Ip|=u,Vs===Ge&&(Vs=0)),kr(i)}function rv(i,s){s===0&&(s=Vu()),i=Ta(i,s),i!==null&&(He(i,s),kr(i))}function pR(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),rv(i,u)}function mR(i,s){var u=0;switch(i.tag){case 31:case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(u=g.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),rv(i,u)}function gR(i,s){return En(i,s)}var Hc=null,Qs=null,zp=!1,Fc=!1,$p=!1,Vi=0;function kr(i){i!==Qs&&i.next===null&&(Qs===null?Hc=Qs=i:Qs=Qs.next=i),Fc=!0,zp||(zp=!0,yR())}function Cl(i,s){if(!$p&&Fc){$p=!0;do for(var u=!1,h=Hc;h!==null;){if(i!==0){var g=h.pendingLanes;if(g===0)var E=0;else{var S=h.suspendedLanes,R=h.pingedLanes;E=(1<<31-rt(42|i)+1)-1,E&=g&~(S&~R),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(u=!0,ov(h,E))}else E=Ge,E=fs(h,h===ct?E:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(E&3)===0||ya(h,E)||(u=!0,ov(h,E));h=h.next}while(u);$p=!1}}function bR(){iv()}function iv(){Fc=zp=!1;var i=0;Vi!==0&&kR()&&(i=Vi);for(var s=Pt(),u=null,h=Hc;h!==null;){var g=h.next,E=av(h,s);E===0?(h.next=null,u===null?Hc=g:u.next=g,g===null&&(Qs=u)):(u=h,(i!==0||(E&3)!==0)&&(Fc=!0)),h=g}Bt!==0&&Bt!==5||Cl(i),Vi!==0&&(Vi=0)}function av(i,s){for(var u=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,E=i.pendingLanes&-62914561;0<E;){var S=31-rt(E),R=1<<S,U=g[S];U===-1?((R&u)===0||(R&h)!==0)&&(g[S]=rh(R,s)):U<=s&&(i.expiredLanes|=R),E&=~R}if(s=ct,u=Ge,u=fs(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,u===0||i===s&&(it===2||it===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&vn(h),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||ya(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(h!==null&&vn(h),ih(u)){case 2:case 8:u=ye;break;case 32:u=Ne;break;case 268435456:u=Ke;break;default:u=Ne}return h=sv.bind(null,i),u=En(u,h),i.callbackPriority=s,i.callbackNode=u,s}return h!==null&&h!==null&&vn(h),i.callbackPriority=2,i.callbackNode=null,2}function sv(i,s){if(Bt!==0&&Bt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(jc()&&i.callbackNode!==u)return null;var h=Ge;return h=fs(i,i===ct?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(UE(i,h,s),av(i,Pt()),i.callbackNode!=null&&i.callbackNode===u?sv.bind(null,i):null)}function ov(i,s){if(jc())return null;UE(i,s,!0)}function yR(){RR(function(){(tt&6)!==0?En(le,bR):iv()})}function Vp(){if(Vi===0){var i=Ds;i===0&&(i=us,us<<=1,(us&261888)===0&&(us=256)),Vi=i}return Vi}function lv(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Qu(""+i)}function uv(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function ER(i,s,u,h,g){if(s==="submit"&&u&&u.stateNode===g){var E=lv((g[_n]||null).action),S=h.submitter;S&&(s=(s=S[_n]||null)?lv(s.formAction):S.getAttribute("formAction"),s!==null&&(E=s,S=null));var R=new Zu("action","action",null,h,g);i.push({event:R,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Vi!==0){var U=S?uv(g,S):new FormData(g);cp(u,{pending:!0,data:U,method:g.method,action:E},null,U)}}else typeof E=="function"&&(R.preventDefault(),U=S?uv(g,S):new FormData(g),cp(u,{pending:!0,data:U,method:g.method,action:E},E,U))},currentTarget:g}]})}}for(var qp=0;qp<Ah.length;qp++){var Gp=Ah[qp],vR=Gp.toLowerCase(),_R=Gp[0].toUpperCase()+Gp.slice(1);pr(vR,"on"+_R)}pr(F1,"onAnimationEnd"),pr(U1,"onAnimationIteration"),pr(z1,"onAnimationStart"),pr("dblclick","onDoubleClick"),pr("focusin","onFocus"),pr("focusout","onBlur"),pr(BN,"onTransitionRun"),pr(jN,"onTransitionStart"),pr(HN,"onTransitionCancel"),pr($1,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wl));function cv(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var h=i[u],g=h.event;h=h.listeners;e:{var E=void 0;if(s)for(var S=h.length-1;0<=S;S--){var R=h[S],U=R.instance,ee=R.currentTarget;if(R=R.listener,U!==E&&g.isPropagationStopped())break e;E=R,g.currentTarget=ee;try{E(g)}catch(oe){tc(oe)}g.currentTarget=null,E=U}else for(S=0;S<h.length;S++){if(R=h[S],U=R.instance,ee=R.currentTarget,R=R.listener,U!==E&&g.isPropagationStopped())break e;E=R,g.currentTarget=ee;try{E(g)}catch(oe){tc(oe)}g.currentTarget=null,E=U}}}}function Ve(i,s){var u=s[ah];u===void 0&&(u=s[ah]=new Set);var h=i+"__bubble";u.has(h)||(dv(s,i,2,!1),u.add(h))}function Yp(i,s,u){var h=0;s&&(h|=4),dv(u,i,h,s)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function Qp(i){if(!i[Uc]){i[Uc]=!0,i1.forEach(function(u){u!=="selectionchange"&&(xR.has(u)||Yp(u,!1,i),Yp(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Uc]||(s[Uc]=!0,Yp("selectionchange",!1,s))}}function dv(i,s,u,h){switch(Fv(s)){case 2:var g=XR;break;case 8:g=KR;break;default:g=um}u=g.bind(null,s,u,i),g=void 0,!ph||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,u,{capture:!0,passive:g}):i.addEventListener(s,u,!0):g!==void 0?i.addEventListener(s,u,{passive:g}):i.addEventListener(s,u,!1)}function Wp(i,s,u,h,g){var E=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var R=h.stateNode.containerInfo;if(R===g)break;if(S===4)for(S=h.return;S!==null;){var U=S.tag;if((U===3||U===4)&&S.stateNode.containerInfo===g)return;S=S.return}for(;R!==null;){if(S=gs(R),S===null)return;if(U=S.tag,U===5||U===6||U===26||U===27){h=E=S;continue e}R=R.parentNode}}h=h.return}g1(function(){var ee=E,oe=fh(u),de=[];e:{var te=V1.get(i);if(te!==void 0){var ne=Zu,_e=i;switch(i){case"keypress":if(Xu(u)===0)break e;case"keydown":case"keyup":ne=mN;break;case"focusin":_e="focus",ne=yh;break;case"focusout":_e="blur",ne=yh;break;case"beforeblur":case"afterblur":ne=yh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=E1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=rN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=yN;break;case F1:case U1:case z1:ne=sN;break;case $1:ne=vN;break;case"scroll":case"scrollend":ne=tN;break;case"wheel":ne=xN;break;case"copy":case"cut":case"paste":ne=lN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=_1;break;case"toggle":case"beforetoggle":ne=SN}var Re=(s&4)!==0,lt=!Re&&(i==="scroll"||i==="scrollend"),Y=Re?te!==null?te+"Capture":null:te;Re=[];for(var q=ee,J;q!==null;){var ce=q;if(J=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||J===null||Y===null||(ce=Qo(q,Y),ce!=null&&Re.push(Al(q,ce,J))),lt)break;q=q.return}0<Re.length&&(te=new ne(te,_e,null,u,oe),de.push({event:te,listeners:Re}))}}if((s&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",ne=i==="mouseout"||i==="pointerout",te&&u!==dh&&(_e=u.relatedTarget||u.fromElement)&&(gs(_e)||_e[ms]))break e;if((ne||te)&&(te=oe.window===oe?oe:(te=oe.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(_e=u.relatedTarget||u.toElement,ne=ee,_e=_e?gs(_e):null,_e!==null&&(lt=o(_e),Re=_e.tag,_e!==lt||Re!==5&&Re!==27&&Re!==6)&&(_e=null)):(ne=null,_e=ee),ne!==_e)){if(Re=E1,ce="onMouseLeave",Y="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Re=_1,ce="onPointerLeave",Y="onPointerEnter",q="pointer"),lt=ne==null?te:Yo(ne),J=_e==null?te:Yo(_e),te=new Re(ce,q+"leave",ne,u,oe),te.target=lt,te.relatedTarget=J,ce=null,gs(oe)===ee&&(Re=new Re(Y,q+"enter",_e,u,oe),Re.target=J,Re.relatedTarget=lt,ce=Re),lt=ce,ne&&_e)t:{for(Re=TR,Y=ne,q=_e,J=0,ce=Y;ce;ce=Re(ce))J++;ce=0;for(var Ae=q;Ae;Ae=Re(Ae))ce++;for(;0<J-ce;)Y=Re(Y),J--;for(;0<ce-J;)q=Re(q),ce--;for(;J--;){if(Y===q||q!==null&&Y===q.alternate){Re=Y;break t}Y=Re(Y),q=Re(q)}Re=null}else Re=null;ne!==null&&fv(de,te,ne,Re,!1),_e!==null&<!==null&&fv(de,lt,_e,Re,!0)}}e:{if(te=ee?Yo(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ze=N1;else if(A1(te))if(R1)Ze=IN;else{Ze=ON;var Ce=LN}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&ch(ee.elementType)&&(Ze=N1):Ze=DN;if(Ze&&(Ze=Ze(i,ee))){k1(de,Ze,u,oe);break e}Ce&&Ce(i,te,ee),i==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&uh(te,"number",te.value)}switch(Ce=ee?Yo(ee):window,i){case"focusin":(A1(Ce)||Ce.contentEditable==="true")&&(Cs=Ce,Sh=ee,nl=null);break;case"focusout":nl=Sh=Cs=null;break;case"mousedown":Ch=!0;break;case"contextmenu":case"mouseup":case"dragend":Ch=!1,j1(de,u,oe);break;case"selectionchange":if(PN)break;case"keydown":case"keyup":j1(de,u,oe)}var Pe;if(vh)e:{switch(i){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Ss?C1(i,u)&&(Ye="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Ye="onCompositionStart");Ye&&(x1&&u.locale!=="ko"&&(Ss||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ss&&(Pe=b1()):(ki=oe,mh="value"in ki?ki.value:ki.textContent,Ss=!0)),Ce=zc(ee,Ye),0<Ce.length&&(Ye=new v1(Ye,i,null,u,oe),de.push({event:Ye,listeners:Ce}),Pe?Ye.data=Pe:(Pe=w1(u),Pe!==null&&(Ye.data=Pe)))),(Pe=wN?AN(i,u):kN(i,u))&&(Ye=zc(ee,"onBeforeInput"),0<Ye.length&&(Ce=new v1("onBeforeInput","beforeinput",null,u,oe),de.push({event:Ce,listeners:Ye}),Ce.data=Pe)),ER(de,i,ee,u,oe)}cv(de,s)})}function Al(i,s,u){return{instance:i,listener:s,currentTarget:u}}function zc(i,s){for(var u=s+"Capture",h=[];i!==null;){var g=i,E=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||E===null||(g=Qo(i,u),g!=null&&h.unshift(Al(i,g,E)),g=Qo(i,s),g!=null&&h.push(Al(i,g,E))),i.tag===3)return h;i=i.return}return[]}function TR(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function fv(i,s,u,h,g){for(var E=s._reactName,S=[];u!==null&&u!==h;){var R=u,U=R.alternate,ee=R.stateNode;if(R=R.tag,U!==null&&U===h)break;R!==5&&R!==26&&R!==27||ee===null||(U=ee,g?(ee=Qo(u,E),ee!=null&&S.unshift(Al(u,ee,U))):g||(ee=Qo(u,E),ee!=null&&S.push(Al(u,ee,U)))),u=u.return}S.length!==0&&i.push({event:s,listeners:S})}var SR=/\r\n?/g,CR=/\u0000|\uFFFD/g;function hv(i){return(typeof i=="string"?i:""+i).replace(SR,`
|
|
10
|
+
`).replace(CR,"")}function pv(i,s){return s=hv(s),hv(i)===s}function ot(i,s,u,h,g,E){switch(u){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||_s(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&_s(i,""+h);break;case"className":Gu(i,"class",h);break;case"tabIndex":Gu(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Gu(i,u,h);break;case"style":p1(i,h,E);break;case"data":if(s!=="object"){Gu(i,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Qu(""+h),i.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(u==="formAction"?(s!=="input"&&ot(i,s,"name",g.name,g,null),ot(i,s,"formEncType",g.formEncType,g,null),ot(i,s,"formMethod",g.formMethod,g,null),ot(i,s,"formTarget",g.formTarget,g,null)):(ot(i,s,"encType",g.encType,g,null),ot(i,s,"method",g.method,g,null),ot(i,s,"target",g.target,g,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Qu(""+h),i.setAttribute(u,h);break;case"onClick":h!=null&&(i.onclick=Qr);break;case"onScroll":h!=null&&Ve("scroll",i);break;case"onScrollEnd":h!=null&&Ve("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}u=Qu(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""+h):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":h===!0?i.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,h):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(u,h):i.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(u):i.setAttribute(u,h);break;case"popover":Ve("beforetoggle",i),Ve("toggle",i),qu(i,"popover",h);break;case"xlinkActuate":Yr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Yr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Yr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Yr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Yr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Yr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":qu(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=J3.get(u)||u,qu(i,u,h))}}function Xp(i,s,u,h,g,E){switch(u){case"style":p1(i,h,E);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof h=="string"?_s(i,h):(typeof h=="number"||typeof h=="bigint")&&_s(i,""+h);break;case"onScroll":h!=null&&Ve("scroll",i);break;case"onScrollEnd":h!=null&&Ve("scrollend",i);break;case"onClick":h!=null&&(i.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!a1.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),E=i[_n]||null,E=E!=null?E[u]:null,typeof E=="function"&&i.removeEventListener(s,E,g),typeof h=="function")){typeof E!="function"&&E!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,h,g);break e}u in i?i[u]=h:h===!0?i.setAttribute(u,""):qu(i,u,h)}}}function rn(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",i),Ve("load",i);var h=!1,g=!1,E;for(E in u)if(u.hasOwnProperty(E)){var S=u[E];if(S!=null)switch(E){case"src":h=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ot(i,s,E,S,u,null)}}g&&ot(i,s,"srcSet",u.srcSet,u,null),h&&ot(i,s,"src",u.src,u,null);return;case"input":Ve("invalid",i);var R=E=S=g=null,U=null,ee=null;for(h in u)if(u.hasOwnProperty(h)){var oe=u[h];if(oe!=null)switch(h){case"name":g=oe;break;case"type":S=oe;break;case"checked":U=oe;break;case"defaultChecked":ee=oe;break;case"value":E=oe;break;case"defaultValue":R=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:ot(i,s,h,oe,u,null)}}c1(i,E,R,U,ee,S,g,!1);return;case"select":Ve("invalid",i),h=S=E=null;for(g in u)if(u.hasOwnProperty(g)&&(R=u[g],R!=null))switch(g){case"value":E=R;break;case"defaultValue":S=R;break;case"multiple":h=R;default:ot(i,s,g,R,u,null)}s=E,u=S,i.multiple=!!h,s!=null?vs(i,!!h,s,!1):u!=null&&vs(i,!!h,u,!0);return;case"textarea":Ve("invalid",i),E=g=h=null;for(S in u)if(u.hasOwnProperty(S)&&(R=u[S],R!=null))switch(S){case"value":h=R;break;case"defaultValue":g=R;break;case"children":E=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:ot(i,s,S,R,u,null)}f1(i,h,g,E);return;case"option":for(U in u)u.hasOwnProperty(U)&&(h=u[U],h!=null)&&(U==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":ot(i,s,U,h,u,null));return;case"dialog":Ve("beforetoggle",i),Ve("toggle",i),Ve("cancel",i),Ve("close",i);break;case"iframe":case"object":Ve("load",i);break;case"video":case"audio":for(h=0;h<wl.length;h++)Ve(wl[h],i);break;case"image":Ve("error",i),Ve("load",i);break;case"details":Ve("toggle",i);break;case"embed":case"source":case"link":Ve("error",i),Ve("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in u)if(u.hasOwnProperty(ee)&&(h=u[ee],h!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ot(i,s,ee,h,u,null)}return;default:if(ch(s)){for(oe in u)u.hasOwnProperty(oe)&&(h=u[oe],h!==void 0&&Xp(i,s,oe,h,u,void 0));return}}for(R in u)u.hasOwnProperty(R)&&(h=u[R],h!=null&&ot(i,s,R,h,u,null))}function wR(i,s,u,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,E=null,S=null,R=null,U=null,ee=null,oe=null;for(ne in u){var de=u[ne];if(u.hasOwnProperty(ne)&&de!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=de;default:h.hasOwnProperty(ne)||ot(i,s,ne,null,h,de)}}for(var te in h){var ne=h[te];if(de=u[te],h.hasOwnProperty(te)&&(ne!=null||de!=null))switch(te){case"type":E=ne;break;case"name":g=ne;break;case"checked":ee=ne;break;case"defaultChecked":oe=ne;break;case"value":S=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ne!==de&&ot(i,s,te,ne,h,de)}}lh(i,S,R,U,ee,oe,E,g);return;case"select":ne=S=R=te=null;for(E in u)if(U=u[E],u.hasOwnProperty(E)&&U!=null)switch(E){case"value":break;case"multiple":ne=U;default:h.hasOwnProperty(E)||ot(i,s,E,null,h,U)}for(g in h)if(E=h[g],U=u[g],h.hasOwnProperty(g)&&(E!=null||U!=null))switch(g){case"value":te=E;break;case"defaultValue":R=E;break;case"multiple":S=E;default:E!==U&&ot(i,s,g,E,h,U)}s=R,u=S,h=ne,te!=null?vs(i,!!u,te,!1):!!h!=!!u&&(s!=null?vs(i,!!u,s,!0):vs(i,!!u,u?[]:"",!1));return;case"textarea":ne=te=null;for(R in u)if(g=u[R],u.hasOwnProperty(R)&&g!=null&&!h.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:ot(i,s,R,null,h,g)}for(S in h)if(g=h[S],E=u[S],h.hasOwnProperty(S)&&(g!=null||E!=null))switch(S){case"value":te=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==E&&ot(i,s,S,g,h,E)}d1(i,te,ne);return;case"option":for(var _e in u)te=u[_e],u.hasOwnProperty(_e)&&te!=null&&!h.hasOwnProperty(_e)&&(_e==="selected"?i.selected=!1:ot(i,s,_e,null,h,te));for(U in h)te=h[U],ne=u[U],h.hasOwnProperty(U)&&te!==ne&&(te!=null||ne!=null)&&(U==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":ot(i,s,U,te,h,ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in u)te=u[Re],u.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&ot(i,s,Re,null,h,te);for(ee in h)if(te=h[ee],ne=u[ee],h.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,s));break;default:ot(i,s,ee,te,h,ne)}return;default:if(ch(s)){for(var lt in u)te=u[lt],u.hasOwnProperty(lt)&&te!==void 0&&!h.hasOwnProperty(lt)&&Xp(i,s,lt,void 0,h,te);for(oe in h)te=h[oe],ne=u[oe],!h.hasOwnProperty(oe)||te===ne||te===void 0&&ne===void 0||Xp(i,s,oe,te,h,ne);return}}for(var Y in u)te=u[Y],u.hasOwnProperty(Y)&&te!=null&&!h.hasOwnProperty(Y)&&ot(i,s,Y,null,h,te);for(de in h)te=h[de],ne=u[de],!h.hasOwnProperty(de)||te===ne||te==null&&ne==null||ot(i,s,de,te,h,ne)}function mv(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AR(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var g=u[h],E=g.transferSize,S=g.initiatorType,R=g.duration;if(E&&R&&mv(S)){for(S=0,R=g.responseEnd,h+=1;h<u.length;h++){var U=u[h],ee=U.startTime;if(ee>R)break;var oe=U.transferSize,de=U.initiatorType;oe&&mv(de)&&(U=U.responseEnd,S+=oe*(U<R?1:(R-ee)/(U-ee)))}if(--h,s+=8*(E+S)/(g.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Kp=null,Zp=null;function $c(i){return i.nodeType===9?i:i.ownerDocument}function gv(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bv(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Jp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var em=null;function kR(){var i=window.event;return i&&i.type==="popstate"?i===em?!1:(em=i,!0):(em=null,!1)}var yv=typeof setTimeout=="function"?setTimeout:void 0,NR=typeof clearTimeout=="function"?clearTimeout:void 0,Ev=typeof Promise=="function"?Promise:void 0,RR=typeof queueMicrotask=="function"?queueMicrotask:typeof Ev<"u"?function(i){return Ev.resolve(null).then(i).catch(LR)}:yv;function LR(i){setTimeout(function(){throw i})}function qi(i){return i==="head"}function vv(i,s){var u=s,h=0;do{var g=u.nextSibling;if(i.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(h===0){i.removeChild(g),Zs(s);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")kl(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,kl(u);for(var E=u.firstChild;E;){var S=E.nextSibling,R=E.nodeName;E[Go]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&E.rel.toLowerCase()==="stylesheet"||u.removeChild(E),E=S}}else u==="body"&&kl(i.ownerDocument.body);u=g}while(u);Zs(s)}function _v(i,s){var u=i;i=0;do{var h=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=h}while(u)}function tm(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":tm(u),sh(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function OR(i,s,u,h){for(;i.nodeType===1;){var g=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Go])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(E=i.getAttribute("rel"),E==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(E!==g.rel||i.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||i.getAttribute("title")!==(g.title==null?null:g.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(E=i.getAttribute("src"),(E!==(g.src==null?null:g.src)||i.getAttribute("type")!==(g.type==null?null:g.type)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&E&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var E=g.name==null?null:""+g.name;if(g.type==="hidden"&&i.getAttribute("name")===E)return i}else return i;if(i=tr(i.nextSibling),i===null)break}return null}function DR(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=tr(i.nextSibling),i===null))return null;return i}function xv(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=tr(i.nextSibling),i===null))return null;return i}function nm(i){return i.data==="$?"||i.data==="$~"}function rm(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function IR(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var h=function(){s(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function tr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var im=null;function Tv(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return tr(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function Sv(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function Cv(i,s,u){switch(s=$c(u),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function kl(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);sh(i)}var nr=new Map,wv=new Set;function Vc(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ci=Q.d;Q.d={f:MR,r:PR,D:BR,C:jR,L:HR,m:FR,X:zR,S:UR,M:$R};function MR(){var i=ci.f(),s=Mc();return i||s}function PR(i){var s=bs(i);s!==null&&s.tag===5&&s.type==="form"?$y(s):ci.r(i)}var Ws=typeof document>"u"?null:document;function Av(i,s,u){var h=Ws;if(h&&typeof s=="string"&&s){var g=Qn(s);g='link[rel="'+i+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),wv.has(g)||(wv.add(g),i={rel:i,crossOrigin:u,href:s},h.querySelector(g)===null&&(s=h.createElement("link"),rn(s,"link",i),$t(s),h.head.appendChild(s)))}}function BR(i){ci.D(i),Av("dns-prefetch",i,null)}function jR(i,s){ci.C(i,s),Av("preconnect",i,s)}function HR(i,s,u){ci.L(i,s,u);var h=Ws;if(h&&i&&s){var g='link[rel="preload"][as="'+Qn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+Qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+Qn(u.imageSizes)+'"]')):g+='[href="'+Qn(i)+'"]';var E=g;switch(s){case"style":E=Xs(i);break;case"script":E=Ks(i)}nr.has(E)||(i=m({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),nr.set(E,i),h.querySelector(g)!==null||s==="style"&&h.querySelector(Nl(E))||s==="script"&&h.querySelector(Rl(E))||(s=h.createElement("link"),rn(s,"link",i),$t(s),h.head.appendChild(s)))}}function FR(i,s){ci.m(i,s);var u=Ws;if(u&&i){var h=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+Qn(h)+'"][href="'+Qn(i)+'"]',E=g;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Ks(i)}if(!nr.has(E)&&(i=m({rel:"modulepreload",href:i},s),nr.set(E,i),u.querySelector(g)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Rl(E)))return}h=u.createElement("link"),rn(h,"link",i),$t(h),u.head.appendChild(h)}}}function UR(i,s,u){ci.S(i,s,u);var h=Ws;if(h&&i){var g=ys(h).hoistableStyles,E=Xs(i);s=s||"default";var S=g.get(E);if(!S){var R={loading:0,preload:null};if(S=h.querySelector(Nl(E)))R.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":s},u),(u=nr.get(E))&&am(i,u);var U=S=h.createElement("link");$t(U),rn(U,"link",i),U._p=new Promise(function(ee,oe){U.onload=ee,U.onerror=oe}),U.addEventListener("load",function(){R.loading|=1}),U.addEventListener("error",function(){R.loading|=2}),R.loading|=4,qc(S,s,h)}S={type:"stylesheet",instance:S,count:1,state:R},g.set(E,S)}}}function zR(i,s){ci.X(i,s);var u=Ws;if(u&&i){var h=ys(u).hoistableScripts,g=Ks(i),E=h.get(g);E||(E=u.querySelector(Rl(g)),E||(i=m({src:i,async:!0},s),(s=nr.get(g))&&sm(i,s),E=u.createElement("script"),$t(E),rn(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},h.set(g,E))}}function $R(i,s){ci.M(i,s);var u=Ws;if(u&&i){var h=ys(u).hoistableScripts,g=Ks(i),E=h.get(g);E||(E=u.querySelector(Rl(g)),E||(i=m({src:i,async:!0,type:"module"},s),(s=nr.get(g))&&sm(i,s),E=u.createElement("script"),$t(E),rn(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},h.set(g,E))}}function kv(i,s,u,h){var g=(g=Se.current)?Vc(g):null;if(!g)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Xs(u.href),u=ys(g).hoistableStyles,h=u.get(s),h||(h={type:"style",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Xs(u.href);var E=ys(g).hoistableStyles,S=E.get(i);if(S||(g=g.ownerDocument||g,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(i,S),(E=g.querySelector(Nl(i)))&&!E._p&&(S.instance=E,S.state.loading=5),nr.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},nr.set(i,u),E||VR(g,i,u,S.state))),s&&h===null)throw Error(r(528,""));return S}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ks(u),u=ys(g).hoistableScripts,h=u.get(s),h||(h={type:"script",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Xs(i){return'href="'+Qn(i)+'"'}function Nl(i){return'link[rel="stylesheet"]['+i+"]"}function Nv(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function VR(i,s,u,h){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=i.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),rn(s,"link",u),$t(s),i.head.appendChild(s))}function Ks(i){return'[src="'+Qn(i)+'"]'}function Rl(i){return"script[async]"+i}function Rv(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+Qn(u.href)+'"]');if(h)return s.instance=h,$t(h),h;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),$t(h),rn(h,"style",g),qc(h,u.precedence,i),s.instance=h;case"stylesheet":g=Xs(u.href);var E=i.querySelector(Nl(g));if(E)return s.state.loading|=4,s.instance=E,$t(E),E;h=Nv(u),(g=nr.get(g))&&am(h,g),E=(i.ownerDocument||i).createElement("link"),$t(E);var S=E;return S._p=new Promise(function(R,U){S.onload=R,S.onerror=U}),rn(E,"link",h),s.state.loading|=4,qc(E,u.precedence,i),s.instance=E;case"script":return E=Ks(u.src),(g=i.querySelector(Rl(E)))?(s.instance=g,$t(g),g):(h=u,(g=nr.get(E))&&(h=m({},u),sm(h,g)),i=i.ownerDocument||i,g=i.createElement("script"),$t(g),rn(g,"link",h),i.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,qc(h,u.precedence,i));return s.instance}function qc(i,s,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=h.length?h[h.length-1]:null,E=g,S=0;S<h.length;S++){var R=h[S];if(R.dataset.precedence===s)E=R;else if(E!==g)break}E?E.parentNode.insertBefore(i,E.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function am(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function sm(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Gc=null;function Lv(i,s,u){if(Gc===null){var h=new Map,g=Gc=new Map;g.set(u,h)}else g=Gc,h=g.get(u),h||(h=new Map,g.set(u,h));if(h.has(i))return h;for(h.set(i,null),u=u.getElementsByTagName(i),g=0;g<u.length;g++){var E=u[g];if(!(E[Go]||E[Jt]||i==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var S=E.getAttribute(s)||"";S=i+S;var R=h.get(S);R?R.push(E):h.set(S,[E])}}return h}function Ov(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function qR(i,s,u){if(u===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(i=s.disabled,typeof s.precedence=="string"&&i==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Dv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function GR(i,s,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=Xs(h.href),E=s.querySelector(Nl(g));if(E){s=E._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Yc.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=E,$t(E);return}E=s.ownerDocument||s,h=Nv(h),(g=nr.get(g))&&am(h,g),E=E.createElement("link"),$t(E);var S=E;S._p=new Promise(function(R,U){S.onload=R,S.onerror=U}),rn(E,"link",h),u.instance=E}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Yc.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var om=0;function YR(i,s){return i.stylesheets&&i.count===0&&Wc(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var h=setTimeout(function(){if(i.stylesheets&&Wc(i,i.stylesheets),i.unsuspend){var E=i.unsuspend;i.unsuspend=null,E()}},6e4+s);0<i.imgBytes&&om===0&&(om=62500*AR());var g=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Wc(i,i.stylesheets),i.unsuspend)){var E=i.unsuspend;i.unsuspend=null,E()}},(i.imgBytes>om?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(g)}}:null}function Yc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wc(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Qc=null;function Wc(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Qc=new Map,s.forEach(QR,i),Qc=null,Yc.call(i))}function QR(i,s){if(!(s.state.loading&4)){var u=Qc.get(i);if(u)var h=u.get(null);else{u=new Map,Qc.set(i,u);for(var g=i.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<g.length;E++){var S=g[E];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(u.set(S.dataset.precedence,S),h=S)}h&&u.set(null,h)}g=s.instance,S=g.getAttribute("data-precedence"),E=u.get(S)||h,E===h&&u.set(null,g),u.set(S,g),this.count++,h=Yc.bind(this),g.addEventListener("load",h),g.addEventListener("error",h),E?E.parentNode.insertBefore(g,E.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(g,i.firstChild)),s.state.loading|=4}}var Ll={$$typeof:N,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function WR(i,s,u,h,g,E,S,R,U){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=me(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=me(0),this.hiddenUpdates=me(null),this.identifierPrefix=h,this.onUncaughtError=g,this.onCaughtError=E,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function Iv(i,s,u,h,g,E,S,R,U,ee,oe,de){return i=new WR(i,s,u,S,U,ee,oe,de,R),s=1,E===!0&&(s|=24),E=In(3,null,null,s),i.current=E,E.stateNode=i,s=Fh(),s.refCount++,i.pooledCache=s,s.refCount++,E.memoizedState={element:h,isDehydrated:u,cache:s},Vh(E),i}function Mv(i){return i?(i=ks,i):ks}function Pv(i,s,u,h,g,E){g=Mv(g),h.context===null?h.context=g:h.pendingContext=g,h=Ii(s),h.payload={element:u},E=E===void 0?null:E,E!==null&&(h.callback=E),u=Mi(i,h,s),u!==null&&(An(u,i,s),ul(u,i,s))}function Bv(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function lm(i,s){Bv(i,s),(i=i.alternate)&&Bv(i,s)}function jv(i){if(i.tag===13||i.tag===31){var s=Ta(i,67108864);s!==null&&An(s,i,67108864),lm(i,67108864)}}function Hv(i){if(i.tag===13||i.tag===31){var s=Hn();s=qo(s);var u=Ta(i,s);u!==null&&An(u,i,s),lm(i,s)}}var Xc=!0;function XR(i,s,u,h){var g=B.T;B.T=null;var E=Q.p;try{Q.p=2,um(i,s,u,h)}finally{Q.p=E,B.T=g}}function KR(i,s,u,h){var g=B.T;B.T=null;var E=Q.p;try{Q.p=8,um(i,s,u,h)}finally{Q.p=E,B.T=g}}function um(i,s,u,h){if(Xc){var g=cm(h);if(g===null)Wp(i,s,h,Kc,u),Uv(i,h);else if(JR(g,i,s,u,h))h.stopPropagation();else if(Uv(i,h),s&4&&-1<ZR.indexOf(i)){for(;g!==null;){var E=bs(g);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var S=Gr(E.pendingLanes);if(S!==0){var R=E;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var U=1<<31-rt(S);R.entanglements[1]|=U,S&=~U}kr(E),(tt&6)===0&&(Dc=Pt()+500,Cl(0))}}break;case 31:case 13:R=Ta(E,2),R!==null&&An(R,E,2),Mc(),lm(E,2)}if(E=cm(h),E===null&&Wp(i,s,h,Kc,u),E===g)break;g=E}g!==null&&h.stopPropagation()}else Wp(i,s,h,null,u)}}function cm(i){return i=fh(i),dm(i)}var Kc=null;function dm(i){if(Kc=null,i=gs(i),i!==null){var s=o(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=l(s),i!==null)return i;i=null}else if(u===31){if(i=c(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Kc=i,null}function Fv(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($u()){case le:return 2;case ye:return 8;case Ne:case Me:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var fm=!1,Gi=null,Yi=null,Qi=null,Ol=new Map,Dl=new Map,Wi=[],ZR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Uv(i,s){switch(i){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Yi=null;break;case"mouseover":case"mouseout":Qi=null;break;case"pointerover":case"pointerout":Ol.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(s.pointerId)}}function Il(i,s,u,h,g,E){return i===null||i.nativeEvent!==E?(i={blockedOn:s,domEventName:u,eventSystemFlags:h,nativeEvent:E,targetContainers:[g]},s!==null&&(s=bs(s),s!==null&&jv(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function JR(i,s,u,h,g){switch(s){case"focusin":return Gi=Il(Gi,i,s,u,h,g),!0;case"dragenter":return Yi=Il(Yi,i,s,u,h,g),!0;case"mouseover":return Qi=Il(Qi,i,s,u,h,g),!0;case"pointerover":var E=g.pointerId;return Ol.set(E,Il(Ol.get(E)||null,i,s,u,h,g)),!0;case"gotpointercapture":return E=g.pointerId,Dl.set(E,Il(Dl.get(E)||null,i,s,u,h,g)),!0}return!1}function zv(i){var s=gs(i.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){i.blockedOn=s,n1(i.priority,function(){Hv(u)});return}}else if(s===31){if(s=c(u),s!==null){i.blockedOn=s,n1(i.priority,function(){Hv(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Zc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=cm(i.nativeEvent);if(u===null){u=i.nativeEvent;var h=new u.constructor(u.type,u);dh=h,u.target.dispatchEvent(h),dh=null}else return s=bs(u),s!==null&&jv(s),i.blockedOn=u,!1;s.shift()}return!0}function $v(i,s,u){Zc(i)&&u.delete(s)}function eL(){fm=!1,Gi!==null&&Zc(Gi)&&(Gi=null),Yi!==null&&Zc(Yi)&&(Yi=null),Qi!==null&&Zc(Qi)&&(Qi=null),Ol.forEach($v),Dl.forEach($v)}function Jc(i,s){i.blockedOn===s&&(i.blockedOn=null,fm||(fm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,eL)))}var ed=null;function Vv(i){ed!==i&&(ed=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ed===i&&(ed=null);for(var s=0;s<i.length;s+=3){var u=i[s],h=i[s+1],g=i[s+2];if(typeof h!="function"){if(dm(h||u)===null)continue;break}var E=bs(u);E!==null&&(i.splice(s,3),s-=3,cp(E,{pending:!0,data:g,method:u.method,action:h},h,g))}}))}function Zs(i){function s(U){return Jc(U,i)}Gi!==null&&Jc(Gi,i),Yi!==null&&Jc(Yi,i),Qi!==null&&Jc(Qi,i),Ol.forEach(s),Dl.forEach(s);for(var u=0;u<Wi.length;u++){var h=Wi[u];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Wi.length&&(u=Wi[0],u.blockedOn===null);)zv(u),u.blockedOn===null&&Wi.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var g=u[h],E=u[h+1],S=g[_n]||null;if(typeof E=="function")S||Vv(u);else if(S){var R=null;if(E&&E.hasAttribute("formAction")){if(g=E,S=E[_n]||null)R=S.formAction;else if(dm(g)!==null)continue}else R=S.action;typeof R=="function"?u[h+1]=R:(u.splice(h,3),h-=3),Vv(u)}}}function qv(){function i(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(S){return g=S})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,g=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function hm(i){this._internalRoot=i}td.prototype.render=hm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,h=Hn();Pv(u,h,i,s,null,null)},td.prototype.unmount=hm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Pv(i.current,2,null,i,null,null),Mc(),s[ms]=null}};function td(i){this._internalRoot=i}td.prototype.unstable_scheduleHydration=function(i){if(i){var s=t1();i={blockedOn:null,target:i,priority:s};for(var u=0;u<Wi.length&&s!==0&&s<Wi[u].priority;u++);Wi.splice(u,0,i),u===0&&zv(i)}};var Gv=t.version;if(Gv!=="19.2.4")throw Error(r(527,Gv,"19.2.4"));Q.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(s),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var tL={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{Zt=nd.inject(tL),Tt=nd}catch{}}return Pl.createRoot=function(i,s){if(!a(i))throw Error(r(299));var u=!1,h="",g=Jy,E=eE,S=tE;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError)),s=Iv(i,1,!1,null,null,u,h,null,g,E,S,qv),i[ms]=s.current,Qp(i),new hm(s)},Pl.hydrateRoot=function(i,s,u){if(!a(i))throw Error(r(299));var h=!1,g="",E=Jy,S=eE,R=tE,U=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(E=u.onUncaughtError),u.onCaughtError!==void 0&&(S=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError),u.formState!==void 0&&(U=u.formState)),s=Iv(i,1,!0,s,u??null,h,g,U,E,S,R,qv),s.context=Mv(null),u=s.current,h=Hn(),h=qo(h),g=Ii(h),g.callback=null,Mi(u,g,h),u=h,s.current.lanes=u,He(s,u),kr(s),i[ms]=s.current,Qp(i),new td(s)},Pl.version="19.2.4",Pl}var d_;function YL(){if(d_)return gm.exports;d_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),gm.exports=GL(),gm.exports}var QL=YL();const f_=e=>Symbol.iterator in e,h_=e=>"entries"in e,p_=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[a,o]of n)if(!r.has(a)||!Object.is(o,r.get(a)))return!1;return!0},WL=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let a=n.next(),o=r.next();for(;!a.done&&!o.done;){if(!Object.is(a.value,o.value))return!1;a=n.next(),o=r.next()}return!!a.done&&!!o.done};function XL(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:f_(e)&&f_(t)?h_(e)&&h_(t)?p_(e,t):WL(e,t):p_({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function vi(e){const t=ho.useRef(void 0);return n=>{const r=e(n);return XL(t.current,r)?t.current:t.current=r}}const _o="diffs-container",KL=/(?=^From [a-f0-9]+ .+$)/m,vm=/(?=^diff --git)/gm,m_=/(?=^---\s+\S)/gm,ZL=/(?=^@@ )/gm,JL=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,M0=new RegExp("(?<=\\n)"),eO=/^(---|\+\+\+)\s+([^\t\r\n]+)/,tO=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,nO=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,rO=/^index (?:[0-9a-f]+)\.\.(?:[0-9a-f]+)(?: (\d+))?/,ku="header-metadata",Wt={dark:"pierre-dark",light:"pierre-light"},Ug="data-unsafe-css";function iO(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}var Q2=class{pre;selectedRange=null;renderedSelectionRange;anchor;_queuedRender;constructor(e={}){this.options=e}setOptions(e){this.options={...this.options,...e},this.removeEventListeners(),this.options.enableLineSelection===!0&&this.attachEventListeners()}cleanUp(){this.removeEventListeners(),this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre!=null&&delete this.pre.dataset.interactiveLineNumbers,this.pre=void 0}setup(e){this.setDirty(),this.pre!==e&&this.cleanUp(),this.pre=e;const{enableLineSelection:t=!1}=this.options;t?(this.pre.dataset.interactiveLineNumbers="",this.attachEventListeners()):(this.removeEventListeners(),delete this.pre.dataset.interactiveLineNumbers),this.setSelection(this.selectedRange)}setDirty(){this.renderedSelectionRange=void 0}isDirty(){return this.renderedSelectionRange===void 0}setSelection(e){const t=!(e===this.selectedRange||iO(e??void 0,this.selectedRange??void 0));!this.isDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionChange())}getSelection(){return this.selectedRange}attachEventListeners(){this.pre!=null&&(this.removeEventListeners(),this.pre.addEventListener("pointerdown",this.handleMouseDown))}removeEventListeners(){this.pre!=null&&(this.pre.removeEventListener("pointerdown",this.handleMouseDown),document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp))}handleMouseDown=e=>{const t=e.button===0?this.getMouseEventDataForPath(e.composedPath(),"click"):void 0;if(t==null)return;e.preventDefault();const{lineNumber:n,eventSide:r,lineIndex:a}=t;if(e.shiftKey&&this.selectedRange!=null){const o=this.deriveRowRangeFromDOM(this.selectedRange,this.pre?.dataset.type==="split");if(o==null)return;const l=o.start<=o.end?a>=o.start:a<=o.end;this.anchor={line:l?this.selectedRange.start:this.selectedRange.end,side:(l?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side)??"additions"},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}else{if(this.selectedRange?.start===n&&this.selectedRange?.end===n){this.updateSelection(null),this.notifySelectionEnd(null),this.notifySelectionChange();return}this.selectedRange=null,this.anchor={line:n,side:r},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}document.addEventListener("pointermove",this.handleMouseMove),document.addEventListener("pointerup",this.handleMouseUp)};handleMouseMove=e=>{const t=this.getMouseEventDataForPath(e.composedPath(),"move");if(t==null||this.anchor==null)return;const{lineNumber:n,eventSide:r}=t;this.updateSelection(n,r)};handleMouseUp=()=>{this.anchor=void 0,document.removeEventListener("pointermove",this.handleMouseMove),document.removeEventListener("pointerup",this.handleMouseUp),this.notifySelectionEnd(this.selectedRange),this.notifySelectionChange()};updateSelection(e,t){if(e==null)this.selectedRange=null;else{const n=this.anchor?.side??t;this.selectedRange={start:this.anchor?.line??e,end:e,side:n,endSide:n!==t?t:void 0}}this._queuedRender??=requestAnimationFrame(this.renderSelection)}renderSelection=()=>{if(this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const c of e)c.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const t=this.pre.querySelectorAll("[data-code]");if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("LineSelectionManager.applySelectionToDOM: Somehow there are more than 2 code elements...");const n=this.pre.dataset.type==="split",r=this.deriveRowRangeFromDOM(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),new Error("LineSelectionManager.renderSelection: No valid rowRange");const a=r.start===r.end,o=Math.min(r.start,r.end),l=Math.max(r.start,r.end);for(const c of t)for(const d of c.children){if(!(d instanceof HTMLElement))continue;const f=this.getLineIndex(d,n);if((f??0)>l)break;if(f==null||f<o)continue;let p=a?"single":f===o?"first":f===l?"last":"";d.setAttribute("data-selected-line",p),d.nextSibling instanceof HTMLElement&&d.nextSibling.hasAttribute("data-line-annotation")&&(a?(p="last",d.setAttribute("data-selected-line","first")):f===o?p="":f===l&&d.setAttribute("data-selected-line",""),d.nextSibling.setAttribute("data-selected-line",p))}};deriveRowRangeFromDOM(e,t){if(e==null)return;const n=this.findRowIndexForLineNumber(e.start,e.side,t),r=e.end===e.start&&(e.endSide==null||e.endSide===e.side)?n:this.findRowIndexForLineNumber(e.end,e.endSide??e.side,t);return n!=null&&r!=null?{start:n,end:r}:void 0}findRowIndexForLineNumber(e,t="additions",n){if(this.pre==null)return;const r=Array.from(this.pre.querySelectorAll(`[data-line="${e}"]`));if(r.push(...Array.from(this.pre.querySelectorAll(`[data-alt-line="${e}"]`))),r.length!==0){for(const a of r)if(a instanceof HTMLElement){if(this.getLineSideFromElement(a)===t)return this.getLineIndex(a,n);if(parseInt(a.dataset.altLine??"")===e)return this.getLineIndex(a,n)}console.error("LineSelectionManager.findRowIndexForLineNumber: Invalid selection",e,t)}}notifySelectionChange(){const{onLineSelected:e}=this.options;e?.(this.selectedRange??null)}notifySelectionStart(e){const{onLineSelectionStart:t}=this.options;t?.(e)}notifySelectionEnd(e){const{onLineSelectionEnd:t}=this.options;t?.(e)}getMouseEventDataForPath(e,t){let n,r,a=!1,o;for(const l of e)if(l instanceof HTMLElement){if(l.hasAttribute("data-column-number")){a=!0;continue}if(l.hasAttribute("data-line")){if(n=this.getLineNumber(l),r=this.getLineIndex(l,this.pre?.dataset.type==="split"),l.dataset.lineType==="change-deletion"?o="deletions":l.dataset.lineType==="change-additions"&&(o="additions"),r==null||n==null){r=void 0,n=void 0;break}if(o!=null)break;continue}if(l.hasAttribute("data-code")){o??=l.hasAttribute("data-deletions")?"deletions":"additions";break}}if(!(t==="click"&&!a||r==null||n==null))return{lineIndex:r,lineNumber:n,eventSide:o??"additions"}}getLineNumber(e){const t=parseInt(e.dataset.line??"",10);return Number.isNaN(t)?void 0:t}getLineIndex(e,t){const n=(e.dataset.lineIndex??"").split(",").map(r=>parseInt(r)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}getLineSideFromElement(e){if(e.dataset.lineType==="change-deletion")return"deletions";if(e.dataset.lineType==="change-addition")return"additions";const t=e.closest("[data-code]");return t instanceof HTMLElement&&t.hasAttribute("data-deletions")?"deletions":"additions"}};function $d({enableLineSelection:e,onLineSelected:t,onLineSelectionStart:n,onLineSelectionEnd:r}){return{enableLineSelection:e,onLineSelected:t,onLineSelectionStart:n,onLineSelectionEnd:r}}function _m(e,t){return e==null?!1:t==="file"?e.type==="line":e.type==="diff-line"}function aO(e){return e?.type==="line-info"}var W2=class{hoveredLine;pre;hoverSlot;constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handleMouseClick),this.pre?.removeEventListener("pointermove",this.handleMouseMove),this.pre?.removeEventListener("pointerout",this.handleMouseLeave),delete this.pre?.dataset.interactiveLines,delete this.pre?.dataset.interactiveLineNumbers,this.pre=void 0}setup(e){const{__debugMouseEvents:t,onLineClick:n,onLineNumberClick:r,onLineEnter:a,onLineLeave:o,onHunkExpand:l,enableHoverUtility:c=!1}=this.options;if(this.cleanUp(),this.pre=e,c&&this.hoverSlot==null){this.hoverSlot=document.createElement("div"),this.hoverSlot.dataset.hoverSlot="";const d=document.createElement("slot");d.name="hover-slot",this.hoverSlot.appendChild(d)}else!c&&this.hoverSlot!=null&&(this.hoverSlot.parentNode?.removeChild(this.hoverSlot),this.hoverSlot=void 0);(n!=null||r!=null||l!=null)&&(e.addEventListener("click",this.handleMouseClick),n!=null?e.dataset.interactiveLines="":r!=null&&(e.dataset.interactiveLineNumbers=""),an(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const d=[];return(t==="both"||t==="click")&&(n!=null&&d.push("onLineClick"),r!=null&&d.push("onLineNumberClick"),l!=null&&d.push("expandable hunk separators")),d})())),(a!=null||o!=null||c)&&(e.addEventListener("pointermove",this.handleMouseMove),an(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),e.addEventListener("pointerleave",this.handleMouseLeave),an(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event"))}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handleMouseClick=e=>{an(this.options.__debugMouseEvents,"click","FileDiff.DEBUG.handleMouseClick:",e),this.handleMouseEvent({eventType:"click",event:e})};handleMouseMove=e=>{an(this.options.__debugMouseEvents,"move","FileDiff.DEBUG.handleMouseMove:",e),this.handleMouseEvent({eventType:"move",event:e})};handleMouseLeave=e=>{const{__debugMouseEvents:t}=this.options;if(an(t,"move","FileDiff.DEBUG.handleMouseLeave: no event"),this.hoveredLine==null){an(t,"move","FileDiff.DEBUG.handleMouseLeave: returned early, no .hoveredLine");return}this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.hoveredLine=void 0};handleMouseEvent({eventType:e,event:t}){const{__debugMouseEvents:n}=this.options,r=t.composedPath();an(n,e,"FileDiff.DEBUG.handleMouseEvent:",{eventType:e,composedPath:r});const a=this.getLineData(r);an(n,e,"FileDiff.DEBUG.handleMouseEvent: getLineData result:",a);const{onLineClick:o,onLineNumberClick:l,onLineEnter:c,onLineLeave:d,onHunkExpand:f}=this.options;switch(e){case"move":if(_m(a,this.mode)&&this.hoveredLine?.lineElement===a.lineElement){an(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', returned early because same line");break}this.hoveredLine!=null&&(an(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', clearing an existing hovered line and firing onLineLeave"),this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),d?.({...this.hoveredLine,event:t}),this.hoveredLine=void 0),_m(a,this.mode)&&(an(n,"move","FileDiff.DEBUG.handleMouseEvent: switch, 'move', setting up a new hoveredLine and firing onLineEnter"),this.hoveredLine=a,this.hoverSlot!=null&&a.numberElement?.appendChild(this.hoverSlot),c?.({...this.hoveredLine,event:t}));break;case"click":if(an(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', with data:",a),a==null)break;if(aO(a)&&f!=null){an(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', expanding a hunk"),f(a.hunkIndex,a.direction);break}_m(a,this.mode)&&(l!=null&&a.numberColumn?(an(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineNumberClick'"),l({...a,event:t})):o!=null?(an(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineClick'"),o({...a,event:t})):an(n,"click","FileDiff.DEBUG.handleMouseEvent: switch, 'click', fell through, no event to fire"));break}}getLineData(e){let t=!1;const n=e.find(l=>l instanceof HTMLElement?(t=t||"columnNumber"in l.dataset,"line"in l.dataset||"expandIndex"in l.dataset):!1);if(!(n instanceof HTMLElement))return;if(n.dataset.expandIndex!=null){const l=parseInt(n.dataset.expandIndex);if(isNaN(l))return;let c;for(const d of e)if(d===n||d instanceof HTMLElement&&(c=c??("expandUp"in d.dataset?"up":void 0)??("expandDown"in d.dataset?"down":void 0)??("expandBoth"in d.dataset?"both":void 0),c!=null))break;return c!=null?{type:"line-info",hunkIndex:l,direction:c}:void 0}const r=parseInt(n.dataset.line??"");if(isNaN(r))return;const a=n.dataset.lineType;if(a!=="context"&&a!=="context-expanded"&&a!=="change-deletion"&&a!=="change-addition")return;const o=(()=>{const l=n.children[0];return l instanceof HTMLElement&&l.dataset.columnNumber!=null?l:void 0})();return this.mode==="file"?{type:"line",lineElement:n,lineNumber:r,numberElement:o,numberColumn:t}:{type:"diff-line",annotationSide:(()=>{if(a==="change-deletion")return"deletions";if(a==="change-addition")return"additions";const l=n.closest("[data-code]");return l instanceof HTMLElement&&"deletions"in l.dataset?"deletions":"additions"})(),lineType:a,lineElement:n,numberElement:o,lineNumber:r,numberColumn:t}}};function an(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}function Vd({onLineClick:e,onLineNumberClick:t,onLineEnter:n,onLineLeave:r,enableHoverUtility:a,__debugMouseEvents:o},l){return{onLineClick:e,onLineNumberClick:t,onLineEnter:n,onLineLeave:r,enableHoverUtility:a,__debugMouseEvents:o,onHunkExpand:l}}var X2=class{observedNodes=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear()}resizeObserver;setup(e){this.cleanUp();const t=e.querySelectorAll('[data-line-annotation*=","]');this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const n=e.querySelectorAll("code");for(const a of n){let o=a.querySelector("[data-column-number]");o instanceof HTMLElement||(o=null);const l={type:"code",codeElement:a,numberElement:o,codeWidth:"auto",numberWidth:0};this.observedNodes.set(a,l),this.resizeObserver.observe(a),o!=null&&(this.observedNodes.set(o,l),this.resizeObserver.observe(o))}if(n.length<=1)return;const r=new Map;for(const a of t){if(!(a instanceof HTMLElement))continue;const{lineAnnotation:o=""}=a.dataset;if(!/^\d+,\d+$/.test(o)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:o,element:a});continue}let l=r.get(o);l==null&&(l=[],r.set(o,l)),l.push(a)}for(const[a,o]of r){if(o.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,o);continue}const[l,c]=o,d=l.firstElementChild,f=c.firstElementChild;if(!(l instanceof HTMLElement)||!(c instanceof HTMLElement)||!(d instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const p={type:"annotations",column1:{container:l,child:d,childHeight:0},column2:{container:c,child:f,childHeight:0},currentHeight:"auto"};this.observedNodes.set(d,p),this.observedNodes.set(f,p),this.resizeObserver.observe(d),this.resizeObserver.observe(f)}}handleResizeObserver=e=>{for(const t of e){const{target:n,borderBoxSize:r}=t;if(!(n instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const a=this.observedNodes.get(n);if(a==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);continue}const o=r[0];if(a.type==="annotations"){const l=(()=>{if(n===a.column1.child)return a.column1;if(n===a.column2.child)return a.column2})();if(l==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:a,target:n});continue}l.childHeight=o.blockSize;const c=Math.max(a.column1.childHeight,a.column2.childHeight);c!==a.currentHeight&&(a.currentHeight=Math.max(c,0),a.column1.container.style.setProperty("--diffs-annotation-min-height",`${a.currentHeight}px`),a.column2.container.style.setProperty("--diffs-annotation-min-height",`${a.currentHeight}px`))}else a.type==="code"&&(n===a.codeElement?o.inlineSize!==a.codeWidth&&(a.codeWidth=o.inlineSize,a.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(a.codeWidth-a.numberWidth,0)}px`),a.codeElement.style.setProperty("--diffs-column-width",`${a.codeWidth}px`)):n===a.numberElement&&o.inlineSize!==a.numberWidth&&(a.numberWidth=o.inlineSize,a.codeElement.style.setProperty("--diffs-column-number-width",`${a.numberWidth}px`),a.codeWidth!=="auto"&&a.codeElement.style.setProperty("--diffs-column-content-width",`${Math.max(a.codeWidth-a.numberWidth,0)}px`)))}}};const Xa=new Map,xm=new Map,P0=new Set;function qd(e){for(const t of Array.isArray(e)?e:[e])if(!P0.has(t))return!1;return!0}function g_(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(P0.has(n.name))continue;let r=Xa.get(n.name);r==null&&(r=n,Xa.set(n.name,r)),P0.add(r.name),t.loadLanguageSync(r.data)}}function K2(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}const sO="modulepreload",oO=function(e){return"/"+e},b_={},M=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=d(n.map(f=>{if(f=oO(f),f in b_)return;b_[f]=!0;const p=f.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const b=document.createElement("link");if(b.rel=p?"stylesheet":sO,p||(b.as="script"),b.crossOrigin="",b.href=f,c&&b.setAttribute("nonce",c),document.head.appendChild(b),p)return new Promise((y,_)=>{b.addEventListener("load",y),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};let Mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function lO(e){return zg(e)}function zg(e){return Array.isArray(e)?uO(e):e instanceof RegExp?e:typeof e=="object"?cO(e):e}function uO(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zg(e[n]);return t}function cO(e){let t={};for(let n in e)t[n]=zg(e[n]);return t}function Z2(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function J2(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?J2(e.substring(0,e.length-1)):e.substr(~t+1)}var Tm=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,id=class{static hasCaptures(e){return e===null?!1:(Tm.lastIndex=0,Tm.test(e))}static replaceCaptures(e,t,n){return e.replace(Tm,(r,a,o,l)=>{let c=n[parseInt(a||o,10)];if(c){let d=t.substring(c.start,c.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return r})}};function eS(e,t){return e<t?-1:e>t?1:0}function tS(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=eS(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function y_(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function nS(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var rS=class{constructor(e){this.fn=e}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}},Gd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(hO(e),t)}static createFromParsedTheme(e,t){return mO(e,t)}_cachedMatchRoot=new rS(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>dO(e.parent,a.parentScopes));return r?new iS(r.fontStyle,r.foreground,r.background):null}},Sm=class kd{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new kd(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new kd(n,t[r]);return n}push(t){return new kd(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function dO(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!fO(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function fO(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var iS=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function hO(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let l=t[a];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let m=l.settings.fontStyle.split(" ");for(let b=0,y=m.length;b<y;b++)switch(m[b]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&y_(l.settings.foreground)&&(f=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&y_(l.settings.background)&&(p=l.settings.background);for(let m=0,b=c.length;m<b;m++){let _=c[m].trim().split(" "),T=_[_.length-1],A=null;_.length>1&&(A=_.slice(0,_.length-1),A.reverse()),n[r++]=new pO(T,A,a,d,f,p)}}return n}var pO=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},ln=(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[e.Strikethrough=8]="Strikethrough",e))(ln||{});function mO(e,t){e.sort((d,f)=>{let p=eS(d.scope,f.scope);return p!==0||(p=tS(d.parentScopes,f.parentScopes),p!==0)?p:d.index-f.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(a=d.background)}let o=new gO(t),l=new iS(n,o.getId(r),o.getId(a)),c=new yO(new B0(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let p=e[d];c.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Gd(o,l,c)}var gO=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)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)}},bO=Object.freeze([]),B0=class aS{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||bO,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new aS(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},yO=class j0{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(j0._cmpBySpecificity),n}insert(t,n,r,a,o,l){if(n===""){this._doInsertHere(t,r,a,o,l);return}let c=n.indexOf("."),d,f;c===-1?(d=n,f=""):(d=n.substring(0,c),f=n.substring(c+1));let p;this._children.hasOwnProperty(d)?p=this._children[d]:(p=new j0(this._mainRule.clone(),B0.cloneArr(this._rulesWithParentScopes)),this._children[d]=p),p.insert(t+1,f,r,a,o,l)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let d=this._rulesWithParentScopes[l];if(tS(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new B0(t,n,r,a,o))}},xo=class rr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=rr.getLanguageId(t),r=rr.getTokenType(t),a=rr.getFontStyle(t),o=rr.getForeground(t),l=rr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,l,c){let d=rr.getLanguageId(t),f=rr.getTokenType(t),p=rr.containsBalancedBrackets(t)?1:0,m=rr.getFontStyle(t),b=rr.getForeground(t),y=rr.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(p=a?1:0),o!==-1&&(m=o),l!==0&&(b=l),c!==0&&(y=c),(d<<0|f<<8|p<<10|m<<11|b<<15|y<<24)>>>0}};function Yd(e,t){const n=[],r=EO(e);let a=r.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let f=l();if(n.push({matcher:f,priority:d}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();const d=o();return f=>!!d&&!d(f)}if(a==="("){a=r.next();const d=c();return a===")"&&(a=r.next()),d}if(E_(a)){const d=[];do d.push(a),a=r.next();while(E_(a));return f=>t(d,f)}return null}function l(){const d=[];let f=o();for(;f;)d.push(f),f=o();return p=>d.every(m=>m(p))}function c(){const d=[];let f=l();for(;f&&(d.push(f),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");f=l()}return p=>d.some(m=>m(p))}}function E_(e){return!!e&&!!e.match(/[\w\.:]+/)}function EO(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}}}function sS(e){typeof e.dispose=="function"&&e.dispose()}var mu=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vO=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},_O=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xO=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new mu(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new _O;for(const n of e)TO(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof mu){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function TO(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 o=n.lookup(t);e instanceof mu?Nd({baseGrammar:o,selfGrammar:a},r):H0(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const c of l)r.add(new mu(c))}function H0(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Qd([r],t,n)}}function Nd(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Qd(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Qd(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Qd(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?Z2({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Qd(r.patterns,{...t,repository:a},n);const o=r.include;if(!o)continue;const l=oS(o);switch(l.kind){case 0:Nd({...t,selfGrammar:t.baseGrammar},n);break;case 1:Nd(t,n);break;case 2:H0(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const d={baseGrammar:t.baseGrammar,selfGrammar:c,repository:a};l.kind===4?H0(l.ruleName,d,n):Nd(d,n)}else l.kind===4?n.add(new vO(l.scopeName,l.ruleName)):n.add(new mu(l.scopeName));break}}}var SO=class{kind=0},CO=class{kind=1},wO=class{constructor(e){this.ruleName=e}kind=2},AO=class{constructor(e){this.scopeName=e}kind=3},kO=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function oS(e){if(e==="$base")return new SO;if(e==="$self")return new CO;const t=e.indexOf("#");if(t===-1)return new AO(e);if(t===0)return new wO(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new kO(n,r)}}var NO=/\\(\d+)/,v_=/\\(\d+)/g,RO=-1,lS=-2;var Nu=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=id.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=id.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${J2(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:id.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:id.replaceCaptures(this._contentName,e,t)}},LO=class extends Nu{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}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!")}},OO=class extends Nu{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new gu(r,this.id),this.captures=a,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 bu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},__=class extends Nu{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.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 bu,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},F0=class extends Nu{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,o,l,c,d,f){super(e,t,n,r),this._begin=new gu(a,this.id),this.beginCaptures=o,this._end=new gu(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=d||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.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 bu;for(const n of this.patterns)e.getRule(n).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}},Wd=class extends Nu{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,o,l,c,d){super(e,t,n,r),this._begin=new gu(a,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new gu(l,lS),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.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 bu;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 bu,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},uS=class on{static createCaptureRule(t,n,r,a,o){return t.registerRule(l=>new LO(n,l,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new OO(t.$vscodeTextmateLocation,t.id,t.name,t.match,on._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Z2({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new __(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,on._compilePatterns(o,n,r))}return t.while?new Wd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,on._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,on._compileCaptures(t.whileCaptures||t.captures,n,r),on._compilePatterns(t.patterns,n,r)):new F0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,on._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,on._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,on._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>o&&(o=c)}for(let l=0;l<=o;l++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let d=0;t[l].patterns&&(d=on.getCompiledRuleId(t[l],n,r)),a[c]=on.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,l=t.length;o<l;o++){const c=t[o];let d=-1;if(c.include){const f=oS(c.include);switch(f.kind){case 0:case 1:d=on.getCompiledRuleId(r[c.include],n,r);break;case 2:let p=r[f.ruleName];p&&(d=on.getCompiledRuleId(p,n,r));break;case 3:case 4:const m=f.scopeName,b=f.kind===4?f.ruleName:null,y=n.getExternalGrammar(m,r);if(y)if(b){let _=y.repository[b];_&&(d=on.getCompiledRuleId(_,n,y.repository))}else d=on.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else d=on.getCompiledRuleId(c,n,r);if(d!==-1){const f=n.getRule(d);let p=!1;if((f instanceof __||f instanceof F0||f instanceof Wd)&&f.hasMissingPatterns&&f.patterns.length===0&&(p=!0),p)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},gu=class cS{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let a=0,o=[],l=!1;for(let c=0;c<r;c++)if(t.charAt(c)==="\\"&&c+1<r){const f=t.charAt(c+1);f==="z"?(o.push(t.substring(a,c)),o.push("$(?!\\n)(?<!\\n)"),a=c+2):(f==="A"||f==="G")&&(l=!0),c++}this.hasAnchor=l,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=NO.test(this.source):this.hasBackReferences=!1}clone(){return new cS(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return v_.lastIndex=0,this.source.replace(v_,(a,o)=>nS(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,l,c,d;for(o=0,l=this.source.length;o<l;o++)c=this.source.charAt(o),t[o]=c,n[o]=c,r[o]=c,a[o]=c,c==="\\"&&o+1<l&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",a[o+1]="G"):(t[o+1]=d,n[o+1]=d,r[o+1]=d,a[o+1]=d),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},bu=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}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(n=>n.source);this._cached=new x_(e,t,this._items.map(n=>n.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(a=>a.resolveAnchors(t,n));return new x_(e,r,this._items.map(a=>a.ruleId))}},x_=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&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(`
|
|
11
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Cm=class{constructor(e,t){this.languageId=e,this.tokenType=t}},DO=class U0{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Cm(t,8),this._embeddedLanguagesMatcher=new IO(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?U0._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Cm(0,0);_getBasicScopeAttributes=new rS(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Cm(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(U0.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},IO=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>nS(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},T_=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function dS(e,t,n,r,a,o,l,c){const d=t.content.length;let f=!1,p=-1;if(l){const y=MO(e,t,n,r,a,o);a=y.stack,r=y.linePos,n=y.isFirstLine,p=y.anchorPosition}const m=Date.now();for(;!f;){if(c!==0&&Date.now()-m>c)return new T_(a,!0);b()}return new T_(a,!1);function b(){const y=PO(e,t,n,r,a,p);if(!y){o.produce(a,d),f=!0;return}const _=y.captureIndices,T=y.matchedRuleId,A=_&&_.length>0?_[0].end>r:!1;if(T===RO){const C=a.getRule(e);o.produce(a,_[0].start),a=a.withContentNameScopesList(a.nameScopesList),Wl(e,t,n,a,o,C.endCaptures,_),o.produce(a,_[0].end);const k=a;if(a=a.parent,p=k.getAnchorPos(),!A&&k.getEnterPos()===r){a=k,o.produce(a,d),f=!0;return}}else{const C=e.getRule(T);o.produce(a,_[0].start);const k=a,N=C.getName(t.content,_),L=a.contentNameScopesList.pushAttributed(N,e);if(a=a.push(T,r,p,_[0].end===d,null,L,L),C instanceof F0){const O=C;Wl(e,t,n,a,o,O.beginCaptures,_),o.produce(a,_[0].end),p=_[0].end;const P=O.getContentName(t.content,_),V=L.pushAttributed(P,e);if(a=a.withContentNameScopesList(V),O.endHasBackReferences&&(a=a.withEndRule(O.getEndWithResolvedBackReferences(t.content,_))),!A&&k.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(C instanceof Wd){const O=C;Wl(e,t,n,a,o,O.beginCaptures,_),o.produce(a,_[0].end),p=_[0].end;const P=O.getContentName(t.content,_),V=L.pushAttributed(P,e);if(a=a.withContentNameScopesList(V),O.whileHasBackReferences&&(a=a.withEndRule(O.getWhileWithResolvedBackReferences(t.content,_))),!A&&k.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(Wl(e,t,n,a,o,C.captures,_),o.produce(a,_[0].end),a=a.pop(),!A){a=a.safePop(),o.produce(a,d),f=!0;return}}_[0].end>r&&(r=_[0].end,n=!1)}}function MO(e,t,n,r,a,o){let l=a.beginRuleCapturedEOL?0:-1;const c=[];for(let d=a;d;d=d.pop()){const f=d.getRule(e);f instanceof Wd&&c.push({rule:f,stack:d})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:f,findOptions:p}=HO(d.rule,e,d.stack.endRule,n,r===l),m=f.findNextMatchSync(t,r,p);if(m){if(m.ruleId!==lS){a=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(d.stack,m.captureIndices[0].start),Wl(e,t,n,d.stack,o,d.rule.whileCaptures,m.captureIndices),o.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function PO(e,t,n,r,a,o){const l=BO(e,t,n,r,a,o),c=e.getInjections();if(c.length===0)return l;const d=jO(c,e,t,n,r,a,o);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,p=d.captureIndices[0].start;return p<f||d.priorityMatch&&p===f?d:l}function BO(e,t,n,r,a,o){const l=a.getRule(e),{ruleScanner:c,findOptions:d}=fS(l,e,a.endRule,n,r===o),f=c.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function jO(e,t,n,r,a,o,l){let c=Number.MAX_VALUE,d=null,f,p=0;const m=o.contentNameScopesList.getScopeNames();for(let b=0,y=e.length;b<y;b++){const _=e[b];if(!_.matcher(m))continue;const T=t.getRule(_.ruleId),{ruleScanner:A,findOptions:C}=fS(T,t,null,r,a===l),k=A.findNextMatchSync(n,a,C);if(!k)continue;const N=k.captureIndices[0].start;if(!(N>=c)&&(c=N,d=k.captureIndices,f=k.ruleId,p=_.priority,c===a))break}return d?{priorityMatch:p===-1,captureIndices:d,matchedRuleId:f}:null}function fS(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function HO(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Wl(e,t,n,r,a,o,l){if(o.length===0)return;const c=t.content,d=Math.min(o.length,l.length),f=[],p=l[0].end;for(let m=0;m<d;m++){const b=o[m];if(b===null)continue;const y=l[m];if(y.length===0)continue;if(y.start>p)break;for(;f.length>0&&f[f.length-1].endPos<=y.start;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?a.produceFromScopes(f[f.length-1].scopes,y.start):a.produce(r,y.start),b.retokenizeCapturedWithRuleId){const T=b.getName(c,l),A=r.contentNameScopesList.pushAttributed(T,e),C=b.getContentName(c,l),k=A.pushAttributed(C,e),N=r.push(b.retokenizeCapturedWithRuleId,y.start,-1,!1,null,A,k),L=e.createOnigString(c.substring(0,y.end));dS(e,L,n&&y.start===0,y.start,N,a,!1,0),sS(L);continue}const _=b.getName(c,l);if(_!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(_,e);f.push(new FO(A,y.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var FO=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function UO(e,t,n,r,a,o,l,c){return new $O(e,t,n,r,a,o,l,c)}function S_(e,t,n,r,a){const o=Yd(t,Xd),l=uS.getCompiledRuleId(n,r,a.repository);for(const c of o)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:a,priority:c.priority})}function Xd(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(zO(t[a],r))return n=a+1,!0;return!1})}function zO(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]==="."}var $O=class{constructor(e,t,n,r,a,o,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new DO(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=C_(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=Yd(d,Xd);for(const p of f)this._tokenTypeMatchers.push({matcher:p.matcher,type:a[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;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={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)S_(t,l,a[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const d=c.injectionSelector;d&&S_(t,d,c,this,c)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=C_(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){this._rootId===-1&&(this._rootId=uS.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===z0.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=xo.set(0,f.languageId,f.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),b=this.getRule(this._rootId).getName(null,null);let y;b?y=eu.createRootAndLookUpScopeName(b,m,this):y=eu.createRoot("unknown",m),t=new z0(null,this._rootId,-1,-1,!1,null,y,y)}else a=!1,t.reset();e=e+`
|
|
12
|
+
`;const o=this.createOnigString(e),l=o.content.length,c=new qO(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=dS(this,o,a,0,t,c,!0,r);return sS(o),{lineLength:l,lineTokens:c,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function C_(e,t){return e=lO(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var eu=class Nr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(const o of n)a=Sm.push(a,o.scopeNames),r=new Nr(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Nr(null,new Sm(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),o=new Sm(null,t),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(n,a,l);return new Nr(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Nr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,o=0,l=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,l=r.backgroundId),xo.set(t,n.languageId,n.tokenType,null,a,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Nr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const o of r)a=Nr._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(t.tokenAttributes,a,l);return new Nr(t,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},z0=class Fa{constructor(t,n,r,a,o,l,c,d){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Fa(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Fa._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?eu.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Fa._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,l,c){return new Fa(this,t,n,r,a,o,l,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Fa(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=eu.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Fa(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,eu.fromExtension(r,n.contentNameScopesList))}},VO=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Yd(n,Xd).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Yd(n,Xd).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!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}},qO=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(o)&&(r=xo.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(r=xo.set(r,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(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()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},GO=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;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)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,UO(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},YO=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new GO(Gd.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Gd.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new VO(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,o){const l=new xO(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,o)}},$0=z0.NULL;const hS=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ru{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ru.prototype.normal={};Ru.prototype.property={};Ru.prototype.space=void 0;function pS(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Ru(n,r,t)}function yu(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let QO=0;const Be=is(),It=is(),V0=is(),be=is(),ft=is(),go=is(),Fn=is();function is(){return 2**++QO}const q0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:It,commaOrSpaceSeparated:Fn,commaSeparated:go,number:be,overloadedBoolean:V0,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),wm=Object.keys(q0);class $g extends Rn{constructor(t,n,r,a){let o=-1;if(super(t,n),w_(this,"space",a),typeof r=="number")for(;++o<wm.length;){const l=wm[o];w_(this,wm[o],(r&q0[l])===q0[l])}}}$g.prototype.defined=!0;function w_(e,t,n){n&&(e[t]=n)}function Lo(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new $g(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[yu(r)]=r,n[yu(o.attribute)]=r}return new Ru(t,n,e.space)}const mS=Lo({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:It,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:ft,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:be,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:ft,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:It,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function gS(e,t){return t in e?e[t]:t}function bS(e,t){return gS(e,t.toLowerCase())}const WO=Lo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:go,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:ft,autoFocus:Be,autoPlay:Be,blocking:ft,capture:null,charSet:null,checked:Be,cite:null,className:ft,cols:be,colSpan:null,content:null,contentEditable:It,controls:Be,controlsList:ft,coords:be|go,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:V0,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:ft,height:be,hidden:V0,high:be,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:ft,itemRef:ft,itemScope:Be,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:be,pattern:null,ping:ft,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:ft,required:Be,reversed:Be,rows:be,rowSpan:be,sandbox:ft,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:It,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:bS}),XO=Lo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Fn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:go,g2:go,glyphName:go,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fn,rev:Fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fn,requiredFeatures:Fn,requiredFonts:Fn,requiredFormats:Fn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gS}),yS=Lo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ES=Lo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bS}),vS=Lo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KO={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ZO=/[A-Z]/g,A_=/-[a-z]/g,JO=/^data[-\w.:]+$/i;function Lu(e,t){const n=yu(t);let r=t,a=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&JO.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(A_,t6);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!A_.test(o)){let l=o.replace(ZO,e6);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=$g}return new a(r,t)}function e6(e){return"-"+e.toLowerCase()}function t6(e){return e.charAt(1).toUpperCase()}const Oo=pS([mS,WO,yS,ES,vS],"html"),Fr=pS([mS,XO,yS,ES,vS],"svg"),k_={}.hasOwnProperty;function Vg(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const c=r.handlers;if(a&&k_.call(a,e)){const d=String(a[e]);l=k_.call(c,d)?c[d]:r.unknown}if(l)return l.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const n6=/["&'<>`]/g,r6=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i6=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,a6=/[|\\{}()[\]^$+*?.]/g,N_=new WeakMap;function s6(e,t){if(e=e.replace(t.subset?o6(t.subset):n6,r),t.subset||t.escapeOnly)return e;return e.replace(r6,n).replace(i6,r);function n(a,o,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(a,o,l){return t.format(a.charCodeAt(0),l.charCodeAt(o+1),t)}}function o6(e){let t=N_.get(e);return t||(t=l6(e),N_.set(e,t)),t}function l6(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(a6,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const u6=/[\dA-Fa-f]/;function c6(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!u6.test(String.fromCharCode(t))?r:r+";"}const d6=/\d/;function f6(e,t,n){const r="&#"+String(e);return n&&t&&!d6.test(String.fromCharCode(t))?r:r+";"}const h6=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Am={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},p6=["cent","copy","divide","gt","lt","not","para","times"],_S={}.hasOwnProperty,G0={};let ad;for(ad in Am)_S.call(Am,ad)&&(G0[Am[ad]]=ad);const m6=/[^\dA-Za-z]/;function g6(e,t,n,r){const a=String.fromCharCode(e);if(_S.call(G0,a)){const o=G0[a],l="&"+o;return n&&h6.includes(o)&&!p6.includes(o)&&(!r||t&&t!==61&&m6.test(String.fromCharCode(t)))?l:l+";"}return""}function b6(e,t,n){let r=c6(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=g6(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=f6(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function bo(e,t){return s6(e,Object.assign({format:b6},t))}const y6=/^>|^->|<!--|-->|--!>|<!-$/g,E6=[">"],v6=["<",">"];function _6(e,t,n,r){return r.settings.bogusComments?"<?"+bo(e.value,Object.assign({},r.settings.characterReferences,{subset:E6}))+">":"<!--"+e.value.replace(y6,a)+"-->";function a(o){return bo(o,Object.assign({},r.settings.characterReferences,{subset:v6}))}}function x6(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Kd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function R_(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(a,r).trim();(l||!o)&&t.push(l),a=r+1,r=n.indexOf(",",a)}return t}function qg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function L_(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Gg(e){return e.join(" ").trim()}const T6=/[ \t\n\f\r]/g;function Sf(e){return typeof e=="object"?e.type==="text"?O_(e.value):!1:O_(e)}function O_(e){return e.replace(T6,"")===""}const zt=TS(1),xS=TS(-1),S6=[];function TS(e){return t;function t(n,r,a){const o=n?n.children:S6;let l=(r||0)+e,c=o[l];if(!a)for(;c&&Sf(c);)l+=e,c=o[l];return c}}const C6={}.hasOwnProperty;function SS(e){return t;function t(n,r,a){return C6.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const Yg=SS({body:A6,caption:km,colgroup:km,dd:L6,dt:R6,head:km,html:w6,li:N6,optgroup:O6,option:D6,p:k6,rp:D_,rt:D_,tbody:M6,td:I_,tfoot:P6,th:I_,thead:I6,tr:B6});function km(e,t,n){const r=zt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Sf(r.value.charAt(0)))}function w6(e,t,n){const r=zt(n,t);return!r||r.type!=="comment"}function A6(e,t,n){const r=zt(n,t);return!r||r.type!=="comment"}function k6(e,t,n){const r=zt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function N6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function R6(e,t,n){const r=zt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function L6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function D_(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function O6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function D6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function I6(e,t,n){const r=zt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function M6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function P6(e,t,n){return!zt(n,t)}function B6(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function I_(e,t,n){const r=zt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const j6=SS({body:U6,colgroup:z6,head:F6,html:H6,tbody:$6});function H6(e){const t=zt(e,-1);return!t||t.type!=="comment"}function F6(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function U6(e){const t=zt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Sf(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function z6(e,t,n){const r=xS(n,t),a=zt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Yg(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function $6(e,t,n){const r=xS(n,t),a=zt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Yg(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const sd={name:[[`
|
|
13
|
+
\f\r &/=>`.split(""),`
|
|
14
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
15
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
16
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
17
|
+
\f\r &>`.split(""),`\0
|
|
18
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
19
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
20
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function V6(e,t,n,r){const a=r.schema,o=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const c=[];let d;a.space==="html"&&e.tagName==="svg"&&(r.schema=Fr);const f=q6(r,e.properties),p=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,p&&(l=!1),(f||!o||!j6(e,t,n))&&(c.push("<",e.tagName,f?" "+f:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!o||!Yg(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function q6(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=G6(e,a,t[a]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function G6(e,t,n){const r=Lu(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=bo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:sd.name[a][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?qg:Gg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(c=bo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:sd.unquoted[a][o]}))),c!==n&&(e.settings.quoteSmart&&Kd(n,l)>Kd(n,e.alternative)&&(l=e.alternative),c=l+bo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?sd.single:sd.double)[a][o],attribute:!0}))+l),d+(c&&"="+c))}const Y6=["<","&"];function CS(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:bo(e.value,Object.assign({},r.settings.characterReferences,{subset:Y6}))}function Q6(e,t,n,r){return r.settings.allowDangerousHtml?e.value:CS(e,t,n,r)}function W6(e,t,n,r){return r.all(e)}const X6=Vg("type",{invalid:K6,unknown:Z6,handlers:{comment:_6,doctype:x6,element:V6,raw:Q6,root:W6,text:CS}});function K6(e){throw new Error("Expected node, not `"+e+"`")}function Z6(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const J6={},eD={},tD=[];function bi(e,t){const n=t||J6,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:nD,all:rD,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||hS,characterReferences:n.characterReferences||eD,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Fr:Oo,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function nD(e,t,n){return X6(e,t,n,this)}function rD(e){const t=[],n=e&&e.children||tD;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Zd(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function la(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function iD(e){return Array.isArray(e)?e:[e]}async function wS(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Qg(e){return!e||["plaintext","txt","text","plain"].includes(e)}function AS(e){return e==="ansi"||Qg(e)}function Wg(e){return e==="none"}function kS(e){return Wg(e)}function NS(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Cf(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const a=[];for(let o=0;o<n.length;o+=2){const l=t?n[o]+(n[o+1]||""):n[o];a.push([l,r]),r+=n[o].length,r+=n[o+1]?.length||0}return a}function aD(e){const t=Cf(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=a,l=0;for(const c of t){if(o<c.length)break;o-=c.length,l++}return{line:l,character:o}}function r(a,o){let l=0;for(let c=0;c<a;c++)l+=t[c].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}const Xg="light-dark()",sD=["color","background-color"];function oD(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function lD(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const o=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,c)=>l-c);return o.length?oD(a,o):a})):e}function uD(e,t,n,r,a="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>Jd(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),d={},f=(p,m)=>{const b=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":b)};return l.forEach((p,m)=>{for(const b of c){const y=p[b]||"inherit";if(m===0&&r&&sD.includes(b))if(r===Xg&&l.length>1){const _=t.findIndex(k=>k==="light"),T=t.findIndex(k=>k==="dark");if(_===-1||T===-1)throw new Mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const A=l[_][b]||"inherit",C=l[T][b]||"inherit";d[b]=`light-dark(${A}, ${C})`,a==="css-vars"&&(d[f(m,b)]=y)}else d[b]=y;else a==="css-vars"&&(d[f(m,b)]=y)}}),o.htmlStyle=d,o}function Jd(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&ln.Italic&&(t["font-style"]="italic"),e.fontStyle&ln.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&ln.Underline&&n.push("underline"),e.fontStyle&ln.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Y0(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const RS=new WeakMap;function wf(e,t){RS.set(e,t)}function Eu(e){return RS.get(e)}class Do{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Do(Object.fromEntries(iD(n).map(r=>[r,$0])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return cD(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function cD(e){const t=[],n=new Set;function r(a){if(n.has(a))return;n.add(a);const o=a?.nameScopesList?.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function dD(e,t){if(!(e instanceof Do))throw new Mt("Invalid grammar state");return e.getInternalStack(t)}function fD(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new Mt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...a.indexToPos(l),offset:l}}else{const c=a.lines[l.line];if(c===void 0)throw new Mt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);let d=l.character;if(d<0&&(d=c.length+d),d<0||d>c.length)throw new Mt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:d,offset:a.posToIndex(l.line,d)}}};const a=aD(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));hD(o),e.set(n.meta,{decorations:o,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const a=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return lD(n,a)},code(n){if(!this.options.decorations?.length)return;const r=t(this),a=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(a.length!==r.converter.lines.length)throw new Mt(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,m,b,y){const _=a[p];let T="",A=-1,C=-1;if(m===0&&(A=0),b===0&&(C=0),b===Number.POSITIVE_INFINITY&&(C=_.children.length),A===-1||C===-1)for(let N=0;N<_.children.length;N++)T+=LS(_.children[N]),A===-1&&T.length===m&&(A=N+1),C===-1&&T.length===b&&(C=N+1);if(A===-1)throw new Mt(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(C===-1)throw new Mt(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const k=_.children.slice(A,C);if(!y.alwaysWrap&&k.length===_.children.length)c(_,y,"line");else if(!y.alwaysWrap&&k.length===1&&k[0].type==="element")c(k[0],y,"token");else{const N={type:"element",tagName:"span",properties:{},children:k};c(N,y,"wrapper"),_.children.splice(A,k.length,N)}}function l(p,m){a[p]=c(a[p],m,"line")}function c(p,m,b){const y=m.properties||{},_=m.transform||(T=>T);return p.tagName=m.tagName||"span",p.properties={...p.properties,...y,class:p.properties.class},m.properties?.class&&NS(p,m.properties.class),p=_(p,b)||p,p}const d=[],f=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:b}=p;if(m.line===b.line)o(m.line,m.character,b.character,p);else if(m.line<b.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let y=m.line+1;y<b.line;y++)d.unshift(()=>l(y,p));o(b.line,0,b.character,p)}}d.forEach(p=>p())}}}function hD(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Mt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],o=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,c=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,d=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(o||l||c||d){if(o&&l||c&&d||c&&n.start.offset===n.end.offset||l&&a.start.offset===a.end.offset)continue;throw new Mt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function LS(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(LS).join(""):""}const pD=[fD()];function ef(e){const t=mD(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...pD]}function mD(e){const t=[],n=[],r=[];for(const a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":n.push(a);break;default:r.push(a)}return{pre:t,post:n,normal:r}}var $a=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Nm={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function gD(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function M_(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function bD(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Nm[r]&&t.push({type:"setDecoration",value:Nm[r]});else if(r<=29){const a=Nm[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:$a[r-30]}});else if(r===38){const a=M_(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:$a[r-40]}});else if(r===48){const a=M_(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:$a[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:$a[r-100+8]}})}return t}function yD(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let o=0;do{const l=gD(r,o),c=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(c.length>0&&a.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=bD(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=l.position}while(o<r.length);return a}}}var ED={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 vD(e=ED){function t(c){return e[c]}function n(c){return`#${c.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let f=0;f<$a.length;f++)r.push(t($a[f]));let c=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)r.push(n([c[f],c[p],c[m]]));let d=8;for(let f=0;f<24;f++,d+=10)r.push(n([d,d,d]));return r}function o(c){return a()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return o(c.index)}}return{value:l}}const _D={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function xD(e,t,n){const r=Zd(e,n),a=Cf(t),o=Object.fromEntries($a.map(d=>{const f=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,p=e.colors?.[f];return[d,p||_D[d]]})),l=vD(o),c=yD();return a.map(d=>c.parse(d[0]).map(f=>{let p,m;f.decorations.has("reverse")?(p=f.background?l.value(f.background):e.bg,m=f.foreground?l.value(f.foreground):e.fg):(p=f.foreground?l.value(f.foreground):e.fg,m=f.background?l.value(f.background):void 0),p=la(p,r),m=la(m,r),f.decorations.has("dim")&&(p=TD(p));let b=ln.None;return f.decorations.has("bold")&&(b|=ln.Bold),f.decorations.has("italic")&&(b|=ln.Italic),f.decorations.has("underline")&&(b|=ln.Underline),f.decorations.has("strikethrough")&&(b|=ln.Strikethrough),{content:f.value,offset:d[1],color:p,bgColor:m,fontStyle:b}}))}function TD(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const a=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${a}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const a=r[0],o=r[1],l=r[2],c=r[3],d=Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0");return`#${a}${a}${o}${o}${l}${l}${d}`}else if(r.length===3){const a=r[0],o=r[1],l=r[2];return`#${a}${a}${o}${o}${l}${l}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Kg(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,a=e.resolveLangAlias(n.lang||"text");if(Qg(a)||Wg(r))return Cf(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:o,colorMap:l}=e.setTheme(r);if(a==="ansi")return xD(o,t,n);const c=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==c.name)throw new Mt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Mt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return CD(t,c,o,l,n)}function SD(...e){if(e.length===2)return Eu(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(Qg(a)||Wg(o))throw new Mt("Plain language does not have grammar state");if(a==="ansi")throw new Mt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(o),d=t.getLanguage(a);return new Do(tf(n,d,l,c,r).stateStack,d.name,l.name)}function CD(e,t,n,r,a){const o=tf(e,t,n,r,a),l=new Do(tf(e,t,n,r,a).stateStack,t.name,n.name);return wf(o.tokens,l),o.tokens}function tf(e,t,n,r,a){const o=Zd(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500}=a,d=Cf(e);let f=a.grammarState?dD(a.grammarState,n.name)??$0:a.grammarContextCode!=null?tf(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:$0,p=[];const m=[];for(let b=0,y=d.length;b<y;b++){const[_,T]=d[b];if(_===""){p=[],m.push([]);continue}if(l>0&&_.length>=l){p=[],m.push([{content:_,offset:T,color:"",fontStyle:0}]);continue}let A,C,k;a.includeExplanation&&(A=t.tokenizeLine(_,f,c),C=A.tokens,k=0);const N=t.tokenizeLine2(_,f,c),L=N.tokens.length/2;for(let O=0;O<L;O++){const P=N.tokens[2*O],V=O+1<L?N.tokens[2*O+2]:_.length;if(P===V)continue;const G=N.tokens[2*O+1],Z=la(r[xo.getForeground(G)],o),z=xo.getFontStyle(G),re={content:_.substring(P,V),offset:T+P,color:Z,fontStyle:z};if(a.includeExplanation){const W=[];if(a.includeExplanation!=="scopeName")for(const ue of n.settings){let se;switch(typeof ue.scope){case"string":se=ue.scope.split(/,/).map(B=>B.trim());break;case"object":se=ue.scope;break;default:continue}W.push({settings:ue,selectors:se.map(B=>B.split(/ /))})}re.explanation=[];let he=0;for(;P+he<V;){const ue=C[k],se=_.substring(ue.startIndex,ue.endIndex);he+=se.length,re.explanation.push({content:se,scopes:a.includeExplanation==="scopeName"?wD(ue.scopes):AD(W,ue.scopes)}),k+=1}}p.push(re)}m.push(p),p=[],f=N.ruleStack}return{tokens:m,stateStack:f}}function wD(e){return e.map(t=>({scopeName:t}))}function AD(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];n[r]={scopeName:o,themeMatches:ND(e,o,t.slice(0,r))}}return n}function P_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function kD(e,t,n){if(!P_(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)P_(e[r],n[a])&&(r-=1),a-=1;return r===-1}function ND(e,t,n){const r=[];for(const{selectors:a,settings:o}of e)for(const l of a)if(kD(l,t,n)){r.push(o);break}return r}function OS(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),a=r.map(d=>{const f=Kg(e,t,{...n,theme:d.theme}),p=Eu(f),m=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:p,theme:m}}),o=RD(...a.map(d=>d.tokens)),l=o[0].map((d,f)=>d.map((p,m)=>{const b={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in n&&n.includeExplanation&&(b.explanation=p.explanation),o.forEach((y,_)=>{const{content:T,explanation:A,offset:C,...k}=y[f][m];b.variants[r[_].color]=k}),b})),c=a[0].state?new Do(Object.fromEntries(a.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),a[0].state.lang):void 0;return c&&wf(l,c),l}function RD(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),o=t.map(()=>[]);t.forEach((d,f)=>d.push(o[f]));const l=a.map(()=>0),c=a.map(d=>d[0]);for(;c.every(d=>d);){const d=Math.min(...c.map(f=>f.content.length));for(let f=0;f<n;f++){const p=c[f];p.content.length===d?(o[f].push(p),l[f]+=1,c[f]=a[f][l[f]]):(o[f].push({...p,content:p.content.slice(0,d)}),c[f]={...p,content:p.content.slice(d),offset:p.offset+d})}}}return t}function nf(e,t,n){let r,a,o,l,c,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,b=Object.entries(n.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,k)=>C.color===f?-1:k.color===f?1:0);if(b.length===0)throw new Mt("`themes` option must not be empty");const y=OS(e,t,n);if(d=Eu(y),f&&Xg!==f&&!b.find(C=>C.color===f))throw new Mt(`\`themes\` option must contain the defaultColor key \`${f}\``);const _=b.map(C=>e.getTheme(C.theme)),T=b.map(C=>C.color);o=y.map(C=>C.map(k=>uD(k,T,p,f,m))),d&&wf(o,d);const A=b.map(C=>Zd(C.theme,n));a=B_(b,_,A,p,f,"fg",m),r=B_(b,_,A,p,f,"bg",m),l=`shiki-themes ${_.map(C=>C.name).join(" ")}`,c=f?void 0:[a,r].join(";")}else if("theme"in n){const f=Zd(n.theme,n);o=Kg(e,t,n);const p=e.getTheme(n.theme);r=la(p.bg,f),a=la(p.fg,f),l=p.name,d=Eu(o)}else throw new Mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:r,themeName:l,rootStyle:c,grammarState:d}}function B_(e,t,n,r,a,o,l){return e.map((c,d)=>{const f=la(t[d][o],n[d])||"inherit",p=`${r+c.color}${o==="bg"?"-bg":""}:${f}`;if(d===0&&a){if(a===Xg&&e.length>1){const m=e.findIndex(T=>T.color==="light"),b=e.findIndex(T=>T.color==="dark");if(m===-1||b===-1)throw new Mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=la(t[m][o],n[m])||"inherit",_=la(t[b][o],n[b])||"inherit";return`light-dark(${y}, ${_});${p}`}return f}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}function rf(e,t,n,r={meta:{},options:n,codeToHast:(a,o)=>rf(e,a,o),codeToTokens:(a,o)=>nf(e,a,o)}){let a=t;for(const _ of ef(n))a=_.preprocess?.call(r,a,n)||a;let{tokens:o,fg:l,bg:c,themeName:d,rootStyle:f,grammarState:p}=nf(e,a,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:b=!1}=n;m===!0?o=OD(o):m==="never"&&(o=DD(o)),b&&(o=ID(o));const y={...r,get source(){return a}};for(const _ of ef(n))o=_.tokens?.call(y,o)||o;return LD(o,{...n,fg:l,bg:c,themeName:d,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,p)}function LD(e,t,n,r=Eu(e)){const a=ef(t),o=[],l={type:"root",children:[]},{structure:c="classic",tabindex:d="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(f.tabindex=d.toString());for(const[T,A]of Object.entries(t.meta||{}))T.startsWith("_")||(f[T]=A);let p={type:"element",tagName:"pre",properties:f,children:[]},m={type:"element",tagName:"code",properties:{},children:o};const b=[],y={...n,structure:c,addClassToHast:NS,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return b}};if(e.forEach((T,A)=>{A&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&o.push({type:"text",value:`
|
|
21
|
+
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const N of T){let L={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const O=Y0(N.htmlStyle||Jd(N));O&&(L.properties.style=O);for(const P of a)L=P?.span?.call(y,L,A+1,k,C,N)||L;c==="inline"?l.children.push(L):c==="classic"&&C.children.push(L),k+=N.content.length}if(c==="classic"){for(const N of a)C=N?.line?.call(y,C,A+1)||C;b.push(C),o.push(C)}else c==="inline"&&b.push(C)}),c==="classic"){for(const T of a)m=T?.code?.call(y,m)||m;p.children.push(m);for(const T of a)p=T?.pre?.call(y,p)||p;l.children.push(p)}else if(c==="inline"){const T=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const N of l.children)N.type==="element"&&N.tagName==="br"?(T.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(N.type==="element"||N.type==="text")&&A.children.push(N);T.push(A);let k={type:"element",tagName:"code",properties:{},children:T};for(const N of a)k=N?.code?.call(y,k)||k;l.children=[];for(let N=0;N<k.children.length;N++){N>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const L=k.children[N];L.type==="element"&&l.children.push(...L.children)}}let _=l;for(const T of a)_=T?.root?.call(y,_)||_;return r&&wf(_,r),_}function OD(e){return e.map(t=>{const n=[];let r="",a;return t.forEach((o,l)=>{const d=!(o.fontStyle&&(o.fontStyle&ln.Underline||o.fontStyle&ln.Strikethrough));d&&o.content.match(/^\s+$/)&&t[l+1]?(a===void 0&&(a=o.offset),r+=o.content):r?(d?n.push({...o,offset:a,content:r+o.content}):n.push({content:r,offset:a},o),a=void 0,r=""):n.push(o)}),n})}function DD(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,a,o,l]=r;if(!a&&!l)return n;const c=[{...n,offset:n.offset+a.length,content:o}];return a&&c.unshift({content:a,offset:n.offset}),l&&c.push({content:l,offset:n.offset+a.length+o.length}),c}))}function ID(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n[n.length-1],o=Y0(a.htmlStyle||Jd(a)),l=Y0(r.htmlStyle||Jd(r)),c=a.fontStyle&&(a.fontStyle&ln.Underline||a.fontStyle&ln.Strikethrough),d=r.fontStyle&&(r.fontStyle&ln.Underline||r.fontStyle&ln.Strikethrough);!c&&!d&&o===l?a.content+=r.content:n.push({...r})}return n})}const MD=bi;function PD(e,t,n){const r={meta:{},options:n,codeToHast:(o,l)=>rf(e,o,l),codeToTokens:(o,l)=>nf(e,o,l)};let a=MD(rf(e,t,n,r));for(const o of ef(n))a=o.postprocess?.call(r,a,n)||a;return a}const j_={light:"#333333",dark:"#bbbbbb"},H_={light:"#fffffe",dark:"#1e1e1e"},F_="__shiki_resolved";function Af(e){if(e?.[F_])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const c=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;c?.settings?.foreground&&(r=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?j_.light:j_.dark),n||(n=t.type==="light"?H_.light:H_.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const o=new Map;function l(c){if(o.has(c))return o.get(c);a+=1;const d=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?l(c):(o.set(c,d),d)}t.settings=t.settings.map(c=>{const d=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),f=c.settings?.background&&!c.settings.background.startsWith("#");if(!d&&!f)return c;const p={...c,settings:{...c.settings}};if(d){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(f){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const d=l(t.colors[c]);t.colorReplacements[d]=t.colors[c],t.colors[c]=d}return Object.defineProperty(t,F_,{enumerable:!1,writable:!1,value:!0}),t}async function DS(e){return Array.from(new Set((await Promise.all(e.filter(t=>!AS(t)).map(async t=>await wS(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function IS(e){return(await Promise.all(e.map(async n=>kS(n)?null:Af(await wS(n))))).filter(n=>!!n)}let BD=3;function jD(e,t=3){t>BD||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let po=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function MS(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new po(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class HD extends YO{constructor(t,n,r,a={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=a,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Af(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Gd.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=MS(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const a=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(a.name=t.name,this._resolvedGrammars.set(t.name,a),t.aliases&&t.aliases.forEach(o=>{this._alias[o]=t.name}),this._loadedLanguagesCache=null,n.size)for(const o of n)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const a of t)this.resolveEmbeddedLanguages(a);const n=Array.from(this._langGraph.entries()),r=n.filter(([a,o])=>!o);if(r.length){const a=n.filter(([o,l])=>l?(l.embeddedLanguages||l.embeddedLangs)?.some(d=>r.map(([f])=>f).includes(d)):!1).filter(o=>!r.includes(o));throw new po(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${a.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[a,o]of n)this._resolver.addLanguage(o);for(const[a,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class FD{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let a=1;a<=n.length;a++){const o=n.slice(0,a).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Bl=0;function UD(e){Bl+=1,e.warnings!==!1&&Bl>=10&&Bl%10===0&&console.warn(`[Shiki] ${Bl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new po("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Af),a=new FD(e.engine,n),o=new HD(a,r,n,e.langAlias);let l;function c(N){return MS(N,e.langAlias)}function d(N){C();const L=o.getGrammar(typeof N=="string"?N:N.name);if(!L)throw new po(`Language \`${N}\` not found, you may need to load it first`);return L}function f(N){if(N==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const L=o.getTheme(N);if(!L)throw new po(`Theme \`${N}\` not found, you may need to load it first`);return L}function p(N){C();const L=f(N);l!==N&&(o.setTheme(L),l=N);const O=o.getColorMap();return{theme:L,colorMap:O}}function m(){return C(),o.getLoadedThemes()}function b(){return C(),o.getLoadedLanguages()}function y(...N){C(),o.loadLanguages(N.flat(1))}async function _(...N){return y(await DS(N))}function T(...N){C();for(const L of N.flat(1))o.loadTheme(L)}async function A(...N){return C(),T(await IS(N))}function C(){if(t)throw new po("Shiki instance has been disposed")}function k(){t||(t=!0,o.dispose(),Bl-=1)}return{setTheme:p,getTheme:f,getLanguage:d,getLoadedThemes:m,getLoadedLanguages:b,resolveLangAlias:c,loadLanguage:_,loadLanguageSync:y,loadTheme:A,loadThemeSync:T,dispose:k,[Symbol.dispose]:k}}async function zD(e){e.engine||jD("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([IS(e.themes||[]),DS(e.langs||[]),e.engine]);return UD({...e,themes:t,langs:n,engine:r})}async function $D(e){const t=await zD(e);return{getLastGrammarState:(...n)=>SD(t,...n),codeToTokensBase:(n,r)=>Kg(t,n,r),codeToTokensWithThemes:(n,r)=>OS(t,n,r),codeToTokens:(n,r)=>nf(t,n,r),codeToHast:(n,r)=>rf(t,n,r),codeToHtml:(n,r)=>PD(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function VD(e){const t=e.langs,n=e.themes,r=e.engine;async function a(o){function l(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,AS(m))return[];const b=t[m];if(!b)throw new Mt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return b}return m}function c(m){if(kS(m))return"none";if(typeof m=="string"){const b=n[m];if(!b)throw new Mt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return b}return m}const d=(o.themes??[]).map(m=>c(m)),f=(o.langs??[]).map(m=>l(m)),p=await $D({engine:o.engine??r(),...o,themes:d,langs:f});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}const PS=[{id:"abap",name:"ABAP",import:(()=>M(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>M(()=>import("./actionscript-3-CfeIJUat.js"),[]))},{id:"ada",name:"Ada",import:(()=>M(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>M(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>M(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>M(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>M(()=>import("./apex-DDbsPZ6N.js"),[]))},{id:"apl",name:"APL",import:(()=>M(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>M(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>M(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>M(()=>import("./asciidoc-Dv7Oe6Be.js"),[]))},{id:"asm",name:"Assembly",import:(()=>M(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>M(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>M(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>M(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>M(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>M(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>M(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>M(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>M(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"blade",name:"Blade",import:(()=>M(()=>import("./blade-DVc8C-J4.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>M(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>M(()=>import("./c-BIGW1oBm.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>M(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>M(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>M(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>M(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>M(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>M(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>M(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>M(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>M(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>M(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>M(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>M(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>M(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>M(()=>import("./csharp-K5feNrxe.js"),[]))},{id:"css",name:"CSS",import:(()=>M(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>M(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>M(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>M(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>M(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>M(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>M(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>M(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>M(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>M(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>M(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>M(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>M(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>M(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>M(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>M(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>M(()=>import("./erb-BOJIQeun.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>M(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>M(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>M(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>M(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>M(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>M(()=>import("./fortran-free-form-D22FLkUw.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>M(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",import:(()=>M(()=>import("./gdresource-B7Tvp0Sc.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",import:(()=>M(()=>import("./gdscript-DTMYz4Jt.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>M(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>M(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>M(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>M(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>M(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>M(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>M(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>M(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>M(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gnuplot",name:"Gnuplot",import:(()=>M(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>M(()=>import("./go-Dn2_MT6a.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>M(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>M(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>M(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>M(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>M(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>M(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>M(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>M(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>M(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>M(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>M(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>M(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>M(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>M(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>M(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>M(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>M(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>M(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>M(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>M(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>M(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>M(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>M(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>M(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>M(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>M(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>M(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>M(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>M(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>M(()=>import("./julia-C8NyazO9.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"kdl",name:"KDL",import:(()=>M(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>M(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>M(()=>import("./kusto-BvAqAH-y.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>M(()=>import("./latex-BdAV_C_H.js"),__vite__mapDeps([63,64,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>M(()=>import("./lean-Bc6EcWN3.js"),[]))},{id:"less",name:"Less",import:(()=>M(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>M(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([65,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>M(()=>import("./llvm-BtvRca6l.js"),[]))},{id:"log",name:"Log file",import:(()=>M(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>M(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>M(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>M(()=>import("./luau-CXu1NL6O.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>M(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>M(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>M(()=>import("./marko-CPi9NSCl.js"),__vite__mapDeps([66,3,67,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>M(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>M(()=>import("./mdc-DUICxH0z.js"),__vite__mapDeps([68,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>M(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>M(()=>import("./mermaid-DKYwYmdq.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>M(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>M(()=>import("./mojo-1DNp92w6.js"),[]))},{id:"move",name:"Move",import:(()=>M(()=>import("./move-Bu9oaDYs.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>M(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>M(()=>import("./nextflow-BrzmwbiE.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>M(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([69,37,26])))},{id:"nim",name:"Nim",import:(()=>M(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([70,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>M(()=>import("./nix-c8nO5XWb.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>M(()=>import("./nushell-C-sUppwS.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>M(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>M(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>M(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>M(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>M(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>M(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([71,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>M(()=>import("./php-CDn_0X-4.js"),__vite__mapDeps([72,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>M(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>M(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>M(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>M(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>M(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>M(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>M(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>M(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>M(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>M(()=>import("./proto-DyJlTyXw.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>M(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([73,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>M(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>M(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>M(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>M(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([74,2])))},{id:"qmldir",name:"QML Directory",import:(()=>M(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>M(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>M(()=>import("./r-DiinP2Uv.js"),[]))},{id:"racket",name:"Racket",import:(()=>M(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>M(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>M(()=>import("./razor-CE9lU5zL.js"),__vite__mapDeps([75,1,2,3,76])))},{id:"reg",name:"Windows Registry Script",import:(()=>M(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>M(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>M(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>M(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>M(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>M(()=>import("./rst-B0xPkSld.js"),__vite__mapDeps([77,15,1,2,3,23,24,25,26,16,20,28,38,78,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>M(()=>import("./ruby-BvKwtOVI.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>M(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>M(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([79,16])))},{id:"sass",name:"Sass",import:(()=>M(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>M(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>M(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>M(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>M(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>M(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([80,81])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>M(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>M(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([82,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>M(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>M(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>M(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([83,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>M(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([84,85])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>M(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>M(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>M(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>M(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([86,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>M(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>M(()=>import("./svelte-3Dk4HxPD.js"),__vite__mapDeps([87,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>M(()=>import("./swift-Dg5xB15N.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>M(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>M(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>M(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>M(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>M(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>M(()=>import("./templ-W15q3VgB.js"),__vite__mapDeps([88,89,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>M(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>M(()=>import("./tex-CxkMU7Pf.js"),__vite__mapDeps([64,62])))},{id:"toml",name:"TOML",import:(()=>M(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>M(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([90,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>M(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>M(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>M(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>M(()=>import("./twig-CO9l9SDP.js"),__vite__mapDeps([91,3,2,5,72,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>M(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>M(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>M(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>M(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>M(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>M(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>M(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>M(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>M(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>M(()=>import("./vue-DnHKYNfI.js"),__vite__mapDeps([92,3,2,11,9,15,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>M(()=>import("./vue-html-CChd_i61.js"),__vite__mapDeps([93,92,3,2,11,9,15,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>M(()=>import("./vue-vine-8moa0y9V.js"),__vite__mapDeps([94,3,5,67,95,12,92,2,11,9,15,1])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>M(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>M(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>M(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>M(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>M(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>M(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>M(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>M(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>M(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([96,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>M(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>M(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>M(()=>import("./zig-VOosw3JB.js"),[]))}],qD=Object.fromEntries(PS.map(e=>[e.id,e.import])),GD=Object.fromEntries(PS.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),BS={...qD,...GD},YD=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>M(()=>import("./andromeeda-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>M(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>M(()=>import("./ayu-dark-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>M(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>M(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>M(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>M(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>M(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>M(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>M(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>M(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>M(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>M(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>M(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>M(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>M(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>M(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>M(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>M(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>M(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>M(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>M(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>M(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>M(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>M(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>M(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>M(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>M(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>M(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>M(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>M(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>M(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>M(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>M(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>M(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>M(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>M(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>M(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>M(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>M(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>M(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>M(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>M(()=>import("./one-light-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>M(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>M(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>M(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>M(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>M(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>M(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>M(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>M(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>M(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>M(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>M(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>M(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>M(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>M(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>M(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>M(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>M(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],jS=Object.fromEntries(YD.map(e=>[e.id,e.import]));class Zg extends Error{constructor(t){super(t),this.name="ShikiError"}}function QD(){return 2147483648}function WD(){return typeof performance<"u"?performance.now():Date.now()}const XD=(e,t)=>e+(t-e%t)%t;async function KD(e){let t,n;const r={};function a(y){n=y,r.HEAPU8=new Uint8Array(y),r.HEAPU32=new Uint32Array(y)}function o(y,_,T){r.HEAPU8.copyWithin(y,_,_+T)}function l(y){try{return t.grow(y-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function c(y){const _=r.HEAPU8.length;y=y>>>0;const T=QD();if(y>T)return!1;for(let A=1;A<=4;A*=2){let C=_*(1+.2/A);C=Math.min(C,y+100663296);const k=Math.min(T,XD(Math.max(y,C),65536));if(l(k))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(y,_,T=1024){const A=_+T;let C=_;for(;y[C]&&!(C>=A);)++C;if(C-_>16&&y.buffer&&d)return d.decode(y.subarray(_,C));let k="";for(;_<C;){let N=y[_++];if(!(N&128)){k+=String.fromCharCode(N);continue}const L=y[_++]&63;if((N&224)===192){k+=String.fromCharCode((N&31)<<6|L);continue}const O=y[_++]&63;if((N&240)===224?N=(N&15)<<12|L<<6|O:N=(N&7)<<18|L<<12|O<<6|y[_++]&63,N<65536)k+=String.fromCharCode(N);else{const P=N-65536;k+=String.fromCharCode(55296|P>>10,56320|P&1023)}}return k}function p(y,_){return y?f(r.HEAPU8,y,_):""}const m={emscripten_get_now:WD,emscripten_memcpy_big:o,emscripten_resize_heap:c,fd_write:()=>0};async function b(){const _=await e({env:m,wasi_snapshot_preview1:m});t=_.memory,a(t.buffer),Object.assign(r,_),r.UTF8ToString=p}return await b(),r}var ZD=Object.defineProperty,JD=(e,t,n)=>t in e?ZD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t,n)=>JD(e,typeof t!="symbol"?t+"":t,n);let Gt=null;function eI(e){throw new Zg(e.UTF8ToString(e.getLastOnigError()))}class kf{constructor(t){Ht(this,"utf16Length"),Ht(this,"utf8Length"),Ht(this,"utf16Value"),Ht(this,"utf8Value"),Ht(this,"utf16OffsetToUtf8"),Ht(this,"utf8OffsetToUtf16");const n=t.length,r=kf._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const c=new Uint8Array(r);let d=0;for(let f=0;f<n;f++){const p=t.charCodeAt(f);let m=p,b=!1;if(p>=55296&&p<=56319&&f+1<n){const y=t.charCodeAt(f+1);y>=56320&&y<=57343&&(m=(p-55296<<10)+65536|y-56320,b=!0)}a&&(o[f]=d,b&&(o[f+1]=d),m<=127?l[d+0]=f:m<=2047?(l[d+0]=f,l[d+1]=f):m<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),m<=127?c[d++]=m:m<=2047?(c[d++]=192|(m&1984)>>>6,c[d++]=128|(m&63)>>>0):m<=65535?(c[d++]=224|(m&61440)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0):(c[d++]=240|(m&1835008)>>>18,c[d++]=128|(m&258048)>>>12,c[d++]=128|(m&4032)>>>6,c[d++]=128|(m&63)>>>0),b&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const o=t.charCodeAt(r);let l=o,c=!1;if(o>=55296&&o<=56319&&r+1<a){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(o-55296<<10)+65536|d-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Nf=class Rr{constructor(t){if(Ht(this,"id",++Rr.LAST_ID),Ht(this,"_onigBinding"),Ht(this,"content"),Ht(this,"utf16Length"),Ht(this,"utf8Length"),Ht(this,"utf16OffsetToUtf8"),Ht(this,"utf8OffsetToUtf16"),Ht(this,"ptr"),!Gt)throw new Zg("Must invoke loadWasm first.");this._onigBinding=Gt,this.content=t;const n=new kf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Rr._sharedPtrInUse?(Rr._sharedPtr||(Rr._sharedPtr=Gt.omalloc(1e4)),Rr._sharedPtrInUse=!0,Gt.HEAPU8.set(n.utf8Value,Rr._sharedPtr),this.ptr=Rr._sharedPtr):this.ptr=n.createString(Gt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Rr._sharedPtr?Rr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ht(Nf,"LAST_ID",0);Ht(Nf,"_sharedPtr",0);Ht(Nf,"_sharedPtrInUse",!1);let HS=Nf;class tI{constructor(t){if(Ht(this,"_onigBinding"),Ht(this,"_ptr"),!Gt)throw new Zg("Must invoke loadWasm first.");const n=[],r=[];for(let c=0,d=t.length;c<d;c++){const f=new kf(t[c]);n[c]=f.createString(Gt),r[c]=f.utf8Length}const a=Gt.omalloc(4*t.length);Gt.HEAPU32.set(n,a/4);const o=Gt.omalloc(4*t.length);Gt.HEAPU32.set(r,o/4);const l=Gt.createOnigScanner(a,o,t.length);for(let c=0,d=t.length;c<d;c++)Gt.ofree(n[c]);Gt.ofree(o),Gt.ofree(a),l===0&&eI(Gt),this._onigBinding=Gt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new HS(t);const o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const c=o.HEAPU32;let d=l/4;const f=c[d++],p=c[d++],m=[];for(let b=0;b<p;b++){const y=t.convertUtf8OffsetToUtf16(c[d++]),_=t.convertUtf8OffsetToUtf16(c[d++]);m[b]={start:y,end:_,length:_-y}}return{index:f,captureIndices:m}}}function nI(e){return typeof e.instantiator=="function"}function rI(e){return typeof e.default=="function"}function iI(e){return typeof e.data<"u"}function aI(e){return typeof Response<"u"&&e instanceof Response}function sI(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let od;function oI(e){if(od)return od;async function t(){Gt=await KD(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),nI(r)?r=await r.instantiator(n):rI(r)?r=await r.default(n):(iI(r)&&(r=r.data),aI(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await lI(r)(n):r=await uI(r)(n):sI(r)?r=await Rm(r)(n):r instanceof WebAssembly.Module?r=await Rm(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Rm(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return od=t(),od}function Rm(e){return t=>WebAssembly.instantiate(e,t)}function lI(e){return t=>WebAssembly.instantiateStreaming(e,t)}function uI(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function cI(e){return e&&await oI(e),{createScanner(t){return new tI(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new HS(t)}}}const dI=VD({langs:BS,themes:jS,engine:()=>cI(M(()=>import("./wasm-CG6Dc4jp.js"),[]))});function Io(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function fI(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Jg=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Yt=String.raw;function Mo(e,t){if(e==null)throw new Error(t??"Value expected");return e}const FS=Yt`\[\^?`,US=`c.? | C(?:-.?)?|${Yt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Yt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Yt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Yt`o\{[^\}]*\}?`}|${Yt`\d{1,3}`}`,eb=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ld=new RegExp(Yt`
|
|
22
|
+
\\ (?:
|
|
23
|
+
${US}
|
|
24
|
+
| [gk]<[^>]*>?
|
|
25
|
+
| [gk]'[^']*'?
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \( (?:
|
|
29
|
+
\? (?:
|
|
30
|
+
[:=!>({]
|
|
31
|
+
| <[=!]
|
|
32
|
+
| <[^>]*>
|
|
33
|
+
| '[^']*'
|
|
34
|
+
| ~\|?
|
|
35
|
+
| #(?:[^)\\]|\\.?)*
|
|
36
|
+
| [^:)]*[:)]
|
|
37
|
+
)?
|
|
38
|
+
| \*[^\)]*\)?
|
|
39
|
+
)?
|
|
40
|
+
| (?:${eb.source})+
|
|
41
|
+
| ${FS}
|
|
42
|
+
| .
|
|
43
|
+
`.replace(/\s+/g,""),"gsu"),Lm=new RegExp(Yt`
|
|
44
|
+
\\ (?:
|
|
45
|
+
${US}
|
|
46
|
+
| .
|
|
47
|
+
)
|
|
48
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
+
| ${FS}
|
|
50
|
+
| &&
|
|
51
|
+
| .
|
|
52
|
+
`.replace(/\s+/g,""),"gsu");function hI(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=OI(n.flags),a=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(m){a.push(m)},replaceCurrentModX(m){a[a.length-1]=m},singleline:n.rules.singleline};let l=[],c;for(ld.lastIndex=0;c=ld.exec(e);){const m=pI(o,e,c[0],ld.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(ld.lastIndex=m.lastIndex)}const d=[];let f=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++f:m.raw==="("&&d.push(m)}),f||d.forEach((m,b)=>{m.kind="capturing",m.number=b+1});const p=f||d.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?II(m,p):m).flat(),flags:r}}function pI(e,t,n,r){const[a,o]=n;if(n==="["||n==="[^"){const l=mI(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(o))return{token:U_(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:CI(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:$S(n)}}if(o==="K")return{token:VS("keep",n)};if(o==="N"||o==="R")return{token:Va("newline",n,{negate:o==="N"})};if(o==="O")return{token:Va("any",n)};if(o==="X")return{token:Va("text_segment",n)};const l=zS(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(a==="("){if(o==="*")return{token:NI(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:kI(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:uo("group",n)};if(n==="(?>")return{token:uo("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:uo(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:uo("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:uo("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:xI(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
53
|
+
`,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:Va("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Yt`\A`,$:Yt`\Z`}[n]:n;return{token:U_(l,n)}}return n==="|"?{token:bI(n)}:eb.test(n)?{tokens:MI(n)}:{token:gi(Io(n),n)}}function mI(e,t,n){const r=[z_(t[1]==="^",t)];let a=1,o;for(Lm.lastIndex=n;o=Lm.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")a++,r.push(z_(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(gi(93,l));else if(a--,r.push(yI(l)),!a)break}else{const c=gI(l);Array.isArray(c)?r.push(...c):r.push(c)}}return{tokens:r,lastIndex:Lm.lastIndex||e.length}}function gI(e){if(e[0]==="\\")return zS(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Jg.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Va("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?EI(e):e==="&&"?vI(e):gi(Io(e),e)}function zS(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return AI(e);if("dDhHsSwW".includes(n))return RI(e);if(e.startsWith(Yt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return LI(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...a].map(l=>{const c=[...o.encode(l)].map(d=>`\\x${d.toString(16)}`).join("");return gi(Io(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return gi(DI(e),e);if($_.has(n))return gi($_.get(n),e);if(/\d/.test(n))return _I(t,e);if(e==="\\")throw new Error(Yt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return gi(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function bI(e){return{type:"Alternator",raw:e}}function U_(e,t){return{type:"Assertion",kind:e,raw:t}}function $S(e){return{type:"Backreference",raw:e}}function gi(e,t){return{type:"Character",value:e,raw:t}}function yI(e){return{type:"CharacterClassClose",raw:e}}function EI(e){return{type:"CharacterClassHyphen",raw:e}}function vI(e){return{type:"CharacterClassIntersector",raw:e}}function z_(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Va(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function VS(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Mo(n.flags),raw:t}}function _I(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function xI(e){return{type:"GroupClose",raw:e}}function uo(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function TI(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function SI(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function CI(e){return{type:"Subroutine",raw:e}}const wI=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),$_=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function AI(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return gi(Io(t.toUpperCase())-64,e)}function kI(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const a=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=q_(n),l=q_(r),c={};if(o&&(c.enable=o),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(a),VS("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,uo("group",e,{...(o||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function NI(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:a}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=a?a.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,d]=o,f=wI.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return TI(f,r??null,a?.split(",")??null,e)}function V_(e){let t=null,n,r;if(e[0]==="{"){const{minStr:a,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+a>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+a,r=o===void 0?+a:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return SI(t,n,r,e)}function RI(e){const t=e[1].toLowerCase();return Va({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function LI(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Va("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function q_(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function OI(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function DI(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function II(e,t){const{raw:n,inCharClass:r}=e,a=n.slice(1);if(!r&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[$S(n)];const o=[],l=a.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const d=l[c];let f;if(c===0&&d!=="8"&&d!=="9"){if(f=parseInt(d,8),f>127)throw new Error(Yt`Octal encoded byte above 177 unsupported "${n}"`)}else f=Io(d);o.push(gi(f,(c===0?"\\":"")+d))}return o}function MI(e){const t=[],n=new RegExp(eb,"gy");let r;for(;r=n.exec(e);){const a=r[0];if(a[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(o){const{min:l,max:c}=o.groups;if(+l>+c&&a.endsWith("?")){n.lastIndex--,t.push(V_(a.slice(0,-1)));continue}}}t.push(V_(a))}return t}function qS(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function PI(e){return BI.has(e.type)}const BI=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function GS(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=hI(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),a=(b,y)=>{const _=r.tokens[o.nextIndex];switch(o.parent=b,o.nextIndex++,_.type){case"Alternator":return Ka();case"Assertion":return jI(_);case"Backreference":return HI(_,o);case"Character":return Rf(_.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return FI(_,o,y);case"CharacterClassOpen":return UI(_,o,y);case"CharacterSet":return zI(_,o);case"Directive":return QI(_.kind,{flags:_.flags});case"GroupOpen":return $I(_,o,y);case"NamedCallout":return XI(_.kind,_.tag,_.arguments);case"Quantifier":return VI(_,o);case"Subroutine":return qI(_,o);default:throw new Error(`Unexpected token type "${_.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:a},l=ZI(WI(r.flags));let c=l.body[0];for(;o.nextIndex<r.tokens.length;){const b=a(c,{});b.type==="Alternative"?(l.body.push(b),c=b):c.body.push(b)}const{capturingGroups:d,hasNumberedRef:f,namedGroupsByName:p,subroutines:m}=o;if(f&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of m)if(typeof b=="number"){if(b>d.length)throw new Error("Subroutine uses a group number that's not defined");b&&(d[b-1].isSubroutined=!0)}else if(p.has(b)){if(p.get(b).length>1)throw new Error(Yt`Subroutine uses a duplicate group name "\g<${b}>"`);p.get(b)[0].isSubroutined=!0}else throw new Error(Yt`Subroutine uses a group name that's not defined "\g<${b}>"`);return l}function jI({kind:e}){return Q0(Mo({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Yt`\B`||e===Yt`\Y`})}function HI({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),a=(o,l=!1)=>{const c=t.capturingGroups.length;let d=!1;if(o>c)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,W0(l?c+1-o:o,{orphan:d})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return a(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return W0(r)}return a(+r)}function FI(e,t,n){const{tokens:r,walk:a}=t,o=t.parent,l=o.body.at(-1),c=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const d=a(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&d.type==="Character")return o.body.pop(),YI(l,d);throw new Error("Invalid character class range")}return Rf(Io("-"))}function UI({negate:e},t,n){const{tokens:r,walk:a}=t,o=r[t.nextIndex],l=[Rd()];let c=Q_(o);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")l.push(Rd()),t.nextIndex++;else{const f=l.at(-1);f.body.push(a(f,n))}c=Q_(r[t.nextIndex],o)}const d=Rd({negate:e});return l.length===1?d.body=l[0].body:(d.kind="intersection",d.body=l.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,d}function zI({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:l}=r;if(e==="property"){const c=Lf(n);if(Jg.has(c)&&!l?.has(c))e="posix",n=c;else return co(n,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?KI(n,{negate:t}):X0(e,{negate:t})}function $I(e,t,n){const{tokens:r,capturingGroups:a,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,d=JI(e),f=d.type==="AbsenceFunction",p=Y_(d),m=p&&d.negate;if(d.type==="CapturingGroup"&&(a.push(d),d.name&&fI(o,d.name,[]).push(d)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=W_(r[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(Ka()),t.nextIndex++;else{const y=d.body.at(-1),_=c(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(y.body.push(_),(p||n.isInLookbehind)&&!l){const T="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(G_(_)||_.type==="CapturingGroup")throw new Error(T)}else if(G_(_)||Y_(_)&&_.negate)throw new Error(T)}}b=W_(r[t.nextIndex])}return t.nextIndex++,d}function VI({kind:e,min:t,max:n},r){const a=r.parent,o=a.body.at(-1);if(!o||!PI(o))throw new Error("Quantifier requires a repeatable token");const l=QS(e,t,n,o);return a.body.pop(),l}function qI({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let a=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(o){const c=+o.groups.num,d=n.length;if(t.hasNumberedRef=!0,a={"":c,"+":d+c,"-":d+1-c}[o.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const l=WS(a);return r.push(l),l}function GI(e,t){return{type:"AbsenceFunction",kind:e,body:Ou(t?.body)}}function Ka(e){return{type:"Alternative",body:XS(e?.body)}}function Q0(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function W0(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function YS(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!e5(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ou(t?.body)}}function Rf(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Rd(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:XS(e?.body)}}function YI(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function X0(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function QI(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Mo(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function WI(e){return{type:"Flags",...e}}function Er(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ou(e?.body)}}function Ua(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ou(e?.body)}}function XI(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function KI(e,t){const n=!!t?.negate;if(!Jg.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function QS(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function ZI(e,t){return{type:"Regex",body:Ou(t?.body),flags:e}}function WS(e){return{type:"Subroutine",ref:e}}function co(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(Lf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=t5(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Yt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function JI({flags:e,kind:t,name:n,negate:r,number:a}){switch(t){case"absence_repeater":return GI("repeater");case"atomic":return Er({atomic:!0});case"capturing":return YS(a,{name:n});case"group":return Er({flags:e});case"lookahead":case"lookbehind":return Ua({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ou(e){if(e===void 0)e=[Ka()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function XS(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function G_(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Y_(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function e5(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function t5(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Lf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Q_(e,t){return Mo(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function W_(e){return Mo(e,"Unclosed group")}function tu(e,t,n=null){function r(o,l){for(let c=0;c<o.length;c++){const d=a(o[c],l,c,o);c=Math.max(-1,c+d)}}function a(o,l=null,c=null,d=null){let f=0,p=!1;const m={node:o,parent:l,key:c,container:d,root:e,remove(){ud(d).splice(Math.max(0,Js(c)+f),1),f--,p=!0},removeAllNextSiblings(){return ud(d).splice(Js(c)+1)},removeAllPrevSiblings(){const C=Js(c)+f;return f-=C,ud(d).splice(0,Math.max(0,C))},replaceWith(C,k={}){const N=!!k.traverse;d?d[Math.max(0,Js(c)+f)]=C:Mo(l,"Can't replace root node")[c]=C,N&&a(C,l,c,d),p=!0},replaceWithMultiple(C,k={}){const N=!!k.traverse;if(ud(d).splice(Math.max(0,Js(c)+f),1,...C),f+=C.length-1,N){let L=0;for(let O=0;O<C.length;O++)L+=a(C[O],l,Js(c)+O+L,d)}p=!0},skip(){p=!0}},{type:b}=o,y=t["*"],_=t[b],T=typeof y=="function"?y:y?.enter,A=typeof _=="function"?_:_?.enter;if(T?.(m,n),A?.(m,n),!p)switch(b){case"AbsenceFunction":case"CapturingGroup":case"Group":r(o.body,o);break;case"Alternative":case"CharacterClass":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(o.min,o,"min"),a(o.max,o,"max");break;case"LookaroundAssertion":r(o.body,o);break;case"Quantifier":a(o.body,o,"body");break;case"Regex":r(o.body,o),a(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${b}"`)}return _?.exit?.(m,n),y?.exit?.(m,n),f}return a(e),e}function ud(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Js(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const n5=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function r5(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function i5(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const ur=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function tb(e,t,n,r){const a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,c="";for(const d of e.matchAll(a)){const{0:f,groups:{$skip:p}}=d;if(!p&&(!r||r===ur.DEFAULT==!l)){n instanceof Function?c+=n(d,{context:l?ur.CHAR_CLASS:ur.DEFAULT,negated:o[o.length-1]}):c+=n;continue}f[0]==="["?(l++,o.push(f[1]==="^")):f==="]"&&l&&(l--,o.pop()),c+=f}return c}function KS(e,t,n,r){tb(e,t,n,r)}function a5(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let o=0,l;for(;l=a.exec(e);){const{0:c,groups:{$skip:d}}=l;if(!d&&(!r||r===ur.DEFAULT==!o))return l;c==="["?o++:c==="]"&&o&&o--,a.lastIndex==l.index&&a.lastIndex++}return null}function cd(e,t,n){return!!a5(e,t,0,n)}function s5(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,a=0,o=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")a++;else if(a)c==="]"&&a--;else if(c==="(")o++;else if(c===")"&&(o--,!o)){r=l.index;break}}return e.slice(t,r)}const X_=new RegExp(String.raw`(?<noncapturingStart>${n5})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function o5(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const a="(?>",o="(?:(?=(",l=[0],c=[];let d=0,f=0,p=NaN,m;do{m=!1;let b=0,y=0,_=!1,T;for(X_.lastIndex=Number.isNaN(p)?0:p+o.length;T=X_.exec(e);){const{0:A,index:C,groups:{capturingStart:k,noncapturingStart:N}}=T;if(A==="[")b++;else if(b)A==="]"&&b--;else if(A===a&&!_)p=C,_=!0;else if(_&&N)y++;else if(k)_?y++:(d++,l.push(d+f));else if(A===")"&&_){if(!y){f++;const L=d+f;if(e=`${e.slice(0,p)}${o}${e.slice(p+a.length,C)}))<$$${L}>)${e.slice(C+1)}`,m=!0,c.push(L),r5(n,L),r.size){const O=new Map;r.forEach((P,V)=>{O.set(V>=L?V+1:V,P.map(G=>G>=L?G+1:G))}),r=O}break}y--}}}while(m);return n.push(...c),e=tb(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:y,wrappedBackrefNum:_}})=>{if(y){const T=+y;if(T>l.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${l[T]}`}return`\\${_}`},ur.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const ZS=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Om=new RegExp(String.raw`
|
|
54
|
+
\\(?: \d+
|
|
55
|
+
| c[A-Za-z]
|
|
56
|
+
| [gk]<[^>]+>
|
|
57
|
+
| [pPu]\{[^\}]+\}
|
|
58
|
+
| u[A-Fa-f\d]{4}
|
|
59
|
+
| x[A-Fa-f\d]{2}
|
|
60
|
+
)
|
|
61
|
+
| \((?: \? (?: [:=!>]
|
|
62
|
+
| <(?:[=!]|[^>]+>)
|
|
63
|
+
| [A-Za-z\-]+:
|
|
64
|
+
| \(DEFINE\)
|
|
65
|
+
))?
|
|
66
|
+
| (?<qBase>${ZS})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
|
+
| \\?.
|
|
68
|
+
`.replace(/\s+/g,""),"gsu");function l5(e){if(!new RegExp(`${ZS}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,a="",o=0,l;for(Om.lastIndex=0;l=Om.exec(e);){const{0:c,index:d,groups:{qBase:f,qMod:p,invalidQ:m}}=l;if(c==="[")o||(r=d),o++;else if(c==="]")o?o--:r=null;else if(!o)if(p==="+"&&a&&!a.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let b=-1;if(/^\{\d+\}$/.test(f))e=i5(e,d+f.length,p,"");else{if(a===")"||a==="]"){const y=a===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,y)}(?>${e.slice(y,d)}${f})${e.slice(d+c.length)}`}else e=`${e.slice(0,d-a.length)}(?>${a}${f})${e.slice(d+c.length)}`;b+=4}Om.lastIndex+=b}else c[0]==="("?t.push(d):c===")"&&(n=t.length?t.pop():null);a=c}return{pattern:e}}const lr=String.raw,u5=lr`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,K0=lr`\(\?R=(?<rDepth>[^\)]+)\)|${u5}`,Of=lr`\(\?<(?![=!])(?<captureName>[^>]+)>`,JS=lr`${Of}|(?<unnamed>\()(?!\?)`,Pa=new RegExp(lr`${Of}|${K0}|\(\?|\\?.`,"gsu"),Dm="Cannot use multiple overlapping recursions";function c5(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let a=t?.captureTransfers??new Map;if(!new RegExp(K0,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:n};if(r==="plugin"&&cd(e,lr`\(\?\(DEFINE\)`,ur.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=cd(e,lr`\\[1-9]`,ur.DEFAULT),c=new Map,d=[];let f=!1,p=0,m=0,b;for(Pa.lastIndex=0;b=Pa.exec(e);){const{0:y,groups:{captureName:_,rDepth:T,gRNameOrNum:A,gRDepth:C}}=b;if(y==="[")p++;else if(p)y==="]"&&p--;else if(T){if(K_(T),f)throw new Error(Dm);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,b.index),N=e.slice(Pa.lastIndex);if(cd(N,K0,ur.DEFAULT))throw new Error(Dm);const L=+T-1;e=Z_(k,N,L,!1,n,o,m),a=ex(a,k,L,o.length,0,m);break}else if(A){K_(C);let k=!1;for(const W of d)if(W.name===A||W.num===+A){if(k=!0,W.hasRecursedWithin)throw new Error(Dm);break}if(!k)throw new Error(lr`Recursive \g cannot be used outside the referenced group "${r==="external"?A:lr`\g<${A}&R=${C}>`}"`);const N=c.get(A),L=s5(e,N);if(l&&cd(L,lr`${Of}|\((?!\?)`,ur.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const O=e.slice(N,b.index),P=L.slice(O.length+y.length),V=o.length,G=+C-1,Z=Z_(O,P,G,!0,n,o,m);a=ex(a,O,G,o.length-V,V,m);const z=e.slice(0,N),re=e.slice(N+L.length);e=`${z}${Z}${re}`,Pa.lastIndex+=Z.length-y.length-O.length-P.length,d.forEach(W=>W.hasRecursedWithin=!0),f=!0}else if(_)m++,c.set(String(m),Pa.lastIndex),c.set(_,Pa.lastIndex),d.push({num:m,name:_});else if(y[0]==="("){const k=y==="(";k&&(m++,c.set(String(m),Pa.lastIndex)),d.push(k?{num:m}:{})}else y===")"&&d.pop()}return n.push(...o),{pattern:e,captureTransfers:a,hiddenCaptures:n}}function K_(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Z_(e,t,n,r,a,o,l){const c=new Set;r&&KS(e+t,Of,({groups:{captureName:f}})=>{c.add(f)},ur.DEFAULT);const d=[n,r?c:null,a,o,l];return`${e}${J_(`(?:${e}`,"forward",...d)}(?:)${J_(`${t})`,"backward",...d)}${t}`}function J_(e,t,n,r,a,o,l){const d=p=>t==="forward"?p+2:n-p+2-1;let f="";for(let p=0;p<n;p++){const m=d(p);f+=tb(e,lr`${JS}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:y,unnamed:_,backref:T}})=>{if(T&&r&&!r.has(T))return b;const A=`_$${m}`;if(_||y){const C=l+o.length+1;return o.push(C),d5(a,C),_?b:`(?<${y}${A}>`}return lr`\k<${T}${A}>`},ur.DEFAULT)}return f}function d5(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function ex(e,t,n,r,a,o){if(e.size&&r){let l=0;KS(t,JS,()=>l++,ur.DEFAULT);const c=o-l+a,d=new Map;return e.forEach((f,p)=>{const m=(r-l*n)/n,b=l*n,y=p>c+l?p+r:p,_=[];for(const T of f)if(T<=c)_.push(T);else if(T>c+l+m)_.push(T+r);else if(T<=c+l)for(let A=0;A<=n;A++)_.push(T+l*A);else for(let A=0;A<=n;A++)_.push(T+b+m*A);d.set(y,_)}),d}return e}var Ft=String.fromCodePoint,De=String.raw,yi={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};yi.bugFlagVLiteralHyphenIsRange=yi.unicodeSets?(()=>{try{new RegExp(De`[\d\-a]`,"v")}catch{return!0}return!1})():!1;yi.bugNestedClassIgnoresNegation=yi.unicodeSets&&new RegExp("[[^a]]","v").test("a");function af(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function vu(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Z0(e,t){return tx[e]>=tx[t]}function f5(e,t){if(e==null)throw new Error(t??"Value expected");return e}var tx={ES2025:2025,ES2024:2024,ES2018:2018},h5={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function eC(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!h5[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=yi.flagGroups?"ES2025":yi.unicodeSets?"ES2024":"ES2018"),t}var p5="[ -\r ]",m5=new Set([Ft(304),Ft(305)]),di=De`[\p{L}\p{M}\p{N}\p{Pc}]`;function tC(e){if(m5.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),a=y5.get(n),o=g5.get(n),l=b5.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),a&&t.add(a),t.add(n),o&&t.add(o),[...t]}var nb=new Map(`C Other
|
|
69
|
+
Cc Control cntrl
|
|
70
|
+
Cf Format
|
|
71
|
+
Cn Unassigned
|
|
72
|
+
Co Private_Use
|
|
73
|
+
Cs Surrogate
|
|
74
|
+
L Letter
|
|
75
|
+
LC Cased_Letter
|
|
76
|
+
Ll Lowercase_Letter
|
|
77
|
+
Lm Modifier_Letter
|
|
78
|
+
Lo Other_Letter
|
|
79
|
+
Lt Titlecase_Letter
|
|
80
|
+
Lu Uppercase_Letter
|
|
81
|
+
M Mark Combining_Mark
|
|
82
|
+
Mc Spacing_Mark
|
|
83
|
+
Me Enclosing_Mark
|
|
84
|
+
Mn Nonspacing_Mark
|
|
85
|
+
N Number
|
|
86
|
+
Nd Decimal_Number digit
|
|
87
|
+
Nl Letter_Number
|
|
88
|
+
No Other_Number
|
|
89
|
+
P Punctuation punct
|
|
90
|
+
Pc Connector_Punctuation
|
|
91
|
+
Pd Dash_Punctuation
|
|
92
|
+
Pe Close_Punctuation
|
|
93
|
+
Pf Final_Punctuation
|
|
94
|
+
Pi Initial_Punctuation
|
|
95
|
+
Po Other_Punctuation
|
|
96
|
+
Ps Open_Punctuation
|
|
97
|
+
S Symbol
|
|
98
|
+
Sc Currency_Symbol
|
|
99
|
+
Sk Modifier_Symbol
|
|
100
|
+
Sm Math_Symbol
|
|
101
|
+
So Other_Symbol
|
|
102
|
+
Z Separator
|
|
103
|
+
Zl Line_Separator
|
|
104
|
+
Zp Paragraph_Separator
|
|
105
|
+
Zs Space_Separator
|
|
106
|
+
ASCII
|
|
107
|
+
ASCII_Hex_Digit AHex
|
|
108
|
+
Alphabetic Alpha
|
|
109
|
+
Any
|
|
110
|
+
Assigned
|
|
111
|
+
Bidi_Control Bidi_C
|
|
112
|
+
Bidi_Mirrored Bidi_M
|
|
113
|
+
Case_Ignorable CI
|
|
114
|
+
Cased
|
|
115
|
+
Changes_When_Casefolded CWCF
|
|
116
|
+
Changes_When_Casemapped CWCM
|
|
117
|
+
Changes_When_Lowercased CWL
|
|
118
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
119
|
+
Changes_When_Titlecased CWT
|
|
120
|
+
Changes_When_Uppercased CWU
|
|
121
|
+
Dash
|
|
122
|
+
Default_Ignorable_Code_Point DI
|
|
123
|
+
Deprecated Dep
|
|
124
|
+
Diacritic Dia
|
|
125
|
+
Emoji
|
|
126
|
+
Emoji_Component EComp
|
|
127
|
+
Emoji_Modifier EMod
|
|
128
|
+
Emoji_Modifier_Base EBase
|
|
129
|
+
Emoji_Presentation EPres
|
|
130
|
+
Extended_Pictographic ExtPict
|
|
131
|
+
Extender Ext
|
|
132
|
+
Grapheme_Base Gr_Base
|
|
133
|
+
Grapheme_Extend Gr_Ext
|
|
134
|
+
Hex_Digit Hex
|
|
135
|
+
IDS_Binary_Operator IDSB
|
|
136
|
+
IDS_Trinary_Operator IDST
|
|
137
|
+
ID_Continue IDC
|
|
138
|
+
ID_Start IDS
|
|
139
|
+
Ideographic Ideo
|
|
140
|
+
Join_Control Join_C
|
|
141
|
+
Logical_Order_Exception LOE
|
|
142
|
+
Lowercase Lower
|
|
143
|
+
Math
|
|
144
|
+
Noncharacter_Code_Point NChar
|
|
145
|
+
Pattern_Syntax Pat_Syn
|
|
146
|
+
Pattern_White_Space Pat_WS
|
|
147
|
+
Quotation_Mark QMark
|
|
148
|
+
Radical
|
|
149
|
+
Regional_Indicator RI
|
|
150
|
+
Sentence_Terminal STerm
|
|
151
|
+
Soft_Dotted SD
|
|
152
|
+
Terminal_Punctuation Term
|
|
153
|
+
Unified_Ideograph UIdeo
|
|
154
|
+
Uppercase Upper
|
|
155
|
+
Variation_Selector VS
|
|
156
|
+
White_Space space
|
|
157
|
+
XID_Continue XIDC
|
|
158
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Lf(e),e])),g5=new Map([["s",Ft(383)],[Ft(383),"s"]]),b5=new Map([[Ft(223),Ft(7838)],[Ft(107),Ft(8490)],[Ft(229),Ft(8491)],[Ft(969),Ft(8486)]]),y5=new Map([Ji(453),Ji(456),Ji(459),Ji(498),...Im(8072,8079),...Im(8088,8095),...Im(8104,8111),Ji(8124),Ji(8140),Ji(8188)]),E5=new Map([["alnum",De`[\p{Alpha}\p{Nd}]`],["alpha",De`\p{Alpha}`],["ascii",De`\p{ASCII}`],["blank",De`[\p{Zs}\t]`],["cntrl",De`\p{Cc}`],["digit",De`\p{Nd}`],["graph",De`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",De`\p{Lower}`],["print",De`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",De`[\p{P}\p{S}]`],["space",De`\p{space}`],["upper",De`\p{Upper}`],["word",De`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",De`\p{AHex}`]]);function v5(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Ji(e){const t=Ft(e);return[t.toLowerCase(),t]}function Im(e,t){return v5(e,t).map(n=>Ji(n))}var nC=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function _5(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};rC(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Z0(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};tu(e,x5,r);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};tu(e,T5,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return tu(e,S5,l),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var x5={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:a}=e;if(a==="repeater"){const o=Er();o.body[0].body.push(Ua({negate:!0,body:r}),co("Any"));const l=Er();l.body[0].body.push(QS("greedy",0,1/0,o)),n(kt(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const a=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];vu(r,l,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=aC(t.get(e));if(n){const r=Er({flags:n});r.body[0].body=e.body,e.body=[kt(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:a,remove:o,replaceWith:l},c){const{kind:d,negate:f}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:b,wordIsAscii:y}=c;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(d==="line_end")l(kt(Ua({body:[Ka({body:[Q0("string_end")]}),Ka({body:[Rf(10)]})]}),t));else if(d==="line_start")l(kt(fi(De`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(b.has(e))a.flags.sticky=!0,o();else{const _=r[n-1];if(_&&R5(_))l(kt(Ua({negate:!0}),t));else{if(m)throw new Error(De`Uses "\G" in a way that requires a subclass`);l(ea(Q0("string_start"),t)),c.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")l(kt(fi(De`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!y&&!p){const _=`(?:(?<=${di})(?!${di})|(?<!${di})(?=${di}))`,T=`(?:(?<=${di})(?=${di})|(?<!${di})(?!${di}))`;l(kt(fi(f?T:_),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Pm(n)&&(n=Mm(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Pm(r)&&(r=Mm(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Rd({body:[e]});n(kt(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:a,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:c}){const{kind:d,negate:f,value:p}=e;if(o&&(d==="digit"||p==="digit")){n(ea(X0("digit",{negate:f}),t));return}if(l&&(d==="space"||p==="space")){n(kt(Bm(fi(p5),f),t));return}if(c&&(d==="word"||p==="word")){n(ea(X0("word",{negate:f}),t));return}if(d==="any")n(ea(co("Any"),t));else if(d==="digit")n(ea(co("Nd",{negate:f}),t));else if(d!=="dot")if(d==="text_segment"){if(r==="strict")throw new Error(De`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=De`\p{RI}{2}|${m}(?:\u200D${m})*`;n(kt(fi(De`(?>\r\n|${a?De`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")n(ea(co("AHex",{negate:f}),t));else if(d==="newline")n(kt(fi(f?`[^
|
|
159
|
+
]`:`(?>\r
|
|
160
|
+
?|[
|
|
161
|
+
\v\f
\u2028\u2029])`),t));else if(d==="posix")if(!a&&(p==="graph"||p==="print")){if(r==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];f&&(m=`\0-${Ft(m.codePointAt(0)-1)}${Ft(m.codePointAt(2)+1)}-`),n(kt(fi(`[${m}]`),t))}else n(kt(Bm(fi(E5.get(p)),f),t));else if(d==="property")nb.has(Lf(p))||(e.key="sc");else if(d==="space")n(ea(co("space",{negate:f}),t));else if(d==="word")n(kt(Bm(fi(di),f),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:a,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:c,flags:d}=e;if(c==="flags")if(!d.enable&&!d.disable)r();else{const f=Er({flags:d});f.body[0].body=l(),a(kt(f,t),{traverse:!0})}else if(c==="keep"){const f=n.body[0],m=n.body.length===1&&qS(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(De`Uses "\K" in a way that's unsupported`);const b=Ua({behind:!0});b.body[0].body=o(),a(kt(b,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(kt(Ua({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Er();t.body[0].body.push(e.body),e.body=kt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,a=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=oC(o.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):a=!0}r&&!a&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(De`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Pm(n)&&(n=Mm(n,t),e.ref=n)}},T5={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:a}=e;r||n.set(e,[...t.get(a).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:a,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:d}){const f=a.get(e);if(f&&c.has(e.number)){const m=ea(nx(e.number),t);d.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&vu(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const b=p[m];if(f===b.node||f&&f===b.origin||e===b.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:f}),e.name&&l.get(e.name).push({node:e,origin:f}),e.name){const m=vu(o,e.name,new Map);let b=!1;if(f)b=!0;else for(const y of m.values())if(!y.hasDuplicateNameToRemove){b=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=af(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:a,ref:o}=e;if(a){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););r.reffedNodesByReferencer.set(e,p);return}const l=r.subroutineRefMap.get(o),c=o===0,d=c?nx(0):iC(l,r.groupOriginByCopy,null);let f=d;if(!c){const p=aC(A5(l,b=>b.type==="Group"&&!!b.flags)),m=p?af(r.globalFlags,p):r.globalFlags;C5(m,r.currentFlags)||(f=Er({flags:k5(m)}),f.body[0].body.push(d))}n(kt(f,t),{traverse:!c})}},S5={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(l=>w5(l,e));if(!o.length)n(kt(Ua({negate:!0}),t));else if(o.length>1){const l=Er({atomic:!0,body:o.reverse().map(c=>Ka({body:[W0(c.number)]}))});n(kt(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const a=YS();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function rC(e){tu(e,{"*"({node:t,parent:n}){t.parent=n}})}function C5(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function w5(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=sC(n.parent);for(const a of r){if(a===n)break;if(a===e||lC(a,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function iC(e,t,n,r){const a=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?a.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?a[o]=iC(l,t,a,n):(o==="type"&&l==="CapturingGroup"&&t.set(a,t.get(e)??e),a[o]=l);return a}function nx(e){const t=WS(e);return t.isRecursive=!0,t}function A5(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Mm(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function aC(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(a=>{r.enable?.[a]&&(delete n.disable[a],n.enable[a]=!0),r.disable?.[a]&&(n.disable[a]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function k5({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function sC(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function oC(e){const t=e.find(n=>n.kind==="search_start"||L5(n,{negate:!1})||!N5(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const a=oC(r.body);if(!a)return null;Array.isArray(a)?n.push(...a):n.push(a)}return n}return null}function lC(e,t){const n=sC(e)??[];for(const r of n)if(r===t||lC(r,t))return!0;return!1}function N5({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function R5(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function L5(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&qS(e.body[0],{type:"Assertion",kind:"search_start"})}function Pm(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function fi(e,t){const r=GS(e,{...t,unicodePropertyMap:nb}).body;return r.length>1||r[0].body.length>1?Er({body:r}):r[0].body[0]}function Bm(e,t){return e.negate=t,e}function ea(e,t){return e.parent=t,e}function kt(e,t){return rC(e),e.parent=t,e}function O5(e,t){const n=eC(t),r=Z0(n.target,"ES2024"),a=Z0(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!a){const y=[e.flags.ignoreCase];tu(e,D5,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(_){y.push(_)},setHasCasedChar(){y.at(-1)?l=!0:c=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let f=e;const p={accuracy:n.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!a&&l&&c),useFlagMods:a,useFlagV:r,verbose:n.verbose};function m(y){return p.lastNode=f,f=y,f5(I5[y.type],`Unexpected node type "${y.type}"`)(y,p,m)}const b={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],p.captureMap.forEach((y,_)=>{y.hidden&&b._hiddenCaptures.push(_),y.transferTo&&vu(b._captureTransfers,y.transferTo,[]).push(_)}),b}var D5={"*":{enter({node:e},t){if(ix(e)){const n=t.getCurrentModI();t.pushModI(e.flags?af({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){ix(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){rb(Ft(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),uC(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&nC.has(e.value)&&t.setHasCasedChar()}},I5={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?De`\B`:De`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:a,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,o>c.number&&(l.transferTo=c.number)),t.captureMap.set(o,l),`(${a?`?<${a}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Ft(e),r=eo(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&rb(n)){const a=tC(n);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:a,parent:o}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");yi.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(ax)&&(l=[Rf(45),...l.filter(f=>!ax(f))]);const c=()=>`[${a?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||yi.bugNestedClassIgnoresNegation)&&!a){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=Er(),b=m.body[0];return m.parent=o,b.parent=m,l=l.filter(y=>!p.includes(y)),e.body=l,l.length?(e.parent=b,b.body.push(e)):m.body.pop(),p.forEach(y=>{const _=Ka({body:[y]});y.parent=_,_.parent=m,m.body.push(_)}),n(m)}}t.inCharClass=!0;const f=c();return t.inCharClass=!1,f}const d=l[0];if(r==="union"&&!a&&d&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(yi.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&d.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=eo(n,a),l=eo(r,a),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=uC(e);H5(d).forEach(p=>{c.add(Array.isArray(p)?`${eo(p[0],a)}-${eo(p[1],a)}`:eo(p,a))})}return`${o}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":De`[^\n]`;if(e==="digit")return t?De`\D`:De`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&nC.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?De`\P`:De`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?De`\W`:De`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},a,o){const l=a.currentFlags;n&&(a.currentFlags=af(l,n));const c=t.map(o).join("|"),d=!a.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!a.useFlagMods||!n)?c:`(?${F5(e,n,a.useFlagMods)}${c})`;return a.currentFlags=l,d},LookaroundAssertion({body:e,kind:t,negate:n},r,a){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,n){return n(e.body)+U5(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:De`\g<${t}&R=${r}>`}},M5=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),P5=new Set(["-","\\","]","^","["]),B5=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),rx=new Map([[9,De`\t`],[10,De`\n`],[11,De`\v`],[12,De`\f`],[13,De`\r`],[8232,De`\u2028`],[8233,De`\u2029`],[65279,De`\uFEFF`]]),j5=new RegExp("^\\p{Cased}$","u");function rb(e){return j5.test(e)}function uC(e,t){const n=!!t?.firstOnly,r=e.min.value,a=e.max.value,o=[];if(r<65&&(a===65535||a>=131071)||r===65536&&a>=131071)return o;for(let l=r;l<=a;l++){const c=Ft(l);if(!rb(c))continue;const d=tC(c).filter(f=>{const p=f.codePointAt(0);return p<r||p>a});if(d.length&&(o.push(...d),n))break}return o}function eo(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(rx.has(e))return rx.get(e);if(e<32||e>126&&e<160||e>262143||t&&z5(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=n?r?B5:P5:M5,o=Ft(e);return(a.has(o)?"\\":"")+o}function H5(e){const t=e.map(a=>a.codePointAt(0)).sort((a,o)=>a-o),n=[];let r=null;for(let a=0;a<t.length;a++)t[a+1]===t[a]+1?r??=t[a]:r===null?n.push(t[a]):(n.push([r,t[a]]),r=null);return n}function F5(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:a,disable:o}=t;r=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function U5({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function ix({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function z5(e){return e>47&&e<58}function ax({type:e,value:t}){return e==="Character"&&t===45}var $5=class J0 extends RegExp{#e=new Map;#t=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const a=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,n),this.#n=o.source,o instanceof J0&&(this.#e=o.#e,this.#i=o.#i,this.#r=o.#r,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(a?"":t,n),this.#n=t,this.#e=q5(o.hiddenCaptures,o.transfers),this.#r=o.strategy,this.rawOptions=r??{}}a||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:a,...o}=this.rawOptions;this.#t=new J0(this.#n,this.flags,o)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#r==="clip_search"&&n&&r){this.lastIndex=0;const a=this.#a(t.slice(r));return a&&(V5(a,r,t,this.hasIndices),this.lastIndex+=r),a}return this.#a(t)}#a(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const r=[...n];n.length=1;let a;this.hasIndices&&(a=[...n.indices],n.indices.length=1);const o=[0];for(let l=1;l<r.length;l++){const{hidden:c,transferTo:d}=this.#e.get(l)??{};if(c?o.push(null):(o.push(n.length),n.push(r[l]),this.hasIndices&&n.indices.push(a[l])),d&&r[l]!==void 0){const f=o[d];if(!f)throw new Error(`Invalid capture transfer to "${f}"`);if(n[f]=r[l],this.hasIndices&&(n.indices[f]=a[l]),n.groups){this.#i||(this.#i=G5(this.source));const p=this.#i.get(d);p&&(n.groups[p]=r[l],this.hasIndices&&(n.indices.groups[p]=a[l]))}}}return n}};function V5(e,t,n,r){if(e.index+=t,e.input=n,r){const a=e.indices;for(let l=0;l<a.length;l++){const c=a[l];c&&(a[l]=[c[0]+t,c[1]+t])}const o=a.groups;o&&Object.keys(o).forEach(l=>{const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])})}}function q5(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,a]of t)for(const o of a)vu(n,o,{}).transferTo=r;return n}function G5(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,a=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:c,name:d}}=o;l==="["?r++:r?l==="]"&&r--:c&&(a++,d&&n.set(a,d))}return n}function Y5(e,t){const n=Q5(e,t);return n.options?new $5(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function Q5(e,t){const n=eC(t),r=GS(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:nb}),a=_5(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=O5(a,n),l=c5(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),c=l5(l.pattern),d=o5(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),f={pattern:d.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=d.hiddenCaptures.sort((_,T)=>_-T),m=Array.from(d.captureTransfers),b=a._strategy,y=f.pattern.length>=n.lazyCompileLength;(p.length||m.length||b||y)&&(f.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...b&&{strategy:b},...y&&{lazyCompile:y}})}return f}const sx=4294967295;class W5{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:a,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(l=>{if(typeof l!="string")return l;const c=a?.get(l);if(c){if(c instanceof RegExp)return c;if(r)return null;throw c}try{const d=o(l);return a?.set(l,d),d}catch(d){if(a?.set(l,d),r)return null;throw d}})}regexps;findNextMatchSync(t,n,r){const a=typeof t=="string"?t:t.content,o=[];function l(c,d,f=0){return{index:c,captureIndices:d.indices.map(p=>p==null?{start:sx,end:sx,length:0}:{start:p[0]+f,end:p[1]+f,length:p[1]-p[0]})}}for(let c=0;c<this.regexps.length;c++){const d=this.regexps[c];if(d)try{d.lastIndex=n;const f=d.exec(a);if(!f)continue;if(f.index===n)return l(c,f,0);o.push([c,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(o.length){const c=Math.min(...o.map(d=>d[1].index));for(const[d,f,p]of o)if(f.index===c)return l(d,f,p)}return null}}function X5(e,t){return Y5(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function K5(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>X5(n,{target:t.target}),{createScanner(n){return new W5(n,t)},createString(n){return{content:n}}}}async function cC(e){if(K2())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=xm.get(e);if(t!=null)return t;try{const n=BS[e];if(n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled languages`);const r=n().then(({default:a})=>{const o={name:e,data:a};return Xa.has(e)||Xa.set(e,o),o});return xm.set(e,r),await r}finally{xm.delete(e)}}function dC(e){return Xa.get(e)??cC(e)}const Ei=new Map,jm=new Map,eg=new Map,tg=new Set;function ng(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=Ei.get(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,Ei.has(n)||Ei.set(n,r);tg.has(n)||(tg.add(n),t.loadThemeSync(r))}}async function fC(e){if(K2())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=jm.get(e);if(t!=null)return t;try{const n=eg.get(e)??jS[e];if(n==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const r=n().then(o=>Z5(e,"default"in o?o.default:o));jm.set(e,r);const a=await r;if(a.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${a.name}`);return Ei.set(a.name,a),a}finally{jm.delete(e)}}function Z5(e,t){const n=Ei.get(e);return n??(t=Af(t),Ei.set(e,t),t)}function hC(e){return Ei.get(e)??fC(e)}function pC(e,t){if(eg.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}eg.set(e,t)}let Or;async function sf({themes:e,langs:t}){Or??=dI({themes:[],langs:["text"],engine:K5()});const n=J5(Or)?await Or:Or;Or=n;const r=[];for(const o of t){if(o==="text"||o==="ansi")continue;const l=dC(o);"then"in l?r.push(l):g_(l,n)}const a=[];for(const o of e){const l=hC(o);"then"in l?a.push(l):ng(l,Or)}return(r.length>0||a.length>0)&&await Promise.all([Promise.all(r).then(o=>{g_(o,n)}),Promise.all(a).then(o=>{ng(o,n)})]),n}function mC(){if(Or!=null&&!("then"in Or))return Or}function J5(e=Or){return e!=null&&"then"in e}pC("pierre-dark",()=>M(()=>import("./pierre-dark-BXuwtOqb.js"),[]));pC("pierre-light",()=>M(()=>import("./pierre-light-dckrK0oj.js"),[]));function _u(e=Wt){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function nu(e){for(const t of _u(e))if(!tg.has(t))return!1;return!0}function rg(e){for(const t of e)if(!Ei.has(t))return!1;return!0}function Df(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function ca(e){return{type:"text",value:e}}function We({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function ig({name:e,width:t=16,height:n=16,properties:r}){return We({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[We({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function e4(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ld(e){return We({tagName:"div",children:[We({tagName:"div",children:e.annotations?.map(t=>We({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function t4(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function gC({fileOrDiff:e,themeStyles:t,themeType:n}){const r="type"in e?e:void 0,a={"data-diffs-header":"","data-change-type":r?.type,"data-theme-type":n!=="system"?n:void 0,style:t};return We({tagName:"div",children:[n4({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),r4(r)],properties:a})}function n4({name:e,prevName:t,iconType:n}){const r=[ig({name:t4(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(We({tagName:"div",children:[ca(t)],properties:{"data-prev-name":""}})),r.push(ig({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(We({tagName:"div",children:[ca(e)],properties:{"data-title":""}})),We({tagName:"div",children:r,properties:{"data-header-content":""}})}function r4(e){const t=[];if(e!=null){let n=0,r=0;for(const a of e.hunks)n+=a.additionLines,r+=a.deletionLines;(r>0||n===0)&&t.push(We({tagName:"span",children:[ca(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(We({tagName:"span",children:[ca(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(We({tagName:"slot",properties:{name:ku}})),We({tagName:"div",children:t,properties:{"data-metadata":""}})}function bC(e){return We({tagName:"pre",properties:i4(e)})}function i4({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:a,themeType:o,themeStyles:l,totalLines:c}){const d={"data-diffs":"","data-type":a?"split":"file","data-overflow":r,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,"data-theme-type":o!=="system"?o:void 0,style:l,tabIndex:0};return d.style+=`--diffs-min-number-column-width-default:${`${c}`.length}ch;`,d}const jl={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Br(e){if(jl[e]!=null)return jl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);return t!=null&&jl[t[1]]!=null?jl[t[1]]??"text":jl[e.match(/\.([^.]+)$/)?.[1]??""]??"text"}function yC(e,t){return{langs:[e??"text"],themes:_u(t.theme)}}function Za(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function Ja(e){return e.replace(/\n$|\r\n$/,"")}function a4(e,t,n){const r=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t];if(r==null)throw console.error({node:e,line:t,state:n}),new Error(`processLine: line ${t}, contains no state.lineInfo`);return e.tagName="span",e.properties["data-column-content"]="",e.children.length===0&&e.children.push(ca(`
|
|
162
|
+
`)),We({tagName:"div",children:[We({tagName:"span",children:[We({tagName:"span",children:[{type:"text",value:`${r.lineNumber}`}],properties:{"data-line-number-content":""}})],properties:{"data-column-number":""}}),e],properties:{"data-line":r.lineNumber,"data-alt-line":r.altLineNumber,"data-line-type":r.type,"data-line-index":r.lineIndex}})}function s4(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=c=>c}=e,a=new Map;function o(c){return Object.entries(c).map(([d,f])=>`${d}:${f}`).join(";")}function l(c){const d=typeof c=="string"?c:o(c);let f=t+o4(d)+n;return f=r(f),a.has(f)||a.set(f,typeof c=="string"?c:{...c}),f}return{name:"@shikijs/transformers:style-to-class",pre(c){if(!c.properties.style)return;const d=l(c.properties.style);delete c.properties.style,this.addClassToHast(c,d)},tokens(c){for(const d of c)for(const f of d){if(!f.htmlStyle)continue;const p=l(f.htmlStyle);f.htmlStyle={},f.htmlAttrs||={},f.htmlAttrs.class?f.htmlAttrs.class+=` ${p}`:f.htmlAttrs.class=p}},getClassRegistry(){return a},getCSS(){let c="";for(const[d,f]of a.entries())c+=`.${d}{${typeof f=="string"?f:o(f)}}`;return c},clearRegistry(){a.clear()}}}function o4(e,t=0){let n=3735928559^t,r=1103547991^t;for(let a=0,o;a<e.length;a++)o=e.charCodeAt(a),n=Math.imul(n^o,2654435761),r=Math.imul(r^o,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function EC(e=!1){const t={lineInfo:{}},n=[{line(r){return delete r.properties.class,r},pre(r){const a=e4(r),o=[];if(a!=null){let l=1;for(const c of a.children)c.type==="element"&&(o.push(a4(c,l,t)),l++);a.children=o}return r}}];return e&&n.push(l4,ox),{state:t,transformers:n,toClass:ox}}const ox=s4({classPrefix:"hl-"}),l4={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const r={};n.color!=null&&(r.color=n.color),n.bgColor!=null&&(r["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(r["font-style"]="italic"),(n.fontStyle&2)!==0&&(r["font-weight"]="bold"),(n.fontStyle&4)!==0&&(r["text-decoration"]="underline")),Object.keys(r).length>0&&(n.htmlStyle=r)}}};function zn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function vC({theme:e=Wt,highlighter:t,prefix:n}){let r="";if(typeof e=="string"){const a=t.getTheme(e);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${zn("global")}fg:${a.fg};`,r+=`${zn("global")}bg:${a.bg};`,r+=Hm(a,n)}else{let a=t.getTheme(e.dark);r+=`${zn("global")}dark:${a.fg};`,r+=`${zn("global")}dark-bg:${a.bg};`,r+=Hm(a,"dark"),a=t.getTheme(e.light),r+=`${zn("global")}light:${a.fg};`,r+=`${zn("global")}light-bg:${a.bg};`,r+=Hm(a,"light")}return r}function Hm(e,t){t=t!=null?`${t}-`:"";let n="";const r=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];r!=null&&(n+=`${zn("global")}${t}addition-color:${r};`);const a=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];a!=null&&(n+=`${zn("global")}${t}deletion-color:${a};`);const o=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return o!=null&&(n+=`${zn("global")}${t}modified-color:${o};`),n}function ag(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function _C(e,t,{theme:n=Wt,tokenizeMaxLineLength:r},a=!1){const{state:o,transformers:l}=EC(),c=a?"text":e.lang??Br(e.name),d=(()=>{if(typeof n=="string")return t.getTheme(n).type})(),f=vC({theme:n,highlighter:t});o.lineInfo=m=>({type:"context",lineIndex:m-1,lineNumber:m});const p=typeof n=="string"?{lang:c,theme:n,transformers:l,defaultColor:!1,cssVariablePrefix:zn("token"),tokenizeMaxLineLength:r}:{lang:c,themes:n,transformers:l,defaultColor:!1,cssVariablePrefix:zn("token"),tokenizeMaxLineLength:r};return{code:ag(t.codeToHast(Ja(e.contents),p)),themeStyles:f,baseThemeType:d}}var u4=class{highlighter;renderCache;computedLang="text";lineAnnotations={};constructor(e={theme:Wt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=nu(e.theme??Wt)?mC():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??"system")!==e&&this.mergeOptions({themeType:e})}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.renderCache=void 0,this.highlighter=void 0,this.workerManager=void 0,this.onRenderUpdate=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e);let n=this.workerManager?.getFileResultCache(e);n!=null&&!Fm(t,n.options)&&(n=void 0),this.renderCache??={file:e,options:t,highlighted:!0,result:n?.result},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightFileAST(this,e):this.asyncHighlight(e).then(({result:r,options:a})=>{this.onHighlightSuccess(e,r,a)})}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:r=Wt,tokenizeMaxLineLength:a=1e3}=this.options;return{theme:r,tokenizeMaxLineLength:a}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceRender:!0}:e!==n.file||!Fm(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderFile(e=this.renderCache?.file){if(e==null)return;const t=this.workerManager?.getFileResultCache(e);t!=null&&this.renderCache==null&&(this.renderCache={file:e,highlighted:!0,...t});const{options:n,forceRender:r}=this.getRenderOptions(e);if(this.renderCache??={file:e,highlighted:!1,options:n,result:void 0},this.workerManager?.isWorkingPool()===!0)this.renderCache.result??=this.workerManager.getPlainFileAST(e),(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Br(e.name);const a=this.highlighter!=null&&nu(n.theme),o=this.highlighter!=null&&qd(this.computedLang);if(this.highlighter!=null&&a&&(r||!this.renderCache.highlighted&&o||this.renderCache.result==null)){const{result:l,options:c}=this.renderFileWithHighlighter(e,this.highlighter,!o);this.renderCache={file:e,options:c,highlighted:o,result:l}}(!a||!o)&&this.asyncHighlight(e).then(({result:l,options:c})=>{this.onHighlightSuccess(e,l,c)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,this.renderCache.result):void 0}async asyncRender(e){const{result:t}=await this.asyncHighlight(e);return this.processFileResult(e,t)}async asyncHighlight(e){this.computedLang=e.lang??Br(e.name);const t=this.highlighter!=null&&rg(_u(this.options.theme)),n=this.highlighter!=null&&qd(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter)}renderFileWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:_C(e,t,r,n),options:r}}processFileResult(e,t){const{disableFileHeader:n=!1}=this.options,r=[];let a=1;for(const o of t.code){r.push(o);const l=this.lineAnnotations[a];l!=null&&r.push(Ld({hunkIndex:0,lineIndex:a,annotations:l.map(c=>Za(c))})),a++}return{codeAST:r,preAST:this.createPreElement(t.code.length,t.themeStyles,t.baseThemeType),headerAST:n?void 0:this.renderHeader(e,t.themeStyles,t.baseThemeType),totalLines:t.code.length,themeStyles:t.themeStyles,baseThemeType:t.baseThemeType,css:""}}renderHeader(e,t,n){const{themeType:r="system"}=this.options;return gC({fileOrDiff:e,themeStyles:t,themeType:n??r})}renderFullHTML(e){return bi(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(We({tagName:"code",children:e.codeAST,properties:{"data-code":""}})),{...e.preAST,children:t}}renderPartialHTML(e,t=!1){return bi(t?We({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await sf(yC(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;const r=this.renderCache.file!==e||!this.renderCache.highlighted||!Fm(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:!0,result:t},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}createPreElement(e,t,n){const{disableLineNumbers:r=!1,overflow:a="scroll",themeType:o="system"}=this.options;return bC({diffIndicators:"none",disableBackground:!0,disableLineNumbers:r,overflow:a,themeStyles:t,themeType:n??o,split:!1,totalLines:e})}};function Fm(e,t){return Df(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}const xC=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
163
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
164
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
165
|
+
</symbol>
|
|
166
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
167
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
168
|
+
</symbol>
|
|
169
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
170
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
171
|
+
</symbol>
|
|
172
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
173
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
174
|
+
</symbol>
|
|
175
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
176
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
177
|
+
</symbol>
|
|
178
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
179
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
180
|
+
</symbol>
|
|
181
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
182
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
183
|
+
</symbol>
|
|
184
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
185
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
186
|
+
</symbol>
|
|
187
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
188
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
189
|
+
</symbol>
|
|
190
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
191
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
192
|
+
</symbol>
|
|
193
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
194
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
195
|
+
</symbol>
|
|
196
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
197
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
198
|
+
</symbol>
|
|
199
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
200
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
201
|
+
</symbol>
|
|
202
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
203
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
204
|
+
</symbol>
|
|
205
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
206
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
207
|
+
</symbol>
|
|
208
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
209
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
210
|
+
</symbol>
|
|
211
|
+
</svg>`;function sg(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function TC(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function Od({pre:e,columnType:t}={}){const n=document.createElement("code");return n.dataset.code="",t!=null&&(n.dataset[t]=""),e?.appendChild(n),n}function SC(){const e=document.createElement("div");return e.slot="hover-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e}function CC(){const e=document.createElement("style");return e.setAttribute(Ug,""),e}var c4=`@layer base, theme, unsafe;
|
|
212
|
+
|
|
213
|
+
@layer base {
|
|
214
|
+
:host {
|
|
215
|
+
--diffs-bg: #fff;
|
|
216
|
+
--diffs-fg: #000;
|
|
217
|
+
--diffs-font-fallback:
|
|
218
|
+
'SF Mono', Monaco, Consolas, 'Ubuntu Mono', 'Liberation Mono',
|
|
219
|
+
'Courier New', monospace;
|
|
220
|
+
--diffs-header-font-fallback:
|
|
221
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
222
|
+
'Noto Sans', 'Liberation Sans', Arial, sans-serif;
|
|
223
|
+
|
|
224
|
+
--diffs-mixer: light-dark(black, white);
|
|
225
|
+
--diffs-gap-fallback: 8px;
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
// Available CSS Color Overrides
|
|
229
|
+
--diffs-bg-buffer-override
|
|
230
|
+
--diffs-bg-hover-override
|
|
231
|
+
--diffs-bg-context-override
|
|
232
|
+
--diffs-bg-separator-override
|
|
233
|
+
|
|
234
|
+
--diffs-fg-number-override
|
|
235
|
+
--diffs-fg-number-addition-override
|
|
236
|
+
--diffs-fg-number-deletion-override
|
|
237
|
+
|
|
238
|
+
--diffs-deletion-color-override
|
|
239
|
+
--diffs-addition-color-override
|
|
240
|
+
--diffs-modified-color-override
|
|
241
|
+
|
|
242
|
+
--diffs-bg-deletion-override
|
|
243
|
+
--diffs-bg-deletion-number-override
|
|
244
|
+
--diffs-bg-deletion-hover-override
|
|
245
|
+
--diffs-bg-deletion-emphasis-override
|
|
246
|
+
|
|
247
|
+
--diffs-bg-addition-override
|
|
248
|
+
--diffs-bg-addition-number-override
|
|
249
|
+
--diffs-bg-addition-hover-override
|
|
250
|
+
--diffs-bg-addition-emphasis-override
|
|
251
|
+
|
|
252
|
+
// Line Selection Color Overrides (for enableLineSelection)
|
|
253
|
+
--diffs-selection-color-override
|
|
254
|
+
--diffs-bg-selection-override
|
|
255
|
+
--diffs-bg-selection-number-override
|
|
256
|
+
--diffs-bg-selection-background-override
|
|
257
|
+
--diffs-bg-selection-number-background-override
|
|
258
|
+
|
|
259
|
+
// Available CSS Layout Overrides
|
|
260
|
+
--diffs-gap-inline
|
|
261
|
+
--diffs-gap-block
|
|
262
|
+
--diffs-gap-style
|
|
263
|
+
--diffs-tab-size
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
color-scheme: light dark;
|
|
267
|
+
display: block;
|
|
268
|
+
font-family: var(
|
|
269
|
+
--diffs-header-font-family,
|
|
270
|
+
var(--diffs-header-font-fallback)
|
|
271
|
+
);
|
|
272
|
+
font-size: var(--diffs-font-size, 13px);
|
|
273
|
+
line-height: var(--diffs-line-height, 20px);
|
|
274
|
+
font-feature-settings: var(--diffs-font-features);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default
|
|
278
|
+
* user-agent styles. These must be overridden to use our custom styles. */
|
|
279
|
+
pre,
|
|
280
|
+
code,
|
|
281
|
+
[data-error-wrapper] {
|
|
282
|
+
margin: 0;
|
|
283
|
+
padding: 0;
|
|
284
|
+
display: block;
|
|
285
|
+
outline: none;
|
|
286
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
*,
|
|
290
|
+
*::before,
|
|
291
|
+
*::after {
|
|
292
|
+
box-sizing: border-box;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
[data-icon-sprite] {
|
|
296
|
+
display: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* NOTE(mdo): Headers and separators are within pre/code, so we need to reset
|
|
300
|
+
* their font-family explicitly. */
|
|
301
|
+
[data-diffs-header],
|
|
302
|
+
[data-separator] {
|
|
303
|
+
font-family: var(
|
|
304
|
+
--diffs-header-font-family,
|
|
305
|
+
var(--diffs-header-font-fallback)
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
[data-file-info] {
|
|
310
|
+
padding: 10px;
|
|
311
|
+
font-weight: 700;
|
|
312
|
+
color: var(--fg);
|
|
313
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
314
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
315
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
316
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
317
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
[data-diffs-header],
|
|
321
|
+
[data-diffs],
|
|
322
|
+
[data-error-wrapper] {
|
|
323
|
+
--diffs-bg: light-dark(var(--diffs-light-bg), var(--diffs-dark-bg));
|
|
324
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
325
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
326
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
327
|
+
--diffs-bg-buffer: var(
|
|
328
|
+
--diffs-bg-buffer-override,
|
|
329
|
+
light-dark(
|
|
330
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),
|
|
331
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))
|
|
332
|
+
)
|
|
333
|
+
);
|
|
334
|
+
--diffs-bg-hover: var(
|
|
335
|
+
--diffs-bg-hover-override,
|
|
336
|
+
light-dark(
|
|
337
|
+
color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)),
|
|
338
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))
|
|
339
|
+
)
|
|
340
|
+
);
|
|
341
|
+
--diffs-bg-context: var(
|
|
342
|
+
--diffs-bg-context-override,
|
|
343
|
+
light-dark(
|
|
344
|
+
color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),
|
|
345
|
+
color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))
|
|
346
|
+
)
|
|
347
|
+
);
|
|
348
|
+
--diffs-bg-separator: var(
|
|
349
|
+
--diffs-bg-separator-override,
|
|
350
|
+
light-dark(
|
|
351
|
+
color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),
|
|
352
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))
|
|
353
|
+
)
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
--diffs-fg: light-dark(var(--diffs-light), var(--diffs-dark));
|
|
357
|
+
--diffs-fg-number: var(
|
|
358
|
+
--diffs-fg-number-override,
|
|
359
|
+
light-dark(
|
|
360
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),
|
|
361
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))
|
|
362
|
+
)
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
--diffs-deletion-base: var(
|
|
366
|
+
--diffs-deletion-color-override,
|
|
367
|
+
light-dark(
|
|
368
|
+
var(
|
|
369
|
+
--diffs-light-deletion-color,
|
|
370
|
+
var(--diffs-deletion-color, rgb(255, 0, 0))
|
|
371
|
+
),
|
|
372
|
+
var(
|
|
373
|
+
--diffs-dark-deletion-color,
|
|
374
|
+
var(--diffs-deletion-color, rgb(255, 0, 0))
|
|
375
|
+
)
|
|
376
|
+
)
|
|
377
|
+
);
|
|
378
|
+
--diffs-addition-base: var(
|
|
379
|
+
--diffs-addition-color-override,
|
|
380
|
+
light-dark(
|
|
381
|
+
var(
|
|
382
|
+
--diffs-light-addition-color,
|
|
383
|
+
var(--diffs-addition-color, rgb(0, 255, 0))
|
|
384
|
+
),
|
|
385
|
+
var(
|
|
386
|
+
--diffs-dark-addition-color,
|
|
387
|
+
var(--diffs-addition-color, rgb(0, 255, 0))
|
|
388
|
+
)
|
|
389
|
+
)
|
|
390
|
+
);
|
|
391
|
+
--diffs-modified-base: var(
|
|
392
|
+
--diffs-modified-color-override,
|
|
393
|
+
light-dark(
|
|
394
|
+
var(
|
|
395
|
+
--diffs-light-modified-color,
|
|
396
|
+
var(--diffs-modified-color, rgb(0, 0, 255))
|
|
397
|
+
),
|
|
398
|
+
var(
|
|
399
|
+
--diffs-dark-modified-color,
|
|
400
|
+
var(--diffs-modified-color, rgb(0, 0, 255))
|
|
401
|
+
)
|
|
402
|
+
)
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
406
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
407
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
408
|
+
--diffs-bg-deletion: var(
|
|
409
|
+
--diffs-bg-deletion-override,
|
|
410
|
+
light-dark(
|
|
411
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),
|
|
412
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))
|
|
413
|
+
)
|
|
414
|
+
);
|
|
415
|
+
--diffs-bg-deletion-number: var(
|
|
416
|
+
--diffs-bg-deletion-number-override,
|
|
417
|
+
light-dark(
|
|
418
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)),
|
|
419
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))
|
|
420
|
+
)
|
|
421
|
+
);
|
|
422
|
+
--diffs-bg-deletion-hover: var(
|
|
423
|
+
--diffs-bg-deletion-hover-override,
|
|
424
|
+
light-dark(
|
|
425
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)),
|
|
426
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-deletion-base))
|
|
427
|
+
)
|
|
428
|
+
);
|
|
429
|
+
--diffs-bg-deletion-emphasis: var(
|
|
430
|
+
--diffs-bg-deletion-emphasis-override,
|
|
431
|
+
light-dark(
|
|
432
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.15),
|
|
433
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.2)
|
|
434
|
+
)
|
|
435
|
+
);
|
|
436
|
+
|
|
437
|
+
--diffs-bg-addition: var(
|
|
438
|
+
--diffs-bg-addition-override,
|
|
439
|
+
light-dark(
|
|
440
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),
|
|
441
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))
|
|
442
|
+
)
|
|
443
|
+
);
|
|
444
|
+
--diffs-bg-addition-number: var(
|
|
445
|
+
--diffs-bg-addition-number-override,
|
|
446
|
+
light-dark(
|
|
447
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)),
|
|
448
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))
|
|
449
|
+
)
|
|
450
|
+
);
|
|
451
|
+
--diffs-bg-addition-hover: var(
|
|
452
|
+
--diffs-bg-addition-hover-override,
|
|
453
|
+
light-dark(
|
|
454
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)),
|
|
455
|
+
color-mix(in lab, var(--diffs-bg) 70%, var(--diffs-addition-base))
|
|
456
|
+
)
|
|
457
|
+
);
|
|
458
|
+
--diffs-bg-addition-emphasis: var(
|
|
459
|
+
--diffs-bg-addition-emphasis-override,
|
|
460
|
+
light-dark(
|
|
461
|
+
rgb(from var(--diffs-addition-base) r g b / 0.15),
|
|
462
|
+
rgb(from var(--diffs-addition-base) r g b / 0.2)
|
|
463
|
+
)
|
|
464
|
+
);
|
|
465
|
+
|
|
466
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
467
|
+
--diffs-selection-number-fg: light-dark(
|
|
468
|
+
color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),
|
|
469
|
+
color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))
|
|
470
|
+
);
|
|
471
|
+
--diffs-bg-selection: var(
|
|
472
|
+
--diffs-bg-selection-override,
|
|
473
|
+
light-dark(
|
|
474
|
+
color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)),
|
|
475
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base))
|
|
476
|
+
)
|
|
477
|
+
);
|
|
478
|
+
--diffs-bg-selection-number: var(
|
|
479
|
+
--diffs-bg-selection-number-override,
|
|
480
|
+
light-dark(
|
|
481
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)),
|
|
482
|
+
color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base))
|
|
483
|
+
)
|
|
484
|
+
);
|
|
485
|
+
|
|
486
|
+
background-color: var(--diffs-bg);
|
|
487
|
+
color: var(--diffs-fg);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[data-diffs] {
|
|
491
|
+
--diffs-code-grid: minmax(min-content, max-content) 1fr;
|
|
492
|
+
|
|
493
|
+
[data-column-content] span {
|
|
494
|
+
color: light-dark(
|
|
495
|
+
var(--diffs-token-light, var(--diffs-light)),
|
|
496
|
+
var(--diffs-token-dark, var(--diffs-dark))
|
|
497
|
+
);
|
|
498
|
+
font-weight: var(--diffs-token-light-font-weight, inherit);
|
|
499
|
+
font-style: var(--diffs-token-light-font-style, inherit);
|
|
500
|
+
-webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
501
|
+
text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* Since span is a pretty innocuous selector, we need to make sure we don't
|
|
506
|
+
* apply tokenized BG colors to diff-spans */
|
|
507
|
+
[data-column-content] span:not([data-diff-span]) {
|
|
508
|
+
background-color: light-dark(
|
|
509
|
+
var(--diffs-token-light-bg, inherit),
|
|
510
|
+
var(--diffs-token-dark-bg, inherit)
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
[data-column-content] {
|
|
515
|
+
background-color: var(--diffs-line-bg, 'transparent');
|
|
516
|
+
grid-column: 2 / 3;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
[data-diffs][data-dehydrated] {
|
|
520
|
+
--diffs-code-grid: minmax(min-content, max-content) minmax(0, 1fr);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
@media (prefers-color-scheme: dark) {
|
|
524
|
+
[data-diffs-header],
|
|
525
|
+
[data-diffs] {
|
|
526
|
+
color-scheme: dark;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
[data-diffs] [data-column-content] span {
|
|
530
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
531
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
532
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
533
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
[data-diffs-header][data-theme-type='light'],
|
|
538
|
+
[data-diffs][data-theme-type='light'] {
|
|
539
|
+
color-scheme: light;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
[data-diffs][data-theme-type='light'] [data-column-content] span {
|
|
543
|
+
font-weight: var(--diffs-token-light-font-weight, inherit);
|
|
544
|
+
font-style: var(--diffs-token-light-font-style, inherit);
|
|
545
|
+
-webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
546
|
+
text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
[data-diffs-header][data-theme-type='dark'],
|
|
550
|
+
[data-diffs][data-theme-type='dark'] {
|
|
551
|
+
color-scheme: dark;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
[data-diffs][data-theme-type='dark'] [data-column-content] span {
|
|
555
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
556
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
557
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
558
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
[data-type='split'][data-overflow='wrap'] {
|
|
562
|
+
display: grid;
|
|
563
|
+
grid-auto-flow: dense;
|
|
564
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
[data-type='split'][data-overflow='scroll'] {
|
|
568
|
+
display: grid;
|
|
569
|
+
grid-template-columns: 1fr 1fr;
|
|
570
|
+
gap: 2px;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
[data-code] {
|
|
574
|
+
display: block;
|
|
575
|
+
display: grid;
|
|
576
|
+
grid-auto-flow: dense;
|
|
577
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
578
|
+
overflow: scroll clip;
|
|
579
|
+
overscroll-behavior-x: none;
|
|
580
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
581
|
+
align-self: flex-start;
|
|
582
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
583
|
+
padding-bottom: max(
|
|
584
|
+
0px,
|
|
585
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px)
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
[data-code]::-webkit-scrollbar {
|
|
590
|
+
width: 0;
|
|
591
|
+
height: 6px;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
[data-code]::-webkit-scrollbar-track {
|
|
595
|
+
background: transparent;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
599
|
+
background-color: transparent;
|
|
600
|
+
border: 1px solid transparent;
|
|
601
|
+
background-clip: content-box;
|
|
602
|
+
border-radius: 3px;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
[data-diffs]:hover [data-code]::-webkit-scrollbar-thumb {
|
|
606
|
+
background-color: var(--diffs-bg-context);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
610
|
+
background-color: transparent;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/*
|
|
614
|
+
* If we apply these rules globally it will mean that webkit will opt into the
|
|
615
|
+
* standards compliant version of custom css scrollbars, which we do not want
|
|
616
|
+
* because the custom stuff will look better
|
|
617
|
+
*/
|
|
618
|
+
@supports (-moz-appearance: none) {
|
|
619
|
+
[data-code] {
|
|
620
|
+
scrollbar-width: thin;
|
|
621
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
622
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
[data-diffs][data-type='split'][data-overflow='wrap'] {
|
|
627
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
[data-diffs-header] ~ [data-diffs] [data-code],
|
|
631
|
+
[data-diffs-header] ~ [data-diffs][data-overflow='wrap'] {
|
|
632
|
+
padding-top: 0;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
[data-type='split'][data-overflow='wrap'] [data-code] {
|
|
636
|
+
display: contents;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
[data-line-annotation],
|
|
640
|
+
[data-no-newline],
|
|
641
|
+
[data-line] {
|
|
642
|
+
position: relative;
|
|
643
|
+
display: grid;
|
|
644
|
+
grid-template-columns: subgrid;
|
|
645
|
+
grid-column: 1 / 3;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
[data-line-annotation][data-selected-line] {
|
|
649
|
+
background-color: unset;
|
|
650
|
+
|
|
651
|
+
&::before {
|
|
652
|
+
content: '';
|
|
653
|
+
position: sticky;
|
|
654
|
+
top: 0;
|
|
655
|
+
left: 0;
|
|
656
|
+
display: block;
|
|
657
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
658
|
+
background-color: var(--diffs-bg-selection-number);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
[data-annotation-content] {
|
|
662
|
+
background-color: var(--diffs-bg-selection);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
[data-interactive-lines] [data-line] {
|
|
667
|
+
cursor: pointer;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
[data-buffer] {
|
|
671
|
+
position: sticky;
|
|
672
|
+
left: 0;
|
|
673
|
+
grid-column: 1 / 3;
|
|
674
|
+
-webkit-user-select: none;
|
|
675
|
+
user-select: none;
|
|
676
|
+
/* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */
|
|
677
|
+
background-image: repeating-linear-gradient(
|
|
678
|
+
-45deg,
|
|
679
|
+
transparent,
|
|
680
|
+
transparent calc(3px * 1.414),
|
|
681
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
682
|
+
var(--diffs-bg-buffer) calc(4px * 1.414)
|
|
683
|
+
);
|
|
684
|
+
min-height: 1lh;
|
|
685
|
+
width: var(--diffs-column-width, auto);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
[data-separator] {
|
|
689
|
+
grid-column: span 2;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
[data-separator='metadata'],
|
|
693
|
+
[data-separator]:empty {
|
|
694
|
+
min-height: 4px;
|
|
695
|
+
background-color: var(--diffs-bg-separator);
|
|
696
|
+
display: grid;
|
|
697
|
+
grid-template-columns: subgrid;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
[data-separator-wrapper] {
|
|
701
|
+
-webkit-user-select: none;
|
|
702
|
+
user-select: none;
|
|
703
|
+
fill: currentColor;
|
|
704
|
+
overflow: hidden;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
[data-separator='metadata'] [data-separator-wrapper] {
|
|
708
|
+
grid-column: 2 / 3;
|
|
709
|
+
width: var(--diffs-column-content-width);
|
|
710
|
+
position: sticky;
|
|
711
|
+
left: var(--diffs-column-number-width);
|
|
712
|
+
padding: 4px 1ch;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
[data-separator='line-info'] {
|
|
716
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
[data-separator='line-info'][data-separator-first] {
|
|
720
|
+
margin-top: 0;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
[data-separator='line-info'][data-separator-last] {
|
|
724
|
+
margin-bottom: 0;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
728
|
+
position: sticky;
|
|
729
|
+
display: flex;
|
|
730
|
+
align-items: center;
|
|
731
|
+
gap: 2px;
|
|
732
|
+
width: auto;
|
|
733
|
+
width: calc(var(--diffs-column-width) - var(--diffs-gap-fallback));
|
|
734
|
+
border-radius: 6px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
@media (pointer: fine) {
|
|
738
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
739
|
+
display: grid;
|
|
740
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
741
|
+
grid-template-rows: 15px 15px;
|
|
742
|
+
|
|
743
|
+
[data-expand-button] {
|
|
744
|
+
height: 15px;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
[data-type='split']
|
|
749
|
+
[data-additions]
|
|
750
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
751
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
[data-type='split'] [data-additions] [data-expand-button] {
|
|
755
|
+
grid-column: 2;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
[data-type='split'] [data-additions] [data-separator-content] {
|
|
759
|
+
grid-column: 1;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
[data-expand-button],
|
|
764
|
+
[data-separator-content] {
|
|
765
|
+
display: flex;
|
|
766
|
+
align-items: center;
|
|
767
|
+
background-color: var(--diffs-bg-separator);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
[data-expand-button] {
|
|
771
|
+
justify-content: center;
|
|
772
|
+
flex-shrink: 0;
|
|
773
|
+
cursor: pointer;
|
|
774
|
+
width: 32px;
|
|
775
|
+
height: 32px;
|
|
776
|
+
opacity: 0.65;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
[data-hover-slot] {
|
|
780
|
+
position: absolute;
|
|
781
|
+
top: 0;
|
|
782
|
+
bottom: 0;
|
|
783
|
+
right: 0;
|
|
784
|
+
display: flex;
|
|
785
|
+
justify-content: flex-end;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
@media (pointer: fine) {
|
|
789
|
+
[data-expand-button]:hover {
|
|
790
|
+
opacity: 1;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
[data-line]:hover {
|
|
794
|
+
z-index: 2;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
[data-expand-up] [data-icon] {
|
|
799
|
+
transform: scaleY(-1);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
[data-separator-content] {
|
|
803
|
+
flex: 1 1 auto;
|
|
804
|
+
padding: 0 1ch;
|
|
805
|
+
height: 32px;
|
|
806
|
+
opacity: 0.65;
|
|
807
|
+
overflow: hidden;
|
|
808
|
+
justify-content: flex-start;
|
|
809
|
+
|
|
810
|
+
grid-column: 2;
|
|
811
|
+
grid-row: 1 / -1;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
[data-unmodified-lines] {
|
|
815
|
+
display: block;
|
|
816
|
+
overflow: hidden;
|
|
817
|
+
min-width: 0;
|
|
818
|
+
text-overflow: ellipsis;
|
|
819
|
+
white-space: nowrap;
|
|
820
|
+
flex: 0 1 auto;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
[data-type='split'] [data-additions] [data-separator-content] {
|
|
824
|
+
justify-content: flex-end;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
[data-type='file']
|
|
828
|
+
[data-code]
|
|
829
|
+
[data-separator='line-info']
|
|
830
|
+
[data-separator-wrapper] {
|
|
831
|
+
left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
832
|
+
margin-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
833
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
834
|
+
width: calc(
|
|
835
|
+
var(--diffs-column-width) -
|
|
836
|
+
(var(--diffs-gap-inline, var(--diffs-gap-fallback)) * 2)
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
[data-type='split']
|
|
841
|
+
[data-deletions]
|
|
842
|
+
[data-separator='line-info']
|
|
843
|
+
[data-separator-wrapper] {
|
|
844
|
+
left: var(--diffs-gap-fallback);
|
|
845
|
+
margin-left: var(--diffs-gap-fallback);
|
|
846
|
+
border-top-right-radius: 0;
|
|
847
|
+
border-bottom-right-radius: 0;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
[data-type='split']
|
|
851
|
+
[data-additions]
|
|
852
|
+
[data-separator='line-info']
|
|
853
|
+
[data-separator-wrapper] {
|
|
854
|
+
left: 0;
|
|
855
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
856
|
+
border-top-left-radius: 0;
|
|
857
|
+
border-bottom-left-radius: 0;
|
|
858
|
+
flex-direction: row-reverse;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
[data-line] {
|
|
862
|
+
background-color: var(--diffs-bg);
|
|
863
|
+
color: var(--diffs-fg);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
[data-type='split'][data-overflow='wrap'] [data-deletions] {
|
|
867
|
+
[data-line-annotation],
|
|
868
|
+
[data-buffer],
|
|
869
|
+
[data-line],
|
|
870
|
+
[data-separator] {
|
|
871
|
+
grid-column: 1 / 3;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
[data-line-annotation] {
|
|
876
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
877
|
+
background-color: var(--diffs-bg-context);
|
|
878
|
+
z-index: 3;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
[data-type='split'][data-overflow='wrap'] [data-additions] {
|
|
882
|
+
[data-line-annotation],
|
|
883
|
+
[data-buffer],
|
|
884
|
+
[data-line],
|
|
885
|
+
[data-separator] {
|
|
886
|
+
margin-left: 2px;
|
|
887
|
+
grid-column: 3 / 5;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
[data-separator='custom'] {
|
|
892
|
+
display: grid;
|
|
893
|
+
grid-template-columns: subgrid;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
[data-column-content],
|
|
897
|
+
[data-column-number] {
|
|
898
|
+
position: relative;
|
|
899
|
+
padding-inline: 1ch;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
[data-indicators='classic'] [data-column-content] {
|
|
903
|
+
padding-inline-start: 2ch;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
[data-indicators='classic'] {
|
|
907
|
+
[data-line-type='change-addition'] [data-column-content]::before,
|
|
908
|
+
[data-line-type='change-deletion'] [data-column-content]::before {
|
|
909
|
+
display: inline-block;
|
|
910
|
+
width: 1ch;
|
|
911
|
+
height: 1lh;
|
|
912
|
+
position: absolute;
|
|
913
|
+
top: 0;
|
|
914
|
+
left: 0;
|
|
915
|
+
-webkit-user-select: none;
|
|
916
|
+
user-select: none;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
[data-line-type='change-addition'] [data-column-content]::before {
|
|
920
|
+
content: '+';
|
|
921
|
+
color: var(--diffs-addition-base);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
[data-line-type='change-deletion'] [data-column-content]::before {
|
|
925
|
+
content: '-';
|
|
926
|
+
color: var(--diffs-deletion-base);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
[data-indicators='bars'] {
|
|
931
|
+
[data-line-type='change-deletion'] [data-column-number]::before,
|
|
932
|
+
[data-line-type='change-addition'] [data-column-number]::before {
|
|
933
|
+
content: '';
|
|
934
|
+
display: block;
|
|
935
|
+
width: 4px;
|
|
936
|
+
height: 100%;
|
|
937
|
+
position: absolute;
|
|
938
|
+
top: 0;
|
|
939
|
+
left: 0;
|
|
940
|
+
-webkit-user-select: none;
|
|
941
|
+
user-select: none;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
[data-line-type='change-deletion'] [data-column-number]::before {
|
|
945
|
+
background-image: linear-gradient(
|
|
946
|
+
0deg,
|
|
947
|
+
var(--diffs-bg-deletion) 50%,
|
|
948
|
+
var(--diffs-deletion-base) 50%
|
|
949
|
+
);
|
|
950
|
+
background-repeat: repeat;
|
|
951
|
+
background-size: 2px 2px;
|
|
952
|
+
background-size: calc(1lh / round(1lh / 2px)) calc(1lh / round(1lh / 2px));
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
[data-line-type='change-addition'] [data-column-number]::before {
|
|
956
|
+
background-color: var(--diffs-addition-base);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
[data-overflow='wrap'] [data-column-content],
|
|
961
|
+
[data-overflow='wrap'] [data-annotation-content] {
|
|
962
|
+
white-space: pre-wrap;
|
|
963
|
+
word-break: break-word;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
[data-overflow='scroll'] [data-column-content] {
|
|
967
|
+
white-space: pre;
|
|
968
|
+
min-height: 1lh;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
[data-column-number] {
|
|
972
|
+
grid-column: 1 / 2;
|
|
973
|
+
box-sizing: content-box;
|
|
974
|
+
text-align: right;
|
|
975
|
+
position: sticky;
|
|
976
|
+
left: 0;
|
|
977
|
+
-webkit-user-select: none;
|
|
978
|
+
user-select: none;
|
|
979
|
+
background-color: var(--diffs-bg);
|
|
980
|
+
color: var(--diffs-fg-number);
|
|
981
|
+
z-index: 1;
|
|
982
|
+
min-width: var(
|
|
983
|
+
--diffs-min-number-column-width,
|
|
984
|
+
var(--diffs-min-number-column-width-default, 3ch)
|
|
985
|
+
);
|
|
986
|
+
padding-left: 2ch;
|
|
987
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
[data-disable-line-numbers] {
|
|
991
|
+
&[data-indicators='bars'] [data-column-number] {
|
|
992
|
+
min-width: 4px;
|
|
993
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
[data-column-number] {
|
|
997
|
+
border-right: none;
|
|
998
|
+
min-width: 0;
|
|
999
|
+
padding: 0;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
[data-line-number-content] {
|
|
1003
|
+
display: none;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
[data-hover-slot] {
|
|
1007
|
+
right: unset;
|
|
1008
|
+
left: 0;
|
|
1009
|
+
justify-content: flex-start;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
&[data-indicators='bars'] [data-hover-slot] {
|
|
1013
|
+
/* Using 5px here because theres a 1px separator after the bar */
|
|
1014
|
+
left: 5px;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
1019
|
+
cursor: pointer;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
[data-diff-span] {
|
|
1023
|
+
border-radius: 3px;
|
|
1024
|
+
-webkit-box-decoration-break: clone;
|
|
1025
|
+
box-decoration-break: clone;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
[data-line-type='change-addition'] {
|
|
1029
|
+
[data-column-number] {
|
|
1030
|
+
color: var(
|
|
1031
|
+
--diffs-fg-number-addition-override,
|
|
1032
|
+
var(--diffs-addition-base)
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
[data-diff-span] {
|
|
1037
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
[data-line-type='change-deletion'] {
|
|
1042
|
+
[data-column-number] {
|
|
1043
|
+
color: var(
|
|
1044
|
+
--diffs-fg-number-deletion-override,
|
|
1045
|
+
var(--diffs-deletion-base)
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
[data-diff-span] {
|
|
1050
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
[data-background] [data-line-type='change-addition'] {
|
|
1055
|
+
--diffs-line-bg: var(--diffs-bg-addition);
|
|
1056
|
+
|
|
1057
|
+
[data-column-number] {
|
|
1058
|
+
background-color: var(--diffs-bg-addition-number);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
[data-background] [data-line-type='change-deletion'] {
|
|
1063
|
+
--diffs-line-bg: var(--diffs-bg-deletion);
|
|
1064
|
+
|
|
1065
|
+
[data-column-number] {
|
|
1066
|
+
background-color: var(--diffs-bg-deletion-number);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
[data-line-type='context-expanded'] {
|
|
1071
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
1072
|
+
|
|
1073
|
+
[data-column-number] {
|
|
1074
|
+
background-color: var(--diffs-bg-context);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/* By wrapping hovers in a pointer: fine, we ensure that mobile devices don't
|
|
1079
|
+
* require a double click */
|
|
1080
|
+
@media (pointer: fine) {
|
|
1081
|
+
[data-line]:hover:not([data-selected-line]) {
|
|
1082
|
+
[data-column-number],
|
|
1083
|
+
[data-column-content] {
|
|
1084
|
+
background-color: var(--diffs-bg-hover);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
[data-background] [data-line]:hover:not([data-selected-line]) {
|
|
1089
|
+
&[data-line-type='change-deletion'] [data-column-number],
|
|
1090
|
+
&[data-line-type='change-deletion'] [data-column-content] {
|
|
1091
|
+
background-color: var(--diffs-bg-deletion-hover);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
&[data-line-type='change-addition'] [data-column-number],
|
|
1095
|
+
&[data-line-type='change-addition'] [data-column-content] {
|
|
1096
|
+
background-color: var(--diffs-bg-addition-hover);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
[data-diffs-header] {
|
|
1102
|
+
display: flex;
|
|
1103
|
+
flex-direction: row;
|
|
1104
|
+
justify-content: space-between;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1107
|
+
min-height: calc(
|
|
1108
|
+
1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)
|
|
1109
|
+
);
|
|
1110
|
+
padding-inline: 16px;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
[data-header-content] {
|
|
1114
|
+
display: flex;
|
|
1115
|
+
flex-direction: row;
|
|
1116
|
+
align-items: center;
|
|
1117
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1118
|
+
min-width: 0;
|
|
1119
|
+
white-space: nowrap;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
[data-header-content] [data-prev-name],
|
|
1123
|
+
[data-header-content] [data-title] {
|
|
1124
|
+
direction: rtl;
|
|
1125
|
+
overflow: hidden;
|
|
1126
|
+
text-overflow: ellipsis;
|
|
1127
|
+
min-width: 0;
|
|
1128
|
+
white-space: nowrap;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
[data-prev-name] {
|
|
1132
|
+
opacity: 0.7;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
[data-rename-icon] {
|
|
1136
|
+
fill: currentColor;
|
|
1137
|
+
flex-shrink: 0;
|
|
1138
|
+
flex-grow: 0;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
[data-diffs-header] [data-metadata] {
|
|
1142
|
+
display: flex;
|
|
1143
|
+
align-items: center;
|
|
1144
|
+
gap: 1ch;
|
|
1145
|
+
white-space: nowrap;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
[data-diffs-header] [data-additions-count] {
|
|
1149
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1150
|
+
color: var(--diffs-addition-base);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
[data-diffs-header] [data-deletions-count] {
|
|
1154
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1155
|
+
color: var(--diffs-deletion-base);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
[data-no-newline] {
|
|
1159
|
+
-webkit-user-select: none;
|
|
1160
|
+
user-select: none;
|
|
1161
|
+
|
|
1162
|
+
[data-column-content] {
|
|
1163
|
+
opacity: 0.6;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
[data-annotation-content] {
|
|
1168
|
+
position: sticky;
|
|
1169
|
+
left: var(--diffs-column-number-width, 0);
|
|
1170
|
+
grid-column: 2 / -1;
|
|
1171
|
+
width: var(--diffs-column-content-width, auto);
|
|
1172
|
+
align-self: flex-start;
|
|
1173
|
+
z-index: 2;
|
|
1174
|
+
height: 100%;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/* Undo some of the stuff that the 'pre' tag does */
|
|
1178
|
+
[data-annotation-slot] {
|
|
1179
|
+
text-wrap-mode: wrap;
|
|
1180
|
+
word-break: normal;
|
|
1181
|
+
white-space-collapse: collapse;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
[data-change-icon] {
|
|
1185
|
+
fill: currentColor;
|
|
1186
|
+
flex-shrink: 0;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
[data-change-icon='change'],
|
|
1190
|
+
[data-change-icon='rename-pure'],
|
|
1191
|
+
[data-change-icon='rename-changed'] {
|
|
1192
|
+
color: var(--diffs-modified-base);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
[data-change-icon='new'] {
|
|
1196
|
+
color: var(--diffs-addition-base);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
[data-change-icon='deleted'] {
|
|
1200
|
+
color: var(--diffs-deletion-base);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
[data-change-icon='file'] {
|
|
1204
|
+
opacity: 0.6;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
/* Line selection highlighting */
|
|
1208
|
+
[data-line-type='context'][data-selected-line] {
|
|
1209
|
+
[data-column-number] {
|
|
1210
|
+
color: var(--diffs-selection-number-fg);
|
|
1211
|
+
background-color: var(--diffs-bg-selection-number);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
[data-column-content] {
|
|
1215
|
+
background-color: var(--diffs-bg-selection);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
[data-line-type='context-expanded'],
|
|
1220
|
+
[data-line-type='change-addition'],
|
|
1221
|
+
[data-line-type='change-deletion'] {
|
|
1222
|
+
&[data-selected-line] {
|
|
1223
|
+
[data-column-content] {
|
|
1224
|
+
background-color: light-dark(
|
|
1225
|
+
color-mix(
|
|
1226
|
+
in lab,
|
|
1227
|
+
var(--diffs-line-bg, var(--diffs-bg)) 82%,
|
|
1228
|
+
var(--diffs-selection-base)
|
|
1229
|
+
),
|
|
1230
|
+
color-mix(
|
|
1231
|
+
in lab,
|
|
1232
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1233
|
+
var(--diffs-selection-base)
|
|
1234
|
+
)
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
[data-column-number] {
|
|
1239
|
+
color: var(--diffs-selection-number-fg);
|
|
1240
|
+
background-color: light-dark(
|
|
1241
|
+
color-mix(
|
|
1242
|
+
in lab,
|
|
1243
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1244
|
+
var(--diffs-selection-base)
|
|
1245
|
+
),
|
|
1246
|
+
color-mix(
|
|
1247
|
+
in lab,
|
|
1248
|
+
var(--diffs-line-bg, var(--diffs-bg)) 60%,
|
|
1249
|
+
var(--diffs-selection-base)
|
|
1250
|
+
)
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
[data-error-wrapper] {
|
|
1257
|
+
overflow: auto;
|
|
1258
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1259
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1260
|
+
max-height: 400px;
|
|
1261
|
+
scrollbar-width: none;
|
|
1262
|
+
|
|
1263
|
+
[data-error-message] {
|
|
1264
|
+
font-weight: bold;
|
|
1265
|
+
font-size: 18px;
|
|
1266
|
+
color: var(--diffs-deletion-base);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
[data-error-stack] {
|
|
1270
|
+
color: var(--diffs-fg-number);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
`;const d4="@layer base, theme, unsafe;";function wC(e){return`${d4}
|
|
1275
|
+
@layer unsafe {
|
|
1276
|
+
${e}
|
|
1277
|
+
}`}function AC(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function kC({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,pre:a,split:o,themeStyles:l,themeType:c,totalLines:d}){switch(c==="system"?delete a.dataset.themeType:a.dataset.themeType=c,e){case"bars":case"classic":a.dataset.indicators=e;break;case"none":delete a.dataset.indicators;break}return n?a.dataset.disableLineNumbers="":delete a.dataset.disableLineNumbers,t?delete a.dataset.background:a.dataset.background="",a.dataset.type=o?"split":"file",a.dataset.overflow=r,a.dataset.diffs="",a.tabIndex=0,a.style=l,a.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),a}if(typeof HTMLElement<"u"&&customElements.get(_o)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const r=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(c4)),r.adoptedStyleSheets=[e]}}customElements.define(_o,t)}const NC=!0;let f4=-1;var h4=class{static LoadedCustomComponent=NC;__id=++f4;fileContainer;spriteSVG;pre;code;unsafeCSSStyle;hoverContent;errorWrapper;headerElement;headerMetadata;fileRenderer;resizeManager;mouseEventManager;lineSelectionManager;annotationElements=[];lineAnnotations=[];file;constructor(t={theme:Wt},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.fileRenderer=new u4(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new X2,this.mouseEventManager=new W2("file",Vd(t)),this.lineSelectionManager=new Q2($d(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){this.file!=null&&this.render({file:this.file,forceRender:!0})}setOptions(t){t!=null&&(this.options=t,this.mouseEventManager.setOptions(Vd(t)),this.lineSelectionManager.setOptions($d(t)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){if((this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.fileRenderer.setThemeType(t),this.headerElement!=null&&(t==="system"?delete this.headerElement.dataset.themeType:this.headerElement.dataset.themeType=t),this.pre!=null))switch(t){case"system":delete this.pre.dataset.themeType;break;case"light":case"dark":this.pre.dataset.themeType=t;break}}getHoveredLine=()=>this.mouseEventManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t){this.lineSelectionManager.setSelection(t)}cleanUp(){this.fileRenderer.cleanUp(),this.resizeManager.cleanUp(),this.mouseEventManager.cleanUp(),this.lineSelectionManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.workerManager=void 0,this.file=void 0,this.isContainerManaged||this.fileContainer?.parentNode?.removeChild(this.fileContainer),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre=void 0,this.headerElement=void 0,this.errorWrapper=void 0,this.unsafeCSSStyle=void 0}hydrate(t){const{fileContainer:n,prerenderedHTML:r}=t;AC(n,r);for(const a of Array.from(n.shadowRoot?.children??[])){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(Ug)){this.unsafeCSSStyle=a;continue}if("diffsHeader"in a.dataset){this.headerElement=a;continue}}}if(this.pre==null)this.render(t);else{const{file:a,lineAnnotations:o}=t;this.fileContainer=n,delete this.pre.dataset.dehydrated,this.lineAnnotations=o??this.lineAnnotations,this.file=a,this.fileRenderer.hydrate(a),this.renderAnnotations(),this.renderHoverUtility(),this.injectUnsafeCSS(),this.mouseEventManager.setup(this.pre),this.lineSelectionManager.setup(this.pre),(this.options.overflow??"scroll")==="scroll"&&this.resizeManager.setup(this.pre)}}render({file:t,fileContainer:n,forceRender:r=!1,containerWrapper:a,lineAnnotations:o}){const l=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!r&&sg(this.file,t)&&!l)return;this.file=t,this.fileRenderer.setOptions(this.options),o!=null&&this.setLineAnnotations(o),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableFileHeader:c=!1}=this.options;c&&this.headerElement!=null&&(this.headerElement.parentNode?.removeChild(this.headerElement),this.headerElement=void 0),n=this.getOrCreateFileContainerNode(n,a);try{const d=this.fileRenderer.renderFile(t);if(d==null){this.workerManager!=null&&!this.workerManager.isInitialized()&&this.workerManager.initialize().then(()=>this.rerender());return}d.headerAST!=null&&this.applyHeaderToDOM(d.headerAST,n);const f=this.getOrCreatePreNode(n);this.applyHunksToDOM(d,f),this.renderAnnotations(),this.renderHoverUtility()}catch(d){d instanceof Error&&this.applyErrorToDOM(d,n)}}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null)return;for(const n of this.annotationElements)n.parentNode?.removeChild(n);this.annotationElements.length=0;const{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const n of this.lineAnnotations){const r=t(n);if(r==null)continue;const a=TC(Za(n));a.appendChild(r),this.annotationElements.push(a),this.fileContainer.appendChild(a)}}renderHoverUtility(){const{renderHoverUtility:t}=this.options;if(this.fileContainer==null||t==null)return;this.hoverContent==null&&(this.hoverContent=SC(),this.fileContainer.appendChild(this.hoverContent));const n=t(this.mouseEventManager.getHoveredLine);this.hoverContent.innerHTML="",n!=null&&this.hoverContent.appendChild(n)}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;const{unsafeCSS:t}=this.options;if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.parentNode?.removeChild(this.unsafeCSSStyle),this.unsafeCSSStyle=void 0);return}this.unsafeCSSStyle==null&&(this.unsafeCSSStyle=CC(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=wC(t)}applyHunksToDOM(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t),n.innerHTML="",this.code=Od(),this.code.innerHTML=this.fileRenderer.renderPartialHTML(t.codeAST),n.appendChild(this.code),this.injectUnsafeCSS(),this.mouseEventManager.setup(n),this.lineSelectionManager.setup(n),this.lineSelectionManager.setDirty(),(this.options.overflow??"scroll")==="scroll"?this.resizeManager.setup(n):this.resizeManager.cleanUp()}applyHeaderToDOM(t,n){const{file:r}=this;if(r==null)return;this.cleanupErrorWrapper();const a=document.createElement("div");a.innerHTML=bi(t);const o=a.firstElementChild;if(!(o instanceof HTMLElement)||(this.headerElement!=null?n.shadowRoot?.replaceChild(o,this.headerElement):n.shadowRoot?.prepend(o),this.headerElement=o,this.isContainerManaged))return;const{renderCustomMetadata:l}=this.options;this.headerMetadata!=null&&this.headerMetadata.parentNode?.removeChild(this.headerMetadata);const c=l?.(r)??void 0;c!=null&&(this.headerMetadata=document.createElement("div"),this.headerMetadata.slot=ku,c instanceof Element?this.headerMetadata.appendChild(c):this.headerMetadata.innerText=`${c}`,n.appendChild(this.headerMetadata))}getOrCreateFileContainerNode(t,n){if(this.fileContainer=t??this.fileContainer??document.createElement(_o),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=xC;const a=r.firstChild;a instanceof SVGElement&&(this.spriteSVG=a,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getOrCreatePreNode(t){return this.pre==null?(this.pre=document.createElement("pre"),t.shadowRoot?.appendChild(this.pre)):this.pre.parentNode!==t&&t.shadowRoot?.appendChild(this.pre),this.pre}applyPreNodeAttributes(t,{totalLines:n,themeStyles:r,baseThemeType:a}){const{overflow:o="scroll",themeType:l="system",disableLineNumbers:c=!1}=this.options;kC({pre:t,split:!1,themeStyles:r,overflow:o,disableLineNumbers:c,themeType:a??l,diffIndicators:"none",disableBackground:!0,totalLines:n})}applyErrorToDOM(t,n){this.cleanupErrorWrapper();const r=this.getOrCreatePreNode(n);r.innerHTML="",r.parentNode?.removeChild(r),this.pre=void 0;const a=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",a.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const l=document.createElement("pre");l.dataset.errorStack="",l.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(l)}cleanupErrorWrapper(){this.errorWrapper?.parentNode?.removeChild(this.errorWrapper),this.errorWrapper=void 0}},p4=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const r of e.children??[])r instanceof HTMLElement&&("deletions"in r.dataset?t=r:"additions"in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function to(e){return We({tagName:"div",properties:{"data-buffer":"",style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Um(e){return We({tagName:"div",children:[We({tagName:"span",properties:{"data-column-number":""}}),We({tagName:"span",children:[ca("No newline at end of file")],properties:{"data-column-content":""}})],properties:{"data-no-newline":"","data-line-type":e}})}function zm(e){return We({tagName:"div",children:[ig({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function $m({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:a,isFirstHunk:o,isLastHunk:l}){const c=[];if(e==="metadata"&&t!=null&&c.push(We({tagName:"div",children:[ca(t)],properties:{"data-separator-wrapper":""}})),e==="line-info"&&t!=null){const d=[];n!=null&&(r?(o||d.push(zm("up")),l||d.push(zm("down"))):d.push(zm(!o&&!l?"both":o?"down":"up"))),d.push(We({tagName:"div",children:[We({tagName:"span",children:[ca(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),c.push(We({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return e==="custom"&&a!=null&&c.push(We({tagName:"slot",properties:{name:a}})),We({tagName:"div",children:c,properties:{"data-separator":c.length===0?"":e,"data-expand-index":n,"data-separator-first":o?"":void 0,"data-separator-last":l?"":void 0}})}function m4(e,t){return`hunk-separator-${e}-${t}`}function g4(e){const t=e[e.length-1];return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}class ib{diff(t,n,r={}){let a;typeof r=="function"?(a=r,r={}):"callback"in r&&(a=r.callback);const o=this.castInput(t,r),l=this.castInput(n,r),c=this.removeEmpty(this.tokenize(o,r)),d=this.removeEmpty(this.tokenize(l,r));return this.diffWithOptionsObj(c,d,r,a)}diffWithOptionsObj(t,n,r,a){var o;const l=k=>{if(k=this.postProcess(k,r),a){setTimeout(function(){a(k)},0);return}else return k},c=n.length,d=t.length;let f=1,p=c+d;r.maxEditLength!=null&&(p=Math.min(p,r.maxEditLength));const m=(o=r.timeout)!==null&&o!==void 0?o:1/0,b=Date.now()+m,y=[{oldPos:-1,lastComponent:void 0}];let _=this.extractCommon(y[0],n,t,0,r);if(y[0].oldPos+1>=d&&_+1>=c)return l(this.buildValues(y[0].lastComponent,n,t));let T=-1/0,A=1/0;const C=()=>{for(let k=Math.max(T,-f);k<=Math.min(A,f);k+=2){let N;const L=y[k-1],O=y[k+1];L&&(y[k-1]=void 0);let P=!1;if(O){const G=O.oldPos-k;P=O&&0<=G&&G<c}const V=L&&L.oldPos+1<d;if(!P&&!V){y[k]=void 0;continue}if(!V||P&&L.oldPos<O.oldPos?N=this.addToPath(O,!0,!1,0,r):N=this.addToPath(L,!1,!0,1,r),_=this.extractCommon(N,n,t,k,r),N.oldPos+1>=d&&_+1>=c)return l(this.buildValues(N.lastComponent,n,t))||!0;y[k]=N,N.oldPos+1>=d&&(A=Math.min(A,k-1)),_+1>=c&&(T=Math.max(T,k+1))}f++};if(a)(function k(){setTimeout(function(){if(f>p||Date.now()>b)return a(void 0);C()||k()},0)})();else for(;f<=p&&Date.now()<=b;){const k=C();if(k)return k}}addToPath(t,n,r,a,o){const l=t.lastComponent;return l&&!o.oneChangePerToken&&l.added===n&&l.removed===r?{oldPos:t.oldPos+a,lastComponent:{count:l.count+1,added:n,removed:r,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+a,lastComponent:{count:1,added:n,removed:r,previousComponent:l}}}extractCommon(t,n,r,a,o){const l=n.length,c=r.length;let d=t.oldPos,f=d-a,p=0;for(;f+1<l&&d+1<c&&this.equals(r[d+1],n[f+1],o);)f++,d++,p++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!o.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,f}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const a=[];let o;for(;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();const l=a.length;let c=0,d=0,f=0;for(;c<l;c++){const p=a[c];if(p.removed)p.value=this.join(r.slice(f,f+p.count)),f+=p.count;else{if(!p.added&&this.useLongestToken){let m=n.slice(d,d+p.count);m=m.map(function(b,y){const _=r[f+y];return _.length>b.length?_:b}),p.value=this.join(m)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(f+=p.count)}}return a}}class b4 extends ib{}const y4=new b4;function E4(e,t,n){return y4.diff(e,t,n)}const lx="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class v4 extends ib{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${lx}]+|[^\\S\\n\\r]+|[^${lx}]`,"ug");return t.match(n)||[]}}const _4=new v4;function x4(e,t,n){return _4.diff(e,t,n)}class T4 extends ib{constructor(){super(...arguments),this.tokenize=C4}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
1278
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
1279
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
1280
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
1281
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const S4=new T4;function ux(e,t,n){return S4.diff(e,t,n)}function C4(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1282
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let a=0;a<r.length;a++){const o=r[a];a%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function w4(e,t,n,r,a,o,l){let c;c={},typeof c.context>"u"&&(c.context=4);const d=c.context;if(c.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(c.callback){const{callback:p}=c;ux(n,r,Object.assign(Object.assign({},c),{callback:m=>{const b=f(m);p(b)}}))}else return f(ux(n,r,c));function f(p){if(!p)return;p.push({value:"",lines:[]});function m(k){return k.map(function(N){return" "+N})}const b=[];let y=0,_=0,T=[],A=1,C=1;for(let k=0;k<p.length;k++){const N=p[k],L=N.lines||k4(N.value);if(N.lines=L,N.added||N.removed){if(!y){const O=p[k-1];y=A,_=C,O&&(T=d>0?m(O.lines.slice(-d)):[],y-=T.length,_-=T.length)}for(const O of L)T.push((N.added?"+":"-")+O);N.added?C+=L.length:A+=L.length}else{if(y)if(L.length<=d*2&&k<p.length-2)for(const O of m(L))T.push(O);else{const O=Math.min(L.length,d);for(const V of m(L.slice(0,O)))T.push(V);const P={oldStart:y,oldLines:A-y+O,newStart:_,newLines:C-_+O,lines:T};b.push(P),y=0,_=0,T=[]}A+=L.length,C+=L.length}}for(const k of b)for(let N=0;N<k.lines.length;N++)k.lines[N].endsWith(`
|
|
1283
|
+
`)?k.lines[N]=k.lines[N].slice(0,-1):(k.lines.splice(N+1,0,"\"),N++);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:o,hunks:b}}}function RC(e){if(Array.isArray(e))return e.map(RC).join(`
|
|
1284
|
+
`);const t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader));for(let n=0;n<e.hunks.length;n++){const r=e.hunks[n];r.oldLines===0&&(r.oldStart-=1),r.newLines===0&&(r.newStart-=1),t.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@");for(const a of r.lines)t.push(a)}return t.join(`
|
|
1285
|
+
`)+`
|
|
1286
|
+
`}function A4(e,t,n,r,a,o,l){{const c=w4(e,t,n,r,a,o);return c?RC(c):void 0}}function k4(e){const t=e.endsWith(`
|
|
1287
|
+
`),n=e.split(`
|
|
1288
|
+
`).map(r=>r+`
|
|
1289
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function cx({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function dd({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:a=!1}){const o=t[t.length-1];if(o==null||a||!n){t.push([r?0:1,e.value]);return}const l=o[0]===0;if(r===l||r&&e.value.length===1&&!l){o[1]+=e.value;return}t.push([r?0:1,e.value])}function LC(e,t,n,r=!1){const a=(()=>{const f=n.theme??Wt;if(typeof f=="string")return t.getTheme(f).type})(),o=vC({theme:n.theme,highlighter:t});if(e.newLines!=null&&e.oldLines!=null){const{oldContent:f,newContent:p,oldInfo:m,newInfo:b,oldDecorations:y,newDecorations:_}=dx({hunks:e.hunks,oldLines:e.oldLines,newLines:e.newLines,lineDiffType:n.lineDiffType});return{code:fx({oldFile:{name:e.prevName??e.name,contents:f},oldInfo:m,oldDecorations:y,newFile:{name:e.name,contents:p},newInfo:b,newDecorations:_,highlighter:t,options:n,languageOverride:r?"text":e.lang}),themeStyles:o,baseThemeType:a}}const l=[];let c=0,d=0;for(const f of e.hunks){const{oldContent:p,newContent:m,oldInfo:b,newInfo:y,oldDecorations:_,newDecorations:T,splitLineIndex:A,unifiedLineIndex:C}=dx({hunks:[f],splitLineIndex:c,unifiedLineIndex:d,lineDiffType:n.lineDiffType}),k={name:e.prevName??e.name,contents:p},N={name:e.name,contents:m};l.push(fx({oldFile:k,oldInfo:b,oldDecorations:_,newFile:N,newInfo:y,newDecorations:T,highlighter:t,options:n,languageOverride:r?"text":e.lang})),c=A,d=C}return{code:(()=>{if(l.length<=1){const f=l[0]??{oldLines:[],newLines:[]};if(f.newLines.length===0||f.oldLines.length===0)return f}return{hunks:l}})(),themeStyles:o,baseThemeType:a}}function N4({oldLine:e,newLine:t,oldLineIndex:n,newLineIndex:r,oldDecorations:a,newDecorations:o,lineDiffType:l}){if(e==null||t==null||l==="none")return;e=Ja(e),t=Ja(t);const c=l==="char"?E4(e,t):x4(e,t),d=[],f=[],p=l==="word-alt";for(const b of c){const y=b===c[c.length-1];!b.added&&!b.removed?(dd({item:b,arr:d,enableJoin:p,isNeutral:!0,isLastItem:y}),dd({item:b,arr:f,enableJoin:p,isNeutral:!0,isLastItem:y})):b.removed?dd({item:b,arr:d,enableJoin:p,isLastItem:y}):dd({item:b,arr:f,enableJoin:p,isLastItem:y})}let m=0;for(const b of d)b[0]===1&&a.push(cx({line:n-1,spanStart:m,spanLength:b[1].length})),m+=b[1].length;m=0;for(const b of f)b[0]===1&&o.push(cx({line:r-1,spanStart:m,spanLength:b[1].length})),m+=b[1].length}function dx({hunks:e,oldLines:t,newLines:n,splitLineIndex:r=0,unifiedLineIndex:a=0,lineDiffType:o}){const l={},c={},d=[],f=[];let p=1,m=1,b=1,y=1,_="",T="";for(const A of e){for(;t!=null&&n!=null&&p<A.additionStart&&m<A.deletionStart;)l[m]={type:"context-expanded",lineNumber:y,altLineNumber:b,lineIndex:`${a},${r}`},c[p]={type:"context-expanded",lineNumber:b,altLineNumber:y,lineIndex:`${a},${r}`},_+=t[m-1],T+=n[p-1],m++,p++,y++,b++,r++,a++;y=A.deletionStart,b=A.additionStart;for(const C of A.hunkContent)if(C.type==="context")for(const k of C.lines)l[m]={type:"context",lineNumber:y,altLineNumber:b,lineIndex:`${a},${r}`},c[p]={type:"context",lineNumber:b,altLineNumber:y,lineIndex:`${a},${r}`},_+=k,T+=k,m++,p++,b++,y++,r++,a++;else{const k=Math.max(C.additions.length,C.deletions.length);let N=0,L=a;for(;N<k;){const O=C.deletions[N],P=C.additions[N];N4({newLine:P,oldLine:O,oldLineIndex:m,newLineIndex:p,oldDecorations:d,newDecorations:f,lineDiffType:o}),O!=null&&(l[m]={type:"change-deletion",lineNumber:y,lineIndex:`${L},${r}`},_+=O,m++,y++),P!=null&&(c[p]={type:"change-addition",lineNumber:b,lineIndex:`${L+C.deletions.length},${r}`},T+=P,p++,b++),r++,L++,N++}a+=C.additions.length+C.deletions.length}if(!(t==null||n==null||A!==e[e.length-1]))for(;m<=t.length||p<=t.length;){const C=t[m-1],k=n[p-1];if(C==null&&k==null)break;C!=null&&(l[m]={type:"context-expanded",lineNumber:y,altLineNumber:b,lineIndex:`${a},${r}`},_+=C,m++,y++),k!=null&&(c[p]={type:"context-expanded",lineNumber:b,altLineNumber:y,lineIndex:`${a},${r}`},T+=k,p++,b++),r++,a++}}return{oldContent:_,newContent:T,oldInfo:l,newInfo:c,oldDecorations:d,newDecorations:f,splitLineIndex:r,unifiedLineIndex:a}}function fx({oldFile:e,newFile:t,oldInfo:n,newInfo:r,highlighter:a,oldDecorations:o,newDecorations:l,languageOverride:c,options:{theme:d=Wt,...f}}){const p=c??Br(e.name),m=c??Br(t.name),{state:b,transformers:y}=EC(),_=typeof d=="string"?{...f,lang:"text",theme:d,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:zn("token")}:{...f,lang:"text",themes:d,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:zn("token")};return{oldLines:e.contents===""?[]:(_.lang=p,b.lineInfo=n,_.decorations=o,ag(a.codeToHast(Ja(e.contents),_))),newLines:t.contents===""?[]:(_.lang=m,_.decorations=l,b.lineInfo=r,ag(a.codeToHast(Ja(t.contents),_)))}}const R4={fromStart:0,fromEnd:0};var L4=class{highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Wt},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=nu(e.theme??Wt)?mC():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager=void 0,this.onRenderUpdate=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){this.getOptionsWithDefaults().themeType!==e&&this.mergeOptions({themeType:e})}expandHunk(e,t){const{expansionLineCount:n}=this.getOptionsWithDefaults(),r=this.expandedHunks.get(e)??{fromStart:0,fromEnd:0};(t==="up"||t==="both")&&(r.fromStart+=n),(t==="down"||t==="both")&&(r.fromEnd+=n),this.expandedHunks.set(e,r)}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:a=!1,expandUnchanged:o=!1,expansionLineCount:l=100,hunkSeparators:c="line-info",lineDiffType:d="word-alt",maxLineDiffLength:f=1e3,overflow:p="scroll",theme:m=Wt,themeType:b="system",tokenizeMaxLineLength:y=1e3,useCSSClasses:_=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:a,expandUnchanged:o,expansionLineCount:l,hunkSeparators:c,lineDiffType:d,maxLineDiffLength:f,overflow:p,theme:this.workerManager?.getDiffRenderOptions().theme??m,themeType:b,tokenizeMaxLineLength:y,useCSSClasses:_}}async initializeHighlighter(){return this.highlighter=await sf(yC(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let n=this.workerManager?.getDiffResultCache(e);n!=null&&!Vm(t,n.options)&&(n=void 0),this.renderCache??={diff:e,highlighted:!0,options:t,result:n?.result},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightDiffAST(this,this.diff):this.asyncHighlight(e).then(({result:r,options:a})=>{this.onHighlightSuccess(e,r,a)})}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:r,tokenizeMaxLineLength:a,lineDiffType:o}=this.getOptionsWithDefaults();return{theme:r,tokenizeMaxLineLength:a,lineDiffType:o}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceRender:!0}:e!==n.diff||!Vm(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff){if(e==null)return;const t=this.workerManager?.getDiffResultCache(e);t!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,...t});const{options:n,forceRender:r}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:n,result:void 0},this.workerManager?.isWorkingPool()===!0)this.renderCache.result??=this.workerManager.getPlainDiffAST(e),(!this.renderCache.highlighted||r)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Br(e.name);const a=this.highlighter!=null&&nu(n.theme),o=this.highlighter!=null&&qd(this.computedLang);if(this.highlighter!=null&&a&&(r||!this.renderCache.highlighted&&o||this.renderCache.result==null)){const{result:l,options:c}=this.renderDiffWithHighlighter(e,this.highlighter,!o);this.renderCache={diff:e,options:c,highlighted:o,result:l}}(!a||!o)&&this.asyncHighlight(e).then(({result:l,options:c})=>{this.onHighlightSuccess(e,l,c)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,this.renderCache.result):void 0}async asyncRender(e){const{result:t}=await this.asyncHighlight(e);return this.processDiffResult(e,t)}createPreElement(e,t,n,r){const{diffIndicators:a,disableBackground:o,disableLineNumbers:l,overflow:c,themeType:d}=this.getOptionsWithDefaults();return bC({diffIndicators:a,disableBackground:o,disableLineNumbers:l,overflow:c,themeStyles:n,split:e,themeType:r??d,totalLines:t})}async asyncHighlight(e){this.computedLang=e.lang??Br(e.name);const t=this.highlighter!=null&&nu(this.options.theme??Wt),n=this.highlighter!=null&&qd(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:LC(e,t,r,n),options:r}}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;const r=this.renderCache.diff!==e||!this.renderCache.highlighted||!Vm(this.renderCache.options,n);this.renderCache={diff:e,options:n,highlighted:!0,result:t},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,{code:t,themeStyles:n,baseThemeType:r}){const{diffStyle:a,disableFileHeader:o}=this.getOptionsWithDefaults();this.diff=e;const l=a==="unified";let c=[],d=[],f=[],p=0;const m=[];let b,y=0;for(const A of e.hunks)y+=A.collapsedBefore,y=this.renderHunks({ast:t,hunk:A,prevHunk:b,hunkIndex:p,isLastHunk:p===e.hunks.length-1,additionsAST:c,deletionsAST:d,unifiedAST:f,hunkData:m,lineIndex:y}),p++,b=A;const _=Math.max(g4(e.hunks),e.newLines?.length??0,e.oldLines?.length??0);c=!l&&(t.hunks!=null||t.newLines.length>0)?c:void 0,d=!l&&(t.hunks!=null||t.oldLines.length>0)?d:void 0,f=f.length>0?f:void 0;const T=this.createPreElement(d!=null&&c!=null,_,n,r);return{additionsAST:c,deletionsAST:d,unifiedAST:f,hunkData:m,preNode:T,themeStyles:n,baseThemeType:r,headerElement:o?void 0:this.renderHeader(this.diff,n,r),totalLines:_,css:""}}renderFullAST(e,t=[]){return e.unifiedAST!=null&&t.push(We({tagName:"code",children:e.unifiedAST,properties:{"data-code":"","data-unified":""}})),e.deletionsAST!=null&&t.push(We({tagName:"code",children:e.deletionsAST,properties:{"data-code":"","data-deletions":""}})),e.additionsAST!=null&&t.push(We({tagName:"code",children:e.additionsAST,properties:{"data-code":"","data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return bi(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?bi(e):bi(We({tagName:"code",children:e,properties:{"data-code":"",[`data-${t}`]:""}}))}renderCollapsedHunks({ast:e,hunkData:t,hunkIndex:n,hunkSpecs:r,isFirstHunk:a,isLastHunk:o,rangeSize:l,lineIndex:c,additionLineNumber:d,deletionLineNumber:f,unifiedAST:p,deletionsAST:m,additionsAST:b}){if(l<=0)return;const{hunkSeparators:y,expandUnchanged:_,diffStyle:T,expansionLineCount:A}=this.getOptionsWithDefaults(),C=e.hunks==null&&e.newLines.length>0&&e.oldLines.length>0,k=this.expandedHunks.get(n)??R4,N=l>A,L=Math.max(_?0:l-(k.fromEnd+k.fromStart),0),O=({type:V,linesAST:G})=>{if(y==="line-info"||y==="custom"){const Z=m4(V,n);G.push($m({type:y,content:O4(L),expandIndex:C?n:void 0,chunked:N,slotName:Z,isFirstHunk:a,isLastHunk:o})),t.push({slotName:Z,hunkIndex:n,lines:L,type:V,expandable:C?{up:C&&!a,down:C,chunked:N}:void 0})}else y==="metadata"&&r!=null?G.push($m({type:"metadata",content:r,isFirstHunk:a,isLastHunk:o})):y==="simple"&&n>0&&G.push($m({type:"simple",isFirstHunk:a,isLastHunk:!1}))},P=({rangeLen:V,fromStart:G})=>{if(e.newLines==null||e.oldLines==null)return;const Z=o?0:G?l:V;let z=f-Z,re=d-Z,W=c-Z;for(let he=0;he<V;he++){const ue=e.oldLines[z],se=e.newLines[re];if(ue==null||se==null)throw console.error({aLineNumber:re,dLineNumber:z,ast:e}),new Error("DiffHunksRenderer.renderHunks prefill context invalid. Must include data for old and new lines");z++,re++,T==="unified"?this.pushLineWithAnnotation({newLine:se,unifiedAST:p,unifiedSpan:this.getAnnotations("unified",z,re,n,W)}):this.pushLineWithAnnotation({newLine:se,oldLine:ue,additionsAST:b,deletionsAST:m,...this.getAnnotations("split",z,re,n,W)}),W++}};C&&P({rangeLen:Math.min(L===0||_?l:k.fromStart,l),fromStart:!0}),L>0&&(T==="unified"?O({type:"unified",linesAST:p}):(O({type:"deletions",linesAST:m}),O({type:"additions",linesAST:b}))),L>0&&k.fromEnd>0&&!o&&P({rangeLen:Math.min(k.fromEnd,l),fromStart:!1})}renderHunks({hunk:e,hunkData:t,hunkIndex:n,lineIndex:r,isLastHunk:a,prevHunk:o,ast:l,deletionsAST:c,additionsAST:d,unifiedAST:f}){const{diffStyle:p}=this.getOptionsWithDefaults(),m=p==="unified";let b=e.additionStart-1,y=e.deletionStart-1;this.renderCollapsedHunks({additionLineNumber:b,additionsAST:d,ast:l,deletionLineNumber:y,deletionsAST:c,hunkData:t,hunkIndex:n,hunkSpecs:e.hunkSpecs,isFirstHunk:o==null,isLastHunk:!1,lineIndex:r,rangeSize:Math.max(e.collapsedBefore,0),unifiedAST:f});let{oldLines:_,newLines:T,oldIndex:A,newIndex:C}=(()=>{if(l.hunks!=null){const k=l.hunks[n];if(k==null)throw console.error({ast:l,hunkIndex:n}),new Error("DiffHunksRenderer.renderHunks: lineHunk doesn't exist");return{oldLines:k.oldLines,newLines:k.newLines,oldIndex:0,newIndex:0}}return{oldLines:l.oldLines,newLines:l.newLines,oldIndex:y,newIndex:b}})();for(const k of e.hunkContent)if(k.type==="context"){const{length:N}=k.lines;for(let L=0;L<N;L++){const O=_[A],P=T[C];if(A++,C++,b++,y++,m){if(P==null)throw new Error("DiffHunksRenderer.renderHunks: newLine doesnt exist for context...");this.pushLineWithAnnotation({newLine:P,unifiedAST:f,unifiedSpan:this.getAnnotations("unified",y,b,n,r)})}else{if(P==null||O==null)throw new Error("DiffHunksRenderer.renderHunks: newLine or oldLine doesnt exist for context...");this.pushLineWithAnnotation({oldLine:O,newLine:P,deletionsAST:c,additionsAST:d,...this.getAnnotations("split",y,b,n,r)})}r++}if(k.noEOFCR){const L=Um("context");m?f.push(L):(c.push(L),d.push(L))}}else{const{length:N}=k.deletions,{length:L}=k.additions,O=m?N+L:Math.max(N,L);let P=0;for(let V=0;V<O;V++){const{oldLine:G,newLine:Z}=(()=>{let z=_[A],re=T[C];if(m?V<N?re=void 0:z=void 0:(V>=N&&(z=void 0),V>=L&&(re=void 0)),z==null&&re==null)throw console.error({i:V,len:O,ast:l,hunkContent:k}),new Error("renderHunks: oldLine and newLine are null, something is wrong");return{oldLine:z,newLine:re}})();if(G!=null&&(A++,y++),Z!=null&&(C++,b++),m)this.pushLineWithAnnotation({oldLine:G,newLine:Z,unifiedAST:f,unifiedSpan:this.getAnnotations("unified",G!=null?y:void 0,Z!=null?b:void 0,n,r)}),r++;else{(G==null||Z==null)&&P++;const z=this.getAnnotations("split",G!=null?y:void 0,Z!=null?b:void 0,n,r);z!=null&&P>0&&(L>N?c.push(to(P)):d.push(to(P)),P=0),this.pushLineWithAnnotation({newLine:Z,oldLine:G,deletionsAST:c,additionsAST:d,...z}),r++}}m||(P>0&&(L>N?c.push(to(P)):d.push(to(P)),P=0),k.noEOFCRDeletions&&(c.push(Um("change-deletion")),k.noEOFCRAdditions||d.push(to(1))),k.noEOFCRAdditions&&(d.push(Um("change-addition")),k.noEOFCRDeletions||c.push(to(1))))}return a&&l.newLines!=null&&l.newLines.length>0&&this.renderCollapsedHunks({additionLineNumber:b,additionsAST:d,ast:l,deletionLineNumber:y,deletionsAST:c,hunkData:t,hunkIndex:n+1,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,lineIndex:r,rangeSize:Math.max(l.newLines.length-Math.max(e.additionStart+e.additionCount-1,0),0),unifiedAST:f}),r}pushLineWithAnnotation({newLine:e,oldLine:t,unifiedAST:n,additionsAST:r,deletionsAST:a,unifiedSpan:o,deletionSpan:l,additionSpan:c}){n!=null?(t!=null?n.push(t):e!=null&&n.push(e),o!=null&&n.push(Ld(o))):a!=null&&r!=null&&(t!=null&&a.push(t),e!=null&&r.push(e),l!=null&&a.push(Ld(l)),c!=null&&r.push(Ld(c)))}getAnnotations(e,t,n,r,a){const o={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(t!=null)for(const c of this.deletionAnnotations[t]??[])o.annotations.push(Za(c));const l={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(n!=null)for(const c of this.additionAnnotations[n]??[])(e==="unified"?o:l).annotations.push(Za(c));if(e==="unified")return o.annotations.length>0?o:void 0;if(!(l.annotations.length===0&&o.annotations.length===0))return{deletionSpan:o,additionSpan:l}}renderHeader(e,t,n){const{themeType:r}=this.getOptionsWithDefaults();return gC({fileOrDiff:e,themeStyles:t,themeType:n??r})}};function Vm(e,t){return Df(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType}function O4(e){return`${e} unmodified line${e>1?"s":""}`}function D4(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const n=e.substring(1);return{line:n===""?`
|
|
1290
|
+
`:n,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function I4(e,t){const n=vm.test(e),r=e.split(n?vm:m_);let a;const o=[];let l;for(const c of r){if(n&&!vm.test(c)){a==null?a=c:console.error("parsePatchContent: unknown file blob:",c);continue}else if(!n&&!m_.test(c)){a==null?a=c:console.error("parsePatchContent: unknown file blob:",c);continue}let d=0;const f=c.split(ZL);l=void 0;for(const p of f){const m=p.split(M0),b=m.shift();if(b==null){console.error("parsePatchContent: invalid hunk",p);continue}const y=b.match(JL),_=[];let T=0,A=0;if(y==null||l==null){if(l!=null){console.error("parsePatchContent: Invalid hunk",p);continue}l={name:"",prevName:void 0,type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,cacheKey:void 0},m.unshift(b);for(const k of m){const N=k.match(n?tO:eO);if(k.startsWith("diff --git")){const[,,L,,O]=k.trim().match(nO)??[];l.name=O.trim(),L!==O&&(l.prevName=L.trim())}else if(N!=null){const[,L,O]=N;L==="---"&&O!=="/dev/null"?(l.prevName=O.trim(),l.name=O.trim()):L==="+++"&&O!=="/dev/null"&&(l.name=O.trim())}else if(n){if(k.startsWith("new mode ")&&(l.mode=k.replace("new mode","").trim()),k.startsWith("old mode ")&&(l.oldMode=k.replace("old mode","").trim()),k.startsWith("new file mode")&&(l.type="new",l.mode=k.replace("new file mode","").trim()),k.startsWith("deleted file mode")&&(l.type="deleted",l.mode=k.replace("deleted file mode","").trim()),k.startsWith("similarity index")&&(k.startsWith("similarity index 100%")?l.type="rename-pure":l.type="rename-changed"),k.startsWith("index ")){const[,L]=k.trim().match(rO)??[];L!=null&&(l.mode=L)}k.startsWith("rename from ")&&(l.prevName=k.replace("rename from ","")),k.startsWith("rename to ")&&(l.name=k.replace("rename to ","").trim())}}continue}else{let k,N;for(;m.length>0&&(m[m.length-1]===`
|
|
1291
|
+
`||m[m.length-1]==="");)m.pop();for(const L of m){const O=D4(L);if(O==null)continue;const{type:P,line:V}=O;if(P==="addition")(k==null||k.type!=="change")&&(k=qm("change"),_.push(k)),k.additions.push(V),T++,N="addition";else if(P==="deletion")(k==null||k.type!=="change")&&(k=qm("change"),_.push(k)),k.deletions.push(V),A++,N="deletion";else if(P==="context")(k==null||k.type!=="context")&&(k=qm("context"),_.push(k)),k.lines.push(V),N="context";else if(P==="metadata"&&k!=null){if(k.type==="context")k.noEOFCR=!0;else if(N==="deletion"){k.noEOFCRDeletions=!0;const G=k.deletions.length-1;G>=0&&(k.deletions[G]=Ja(k.deletions[G]))}else if(N==="addition"){k.noEOFCRAdditions=!0;const G=k.additions.length-1;G>=0&&(k.additions[G]=Ja(k.additions[G]))}}}}const C={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(y[4]??"1"),additionStart:parseInt(y[3]),additionLines:T,deletionCount:parseInt(y[2]??"1"),deletionStart:parseInt(y[1]),deletionLines:A,hunkContent:_,hunkContext:y[5],hunkSpecs:b};if(isNaN(C.additionCount)||isNaN(C.deletionCount)||isNaN(C.additionStart)||isNaN(C.deletionStart)){console.error("parsePatchContent: invalid hunk metadata",C);continue}C.collapsedBefore=Math.max(C.additionStart-1-d,0),l.hunks.push(C),d=C.additionStart+C.additionCount-1;for(const k of _)k.type==="context"?(C.splitLineCount+=k.lines.length,C.unifiedLineCount+=k.lines.length):(C.splitLineCount+=Math.max(k.additions.length,k.deletions.length),C.unifiedLineCount+=k.deletions.length+k.additions.length);C.splitLineStart=l.splitLineCount,C.unifiedLineStart=l.unifiedLineCount,l.splitLineCount+=C.splitLineCount,l.unifiedLineCount+=C.unifiedLineCount}l!=null&&(!n&&l.prevName!=null&&l.name!==l.prevName&&(l.hunks.length>0?l.type="rename-changed":l.type="rename-pure"),l.type!=="rename-pure"&&l.type!=="rename-changed"&&(l.prevName=void 0),o.push(l))}return{patchMetadata:a,files:o}}function ab(e,t){const n=[];for(const r of e.split(KL))try{n.push(I4(r,t!=null?`${t}-${n.length}`:void 0))}catch(a){console.error(a)}return n}function qm(e){return e==="change"?{type:"change",additions:[],deletions:[],noEOFCRAdditions:!1,noEOFCRDeletions:!1}:{type:"context",lines:[],noEOFCR:!1}}function hx(e,t,n){const r=ab(A4(e.name,t.name,e.contents,t.contents,e.header,t.header))[0]?.files[0];if(r==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return r.oldLines=e.contents.split(M0),r.newLines=t.contents.split(M0),e.cacheKey!=null&&t.cacheKey!=null&&(r.cacheKey=`${e.cacheKey}:${t.cacheKey}`),r}let M4=-1;var P4=class{static LoadedCustomComponent=NC;__id=++M4;fileContainer;spriteSVG;pre;unsafeCSSStyle;hoverContent;headerElement;headerMetadata;customHunkElements=[];errorWrapper;hunksRenderer;resizeManager;scrollSyncManager;mouseEventManager;lineSelectionManager;annotationElements=[];lineAnnotations=[];oldFile;newFile;fileDiff;constructor(t={theme:Wt},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.hunksRenderer=new L4({...t,hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators},this.handleHighlightRender,this.workerManager),this.resizeManager=new X2,this.scrollSyncManager=new p4,this.mouseEventManager=new W2("diff",Vd(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"?this.handleExpandHunk:void 0)),this.lineSelectionManager=new Q2($d(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};setOptions(t){t!=null&&(this.options=t,this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators}),this.mouseEventManager.setOptions(Vd(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"?this.handleExpandHunk:void 0)),this.lineSelectionManager.setOptions($d(t)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){if((this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.hunksRenderer.setThemeType(t),this.headerElement!=null&&(t==="system"?delete this.headerElement.dataset.themeType:this.headerElement.dataset.themeType=t),this.pre!=null))switch(t){case"system":delete this.pre.dataset.themeType;break;case"light":case"dark":this.pre.dataset.themeType=t;break}}getHoveredLine=()=>this.mouseEventManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t){this.lineSelectionManager.setSelection(t)}cleanUp(){this.hunksRenderer.cleanUp(),this.resizeManager.cleanUp(),this.mouseEventManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.lineSelectionManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.workerManager=void 0,this.fileDiff=void 0,this.oldFile=void 0,this.newFile=void 0,this.isContainerManaged||this.fileContainer?.parentNode?.removeChild(this.fileContainer),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre=void 0,this.headerElement=void 0,this.errorWrapper=void 0}hydrate(t){const{fileContainer:n,prerenderedHTML:r}=t;AC(n,r);for(const a of Array.from(n.shadowRoot?.children??[])){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;continue}if("diffsHeader"in a.dataset){this.headerElement=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(Ug)){this.unsafeCSSStyle=a;continue}}}if(this.pre==null)this.render(t);else{const{lineAnnotations:a,oldFile:o,newFile:l,fileDiff:c}=t;this.fileContainer=n,delete this.pre.dataset.dehydrated,this.lineAnnotations=a??this.lineAnnotations,this.newFile=l,this.oldFile=o,this.fileDiff=c??(o!=null&&l!=null?hx(o,l):void 0),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderHoverUtility(),this.injectUnsafeCSS(),this.mouseEventManager.setup(this.pre),this.lineSelectionManager.setup(this.pre),(this.options.overflow??"scroll")==="scroll"&&(this.resizeManager.setup(this.pre),(this.options.diffStyle??"split")==="split"&&this.scrollSyncManager.setup(this.pre))}}rerender(){this.fileDiff==null&&this.newFile==null&&this.oldFile==null||this.render({oldFile:this.oldFile,newFile:this.newFile,fileDiff:this.fileDiff,forceRender:!0})}handleExpandHunk=(t,n)=>{this.expandHunk(t,n)};expandHunk(t,n){this.hunksRenderer.expandHunk(t,n),this.rerender()}render({oldFile:t,newFile:n,fileDiff:r,forceRender:a=!1,lineAnnotations:o,fileContainer:l,containerWrapper:c}){const d=t!=null&&n!=null&&(!sg(t,this.oldFile)||!sg(n,this.newFile)),f=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!a&&!f&&(r!=null&&r===this.fileDiff||r==null&&!d)||(this.oldFile=t,this.newFile=n,r!=null?this.fileDiff=r:t!=null&&n!=null&&d&&(this.fileDiff=hx(t,n)),o!=null&&this.setLineAnnotations(o),this.fileDiff==null))return;this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof this.options.hunkSeparators=="function"?"custom":this.options.hunkSeparators}),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableFileHeader:p=!1}=this.options;p&&this.headerElement!=null&&(this.headerElement.parentNode?.removeChild(this.headerElement),this.headerElement=void 0),l=this.getOrCreateFileContainer(l,c);try{const m=this.hunksRenderer.renderDiff(this.fileDiff);if(m==null){this.workerManager!=null&&!this.workerManager.isInitialized()&&this.workerManager.initialize().then(()=>this.rerender());return}m.headerElement!=null&&this.applyHeaderToDOM(m.headerElement,l);const b=this.getOrCreatePreNode(l);this.applyHunksToDOM(b,m),this.renderSeparators(m.hunkData),this.renderAnnotations(),this.renderHoverUtility()}catch(m){m instanceof Error&&this.applyErrorToDOM(m,l)}}renderSeparators(t){const{hunkSeparators:n}=this.options;if(!(this.isContainerManaged||this.fileContainer==null||typeof n!="function")){for(const r of this.customHunkElements)r.parentNode?.removeChild(r);this.customHunkElements.length=0;for(const r of t){const a=document.createElement("div");a.style.display="contents",a.slot=r.slotName,a.appendChild(n(r,this)),this.fileContainer.appendChild(a),this.customHunkElements.push(a)}}}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null)return;for(const n of this.annotationElements)n.parentNode?.removeChild(n);this.annotationElements.length=0;const{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const n of this.lineAnnotations){const r=t(n);if(r==null)continue;const a=TC(Za(n));a.appendChild(r),this.annotationElements.push(a),this.fileContainer.appendChild(a)}}renderHoverUtility(){const{renderHoverUtility:t}=this.options;if(this.fileContainer==null||t==null)return;this.hoverContent==null&&(this.hoverContent=SC(),this.fileContainer.appendChild(this.hoverContent));const n=t(this.mouseEventManager.getHoveredLine);this.hoverContent.innerHTML="",n!=null&&this.hoverContent.appendChild(n)}getOrCreateFileContainer(t,n){if(this.fileContainer=t??this.fileContainer??document.createElement(_o),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=xC;const a=r.firstChild;a instanceof SVGElement&&(this.spriteSVG=a,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(t){return this.pre==null?(this.pre=document.createElement("pre"),t.shadowRoot?.appendChild(this.pre)):this.pre.parentNode!==t&&t.shadowRoot?.appendChild(this.pre),this.pre}applyHeaderToDOM(t,n){this.cleanupErrorWrapper();const r=document.createElement("div");r.innerHTML=bi(t);const a=r.firstElementChild;if(!(a instanceof HTMLElement)||(this.headerElement!=null?n.shadowRoot?.replaceChild(a,this.headerElement):n.shadowRoot?.prepend(a),this.headerElement=a,this.isContainerManaged))return;const{renderHeaderMetadata:o}=this.options;this.headerMetadata!=null&&this.headerMetadata.parentNode?.removeChild(this.headerMetadata);const l=o?.({oldFile:this.oldFile,newFile:this.newFile,fileDiff:this.fileDiff})??void 0;l!=null&&(this.headerMetadata=document.createElement("div"),this.headerMetadata.slot=ku,l instanceof Element?this.headerMetadata.appendChild(l):this.headerMetadata.innerText=`${l}`,n.appendChild(this.headerMetadata))}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;const{unsafeCSS:t}=this.options;t==null||t===""||(this.unsafeCSSStyle==null&&(this.unsafeCSSStyle=CC(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=wC(t))}applyHunksToDOM(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,n),t.innerHTML="";let r,a;if(n.unifiedAST!=null){const o=Od({columnType:"unified"});o.innerHTML=this.hunksRenderer.renderPartialHTML(n.unifiedAST),t.appendChild(o)}else n.deletionsAST!=null&&(r=Od({columnType:"deletions"}),r.innerHTML=this.hunksRenderer.renderPartialHTML(n.deletionsAST),t.appendChild(r)),n.additionsAST!=null&&(a=Od({columnType:"additions"}),a.innerHTML=this.hunksRenderer.renderPartialHTML(n.additionsAST),t.appendChild(a));this.injectUnsafeCSS(),this.mouseEventManager.setup(t),this.lineSelectionManager.setup(t),(this.options.overflow??"scroll")==="scroll"?(this.resizeManager.setup(t),(this.options.diffStyle??"split")==="split"?this.scrollSyncManager.setup(t,r,a):this.scrollSyncManager.cleanUp()):(this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp())}applyPreNodeAttributes(t,{themeStyles:n,baseThemeType:r,additionsAST:a,deletionsAST:o,totalLines:l}){const{diffIndicators:c="bars",disableBackground:d=!1,disableLineNumbers:f=!1,overflow:p="scroll",themeType:m="system",diffStyle:b="split"}=this.options;kC({pre:t,diffIndicators:c,disableBackground:d,disableLineNumbers:f,overflow:p,split:b==="unified"?!1:a!=null&&o!=null,themeStyles:n,themeType:r??m,totalLines:l})}applyErrorToDOM(t,n){this.cleanupErrorWrapper();const r=this.getOrCreatePreNode(n);r.innerHTML="",r.parentNode?.removeChild(r),this.pre=void 0;const a=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",a.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const l=document.createElement("pre");l.dataset.errorStack="",l.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(l)}cleanupErrorWrapper(){this.errorWrapper?.parentNode?.removeChild(this.errorWrapper),this.errorWrapper=void 0}};function px(e){const t=[];for(const n of e){const r=Xa.get(n);if(r==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(r)}return t}function mx(e){for(const t of Array.isArray(e)?e:[e])if(!Xa.has(t))return!1;return!0}async function gx(e){const t=[],n=[];for(const r of e){if(r==="text"||r==="ansi")continue;const a=dC(r)??cC(r);"then"in a?n.push(a):t.push(a)}return n.length>0&&await Promise.all(n).then(r=>{for(const a of r){if(a==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(a)}}),t}function bx(e){const t=[];for(const n of e){const r=Ei.get(n);if(r==null)throw new Error(`getAllResolvedThemes: ${n} is unresolved, you must resolve all necessary themes before calling this function`);t.push(r)}return t}async function yx(e){const t=[],n=[];for(const r of e){const a=hC(r)??fC(r);"then"in a?n.push(a):t.push(a)}return n.length>0&&await Promise.all(n).then(r=>{for(const a of r)a!=null&&t.push(a)}),t}function B4(e,t,n){if(e===t||e==null||t==null)return e===t;const r=new Set(n),a=Object.keys(e),o=new Set(Object.keys(t));for(const l of a)if(o.delete(l),!r.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(o))if(!r.has(l))return!1;return!0}function OC(e,t){return Df(e?.theme??Wt,t?.theme??Wt)&&B4(e,t,["theme"])}const Mr=[],nt=async(e,t={})=>{const n=await fetch(e,{headers:{"Content-Type":"application/json",...t.headers||{}},...t});if(!n.ok){const r=await n.text();throw new Error(r||n.statusText)}return n.status===204?null:await n.json()},Ex=async(e,t={})=>{const n=await fetch(e,{headers:{...t.headers||{}},...t});if(!n.ok){const r=await n.text();throw new Error(r||n.statusText)}return n.status===204?"":await n.text()},Du=e=>{if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=Math.round((t.getTime()-Date.now())/1e3),r=Math.abs(n);let a="second",o=n;return r>=60&&(o=Math.round(n/60),a="minute"),r>=3600&&(o=Math.round(n/3600),a="hour"),r>=3600*24&&(o=Math.round(n/86400),a="day"),r>=3600*24*7&&(o=Math.round(n/(86400*7)),a="week"),r>=3600*24*30&&(o=Math.round(n/(86400*30)),a="month"),r>=3600*24*365&&(o=Math.round(n/(86400*365)),a="year"),new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(o,a)},br=e=>{if(!e)return"";if(typeof e=="string")return e;if(!(e instanceof Error))return"";try{const t=JSON.parse(e.message);if(t&&typeof t.error=="string")return t.error}catch{return e.message}return e.message},DC=e=>{const t=br(e);return t==="not_a_directory"?"The selected path is not a directory.":t==="invalid_path"?"The selected path could not be opened.":t?`Failed to open project: ${t}`:"Failed to open project."},j4=e=>{const t=e.replace(/\\/g,"/"),n=t.split("/"),r=n.pop()||t,a=n.join("/");return{prefix:a?`${a}/`:"",name:r}},H4={avif:"image",bmp:"image",gif:"image",ico:"image",jpeg:"image",jpg:"image",png:"image",svg:"image",webp:"image",mp4:"video",mov:"video",ogv:"video",webm:"video",mp3:"audio",m4a:"audio",ogg:"audio",wav:"audio",flac:"audio",pdf:"pdf"},F4=e=>{const t=e.split(".").pop()?.toLowerCase()||"";return H4[t]||""},og=(e,t)=>{if(!t||t.length===0)return e;const n=new Map;for(const r of e||Mr)n.set(r.path,r);for(const r of t){const a=n.get(r.path)||{};n.set(r.path,{...a,...r})}return Array.from(n.values()).sort((r,a)=>r.path.localeCompare(a.path))},U4=e=>{switch(e){case"new":return"added";case"deleted":return"deleted";case"rename-pure":case"rename-changed":return"renamed";default:return"modified"}},z4=(e,t)=>{if(!t)return"";const n=t.trim();if(!n)return"";if(/^diff --git/m.test(n)||/^---\s+/m.test(n))return n;const r=e||"unknown";return[`diff --git a/${r} b/${r}`,`--- a/${r}`,`+++ b/${r}`,n,""].join(`
|
|
1292
|
+
`)},IC=(e,t)=>{const n=z4(e,t);if(!n)return null;try{const a=ab(n).flatMap(o=>o.files);return a.length===0?null:e&&a.find(o=>o.name===e||o.prevName===e)||a[0]}catch(r){return console.error("Failed to parse patch file",r),null}},lg=e=>{if(!e)return[];try{const t=ab(e),n=new Map;for(const r of t)for(const a of r.files){if(!a.name)continue;const o=a.prevName&&a.prevName!==a.name?a.prevName:null,l={path:a.name,status:U4(a.type),fileDiff:a};o&&(l.previousPath=o),n.set(a.name,{...l})}return Array.from(n.values()).sort((r,a)=>r.path.localeCompare(a.path))}catch(t){return console.error("Failed to parse git diff",t),[]}},$4=e=>{if(!e)return null;const t=e.fileDiff;if(t?.hunks){let n=0,r=0;for(const a of t.hunks)n+=a.additionLines,r+=a.deletionLines;return{additions:n,deletions:r}}return null},V4=(...e)=>e.filter(Boolean).join(" ");function MC(e){const t=Number.parseInt(e.slice(0,2),16),n=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return(.299*t+.587*n+.114*r)/255>.5?"#000000":"#ffffff"}const PC=(e,t)=>{const n=gn({queryKey:["branches-info",e],queryFn:()=>nt(`/api/projects/branches?project=${encodeURIComponent(e)}`),enabled:!!(e&&t)});return{branchList:n.data?.branches||Mr,currentBranch:n.data?.current||"",defaultBranchName:n.data?.defaultBranch||"main",branchesLoading:n.isLoading}},vx=e=>{let t;const n=new Set,r=(f,p)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const b=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,a,c);return c},q4=(e=>e?vx(e):vx),G4=e=>e;function Y4(e,t=G4){const n=ho.useSyncExternalStore(e.subscribe,ho.useCallback(()=>t(e.getState()),[e,t]),ho.useCallback(()=>t(e.getInitialState()),[e,t]));return ho.useDebugValue(n),n}const _x=e=>{const t=q4(e),n=r=>Y4(t,r);return Object.assign(n,t),n},BC=(e=>e?_x(e):_x),bt={projectPath:"diffact:projectPath",projectRoots:"diffact:projectRoots",recentProjects:"diffact:recentProjects",preferredEditor:"diffact:preferred-editor",fontFamily:"diffact:fontFamily",fontSize:"diffact:fontSize",theme:"diffact:theme",darkMode:"diffact:darkMode",cliProvider:"diffact:cliProvider"},Iu=BC(e=>({selectedFilePath:"",selectedTreeFilePath:"",selectedCommitSha:"",selectedHistoryFilePath:"",setSelectedFilePath:t=>e({selectedFilePath:t}),setSelectedTreeFilePath:t=>e({selectedTreeFilePath:t}),setSelectedCommitSha:t=>e({selectedCommitSha:t}),setSelectedHistoryFilePath:t=>e({selectedHistoryFilePath:t}),clearAllSelections:()=>e({selectedFilePath:"",selectedTreeFilePath:"",selectedCommitSha:"",selectedHistoryFilePath:""})})),Q4=()=>typeof window>"u"?"":localStorage.getItem(bt.projectPath)||"",as=BC(e=>({projectPath:Q4(),projectOpenError:"",branchTab:"branches",branchFilter:"",sidebarTab:"changes",setProjectPath:t=>{const n=as.getState().projectPath;t!==n&&(Iu.getState().clearAllSelections(),typeof window<"u"&&(t?localStorage.setItem(bt.projectPath,t):localStorage.removeItem(bt.projectPath)),e({projectPath:t,branchFilter:"",branchTab:"branches"}))},setProjectOpenError:t=>e({projectOpenError:t}),setBranchTab:t=>e({branchTab:t}),setBranchFilter:t=>e({branchFilter:t}),setSidebarTab:t=>e({sidebarTab:t})}));function ua(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function xx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jC(...e){return t=>{let n=!1;const r=e.map(a=>{const o=xx(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():xx(e[a],null)}}}}function ma(...e){return w.useCallback(jC(...e),e)}function HC(e,t=[]){let n=[];function r(o,l){const c=w.createContext(l),d=n.length;n=[...n,l];const f=m=>{const{scope:b,children:y,..._}=m,T=b?.[e]?.[d]||c,A=w.useMemo(()=>_,Object.values(_));return x.jsx(T.Provider,{value:A,children:y})};f.displayName=o+"Provider";function p(m,b){const y=b?.[e]?.[d]||c,_=w.useContext(y);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,p]}const a=()=>{const o=n.map(l=>w.createContext(l));return function(c){const d=c?.[e]||o;return w.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return a.scopeName=e,[r,W4(a,...t)]}function W4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...c,...m}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var If=Y2();const X4=Au(If);function FC(e){const t=K4(e),n=w.forwardRef((r,a)=>{const{children:o,...l}=r,c=w.Children.toArray(o),d=c.find(J4);if(d){const f=d.props.children,p=c.map(m=>m===d?w.Children.count(f)>1?w.Children.only(null):w.isValidElement(f)?f.props.children:null:m);return x.jsx(t,{...l,ref:a,children:w.isValidElement(f)?w.cloneElement(f,void 0,p):null})}return x.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function K4(e){const t=w.forwardRef((n,r)=>{const{children:a,...o}=n;if(w.isValidElement(a)){const l=t8(a),c=e8(o,a.props);return a.type!==w.Fragment&&(c.ref=r?jC(r,l):l),w.cloneElement(a,c)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Z4=Symbol("radix.slottable");function J4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Z4}function e8(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const d=o(...c);return a(...c),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function t8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var n8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ti=n8.reduce((e,t)=>{const n=FC(`Primitive.${t}`),r=w.forwardRef((a,o)=>{const{asChild:l,...c}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r8(e,t){e&&If.flushSync(()=>e.dispatchEvent(t))}function To(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}function i8(e,t=globalThis?.document){const n=To(e);w.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a8="DismissableLayer",ug="dismissableLayer.update",s8="dismissableLayer.pointerDownOutside",o8="dismissableLayer.focusOutside",Tx,UC=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zC=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...d}=e,f=w.useContext(UC),[p,m]=w.useState(null),b=p?.ownerDocument??globalThis?.document,[,y]=w.useState({}),_=ma(t,V=>m(V)),T=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=T.indexOf(A),k=p?T.indexOf(p):-1,N=f.layersWithOutsidePointerEventsDisabled.size>0,L=k>=C,O=c8(V=>{const G=V.target,Z=[...f.branches].some(z=>z.contains(G));!L||Z||(a?.(V),l?.(V),V.defaultPrevented||c?.())},b),P=d8(V=>{const G=V.target;[...f.branches].some(z=>z.contains(G))||(o?.(V),l?.(V),V.defaultPrevented||c?.())},b);return i8(V=>{k===f.layers.size-1&&(r?.(V),!V.defaultPrevented&&c&&(V.preventDefault(),c()))},b),w.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Tx=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Sx(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Tx)}},[p,b,n,f]),w.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Sx())},[p,f]),w.useEffect(()=>{const V=()=>y({});return document.addEventListener(ug,V),()=>document.removeEventListener(ug,V)},[]),x.jsx(Ti.div,{...d,ref:_,style:{pointerEvents:N?L?"auto":"none":void 0,...e.style},onFocusCapture:ua(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ua(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ua(e.onPointerDownCapture,O.onPointerDownCapture)})});zC.displayName=a8;var l8="DismissableLayerBranch",u8=w.forwardRef((e,t)=>{const n=w.useContext(UC),r=w.useRef(null),a=ma(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),x.jsx(Ti.div,{...e,ref:a})});u8.displayName=l8;function c8(e,t=globalThis?.document){const n=To(e),r=w.useRef(!1),a=w.useRef(()=>{});return w.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let d=function(){$C(s8,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function d8(e,t=globalThis?.document){const n=To(e),r=w.useRef(!1);return w.useEffect(()=>{const a=o=>{o.target&&!r.current&&$C(o8,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sx(){const e=new CustomEvent(ug);document.dispatchEvent(e)}function $C(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?r8(a,o):a.dispatchEvent(o)}var Gm=0;function f8(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cx()),document.body.insertAdjacentElement("beforeend",e[1]??Cx()),Gm++,()=>{Gm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gm--}},[])}function Cx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ym="focusScope.autoFocusOnMount",Qm="focusScope.autoFocusOnUnmount",wx={bubbles:!1,cancelable:!0},h8="FocusScope",VC=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[c,d]=w.useState(null),f=To(a),p=To(o),m=w.useRef(null),b=ma(t,T=>d(T)),y=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let T=function(N){if(y.paused||!c)return;const L=N.target;c.contains(L)?m.current=L:ta(m.current,{select:!0})},A=function(N){if(y.paused||!c)return;const L=N.relatedTarget;L!==null&&(c.contains(L)||ta(m.current,{select:!0}))},C=function(N){if(document.activeElement===document.body)for(const O of N)O.removedNodes.length>0&&ta(c)};document.addEventListener("focusin",T),document.addEventListener("focusout",A);const k=new MutationObserver(C);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",A),k.disconnect()}}},[r,c,y.paused]),w.useEffect(()=>{if(c){kx.add(y);const T=document.activeElement;if(!c.contains(T)){const C=new CustomEvent(Ym,wx);c.addEventListener(Ym,f),c.dispatchEvent(C),C.defaultPrevented||(p8(E8(qC(c)),{select:!0}),document.activeElement===T&&ta(c))}return()=>{c.removeEventListener(Ym,f),setTimeout(()=>{const C=new CustomEvent(Qm,wx);c.addEventListener(Qm,p),c.dispatchEvent(C),C.defaultPrevented||ta(T??document.body,{select:!0}),c.removeEventListener(Qm,p),kx.remove(y)},0)}}},[c,f,p,y]);const _=w.useCallback(T=>{if(!n&&!r||y.paused)return;const A=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,C=document.activeElement;if(A&&C){const k=T.currentTarget,[N,L]=m8(k);N&&L?!T.shiftKey&&C===L?(T.preventDefault(),n&&ta(N,{select:!0})):T.shiftKey&&C===N&&(T.preventDefault(),n&&ta(L,{select:!0})):C===k&&T.preventDefault()}},[n,r,y.paused]);return x.jsx(Ti.div,{tabIndex:-1,...l,ref:b,onKeyDown:_})});VC.displayName=h8;function p8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ta(r,{select:t}),document.activeElement!==n)return}function m8(e){const t=qC(e),n=Ax(t,e),r=Ax(t.reverse(),e);return[n,r]}function qC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ax(e,t){for(const n of e)if(!g8(n,{upTo:t}))return n}function g8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b8(e){return e instanceof HTMLInputElement&&"select"in e}function ta(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&b8(e)&&t&&e.select()}}var kx=y8();function y8(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nx(e,t),e.unshift(t)},remove(t){e=Nx(e,t),e[0]?.resume()}}}function Nx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function E8(e){return e.filter(t=>t.tagName!=="A")}var da=globalThis?.document?w.useLayoutEffect:()=>{},v8=$2[" useId ".trim().toString()]||(()=>{}),_8=0;function x8(e){const[t,n]=w.useState(v8());return da(()=>{n(r=>r??String(_8++))},[e]),e||(t?`radix-${t}`:"")}const T8=["top","right","bottom","left"],fa=Math.min,$n=Math.max,of=Math.round,fd=Math.floor,jr=e=>({x:e,y:e}),S8={left:"right",right:"left",bottom:"top",top:"bottom"},C8={start:"end",end:"start"};function cg(e,t,n){return $n(e,fa(t,n))}function _i(e,t){return typeof e=="function"?e(t):e}function xi(e){return e.split("-")[0]}function Po(e){return e.split("-")[1]}function sb(e){return e==="x"?"y":"x"}function ob(e){return e==="y"?"height":"width"}const w8=new Set(["top","bottom"]);function Pr(e){return w8.has(xi(e))?"y":"x"}function lb(e){return sb(Pr(e))}function A8(e,t,n){n===void 0&&(n=!1);const r=Po(e),a=lb(e),o=ob(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=lf(l)),[l,lf(l)]}function k8(e){const t=lf(e);return[dg(e),t,dg(t)]}function dg(e){return e.replace(/start|end/g,t=>C8[t])}const Rx=["left","right"],Lx=["right","left"],N8=["top","bottom"],R8=["bottom","top"];function L8(e,t,n){switch(e){case"top":case"bottom":return n?t?Lx:Rx:t?Rx:Lx;case"left":case"right":return t?N8:R8;default:return[]}}function O8(e,t,n,r){const a=Po(e);let o=L8(xi(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(dg)))),o}function lf(e){return e.replace(/left|right|bottom|top/g,t=>S8[t])}function D8(e){return{top:0,right:0,bottom:0,left:0,...e}}function GC(e){return typeof e!="number"?D8(e):{top:e,right:e,bottom:e,left:e}}function uf(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Ox(e,t,n){let{reference:r,floating:a}=e;const o=Pr(t),l=lb(t),c=ob(l),d=xi(t),f=o==="y",p=r.x+r.width/2-a.width/2,m=r.y+r.height/2-a.height/2,b=r[c]/2-a[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-a.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-a.width,y:m};break;default:y={x:r.x,y:r.y}}switch(Po(t)){case"start":y[l]-=b*(n&&f?-1:1);break;case"end":y[l]+=b*(n&&f?-1:1);break}return y}const I8=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=Ox(f,r,d),b=r,y={},_=0;for(let T=0;T<c.length;T++){const{name:A,fn:C}=c[T],{x:k,y:N,data:L,reset:O}=await C({x:p,y:m,initialPlacement:r,placement:b,strategy:a,middlewareData:y,rects:f,platform:l,elements:{reference:e,floating:t}});p=k??p,m=N??m,y={...y,[A]:{...y[A],...L}},O&&_<=50&&(_++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(f=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):O.rects),{x:p,y:m}=Ox(f,b,d)),T=-1)}return{x:p,y:m,placement:b,strategy:a,middlewareData:y}};async function xu(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=_i(t,e),_=GC(y),A=c[b?m==="floating"?"reference":"floating":m],C=uf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),L=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},O=uf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:N,strategy:d}):k);return{top:(C.top-O.top+_.top)/L.y,bottom:(O.bottom-C.bottom+_.bottom)/L.y,left:(C.left-O.left+_.left)/L.x,right:(O.right-C.right+_.right)/L.x}}const M8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:p=0}=_i(e,t)||{};if(f==null)return{};const m=GC(p),b={x:n,y:r},y=lb(a),_=ob(y),T=await l.getDimensions(f),A=y==="y",C=A?"top":"left",k=A?"bottom":"right",N=A?"clientHeight":"clientWidth",L=o.reference[_]+o.reference[y]-b[y]-o.floating[_],O=b[y]-o.reference[y],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let V=P?P[N]:0;(!V||!await(l.isElement==null?void 0:l.isElement(P)))&&(V=c.floating[N]||o.floating[_]);const G=L/2-O/2,Z=V/2-T[_]/2-1,z=fa(m[C],Z),re=fa(m[k],Z),W=z,he=V-T[_]-re,ue=V/2-T[_]/2+G,se=cg(W,ue,he),B=!d.arrow&&Po(a)!=null&&ue!==se&&o.reference[_]/2-(ue<W?z:re)-T[_]/2<0,Q=B?ue<W?ue-W:ue-he:0;return{[y]:b[y]+Q,data:{[y]:se,centerOffset:ue-se-Q,...B&&{alignmentOffset:Q}},reset:B}}}),P8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:T=!0,...A}=_i(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const C=xi(a),k=Pr(c),N=xi(c)===c,L=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=b||(N||!T?[lf(c)]:k8(c)),P=_!=="none";!b&&P&&O.push(...O8(c,T,_,L));const V=[c,...O],G=await xu(t,A),Z=[];let z=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&Z.push(G[C]),m){const ue=A8(a,l,L);Z.push(G[ue[0]],G[ue[1]])}if(z=[...z,{placement:a,overflows:Z}],!Z.every(ue=>ue<=0)){var re,W;const ue=(((re=o.flip)==null?void 0:re.index)||0)+1,se=V[ue];if(se&&(!(m==="alignment"?k!==Pr(se):!1)||z.every(X=>Pr(X.placement)===k?X.overflows[0]>0:!0)))return{data:{index:ue,overflows:z},reset:{placement:se}};let B=(W=z.filter(Q=>Q.overflows[0]<=0).sort((Q,X)=>Q.overflows[1]-X.overflows[1])[0])==null?void 0:W.placement;if(!B)switch(y){case"bestFit":{var he;const Q=(he=z.filter(X=>{if(P){const Ee=Pr(X.placement);return Ee===k||Ee==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Ee=>Ee>0).reduce((Ee,H)=>Ee+H,0)]).sort((X,Ee)=>X[1]-Ee[1])[0])==null?void 0:he[0];Q&&(B=Q);break}case"initialPlacement":B=c;break}if(a!==B)return{reset:{placement:B}}}return{}}}};function Dx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ix(e){return T8.some(t=>e[t]>=0)}const B8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=_i(e,t);switch(r){case"referenceHidden":{const o=await xu(t,{...a,elementContext:"reference"}),l=Dx(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Ix(l)}}}case"escaped":{const o=await xu(t,{...a,altBoundary:!0}),l=Dx(o,n.floating);return{data:{escapedOffsets:l,escaped:Ix(l)}}}default:return{}}}}},YC=new Set(["left","top"]);async function j8(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=xi(n),c=Po(n),d=Pr(n)==="y",f=YC.has(l)?-1:1,p=o&&d?-1:1,m=_i(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}}const H8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:c}=t,d=await j8(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:l}}}}},F8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:A=>{let{x:C,y:k}=A;return{x:C,y:k}}},...d}=_i(e,t),f={x:n,y:r},p=await xu(t,d),m=Pr(xi(a)),b=sb(m);let y=f[b],_=f[m];if(o){const A=b==="y"?"top":"left",C=b==="y"?"bottom":"right",k=y+p[A],N=y-p[C];y=cg(k,y,N)}if(l){const A=m==="y"?"top":"left",C=m==="y"?"bottom":"right",k=_+p[A],N=_-p[C];_=cg(k,_,N)}const T=c.fn({...t,[b]:y,[m]:_});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[b]:o,[m]:l}}}}}},U8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=_i(e,t),p={x:n,y:r},m=Pr(a),b=sb(m);let y=p[b],_=p[m];const T=_i(c,t),A=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(d){const N=b==="y"?"height":"width",L=o.reference[b]-o.floating[N]+A.mainAxis,O=o.reference[b]+o.reference[N]-A.mainAxis;y<L?y=L:y>O&&(y=O)}if(f){var C,k;const N=b==="y"?"width":"height",L=YC.has(xi(a)),O=o.reference[m]-o.floating[N]+(L&&((C=l.offset)==null?void 0:C[m])||0)+(L?0:A.crossAxis),P=o.reference[m]+o.reference[N]+(L?0:((k=l.offset)==null?void 0:k[m])||0)-(L?A.crossAxis:0);_<O?_=O:_>P&&(_=P)}return{[b]:y,[m]:_}}}},z8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:c}=t,{apply:d=()=>{},...f}=_i(e,t),p=await xu(t,f),m=xi(a),b=Po(a),y=Pr(a)==="y",{width:_,height:T}=o.floating;let A,C;m==="top"||m==="bottom"?(A=m,C=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(C=m,A=b==="end"?"top":"bottom");const k=T-p.top-p.bottom,N=_-p.left-p.right,L=fa(T-p[A],k),O=fa(_-p[C],N),P=!t.middlewareData.shift;let V=L,G=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(G=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(V=k),P&&!b){const z=$n(p.left,0),re=$n(p.right,0),W=$n(p.top,0),he=$n(p.bottom,0);y?G=_-2*(z!==0||re!==0?z+re:$n(p.left,p.right)):V=T-2*(W!==0||he!==0?W+he:$n(p.top,p.bottom))}await d({...t,availableWidth:G,availableHeight:V});const Z=await l.getDimensions(c.floating);return _!==Z.width||T!==Z.height?{reset:{rects:!0}}:{}}}};function Mf(){return typeof window<"u"}function Bo(e){return QC(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(QC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function QC(e){return Mf()?e instanceof Node||e instanceof Vn(e).Node:!1}function _r(e){return Mf()?e instanceof Element||e instanceof Vn(e).Element:!1}function Hr(e){return Mf()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function Mx(e){return!Mf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const $8=new Set(["inline","contents"]);function Mu(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!$8.has(a)}const V8=new Set(["table","td","th"]);function q8(e){return V8.has(Bo(e))}const G8=[":popover-open",":modal"];function Pf(e){return G8.some(t=>{try{return e.matches(t)}catch{return!1}})}const Y8=["transform","translate","scale","rotate","perspective"],Q8=["transform","translate","scale","rotate","perspective","filter"],W8=["paint","layout","strict","content"];function ub(e){const t=cb(),n=_r(e)?xr(e):e;return Y8.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Q8.some(r=>(n.willChange||"").includes(r))||W8.some(r=>(n.contain||"").includes(r))}function X8(e){let t=ha(e);for(;Hr(t)&&!So(t);){if(ub(t))return t;if(Pf(t))return null;t=ha(t)}return null}function cb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const K8=new Set(["html","body","#document"]);function So(e){return K8.has(Bo(e))}function xr(e){return Vn(e).getComputedStyle(e)}function Bf(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ha(e){if(Bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mx(e)&&e.host||Ur(e);return Mx(t)?t.host:t}function WC(e){const t=ha(e);return So(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Mu(t)?t:WC(t)}function Tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=WC(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Vn(a);if(o){const c=fg(l);return t.concat(l,l.visualViewport||[],Mu(a)?a:[],c&&n?Tu(c):[])}return t.concat(a,Tu(a,[],n))}function fg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XC(e){const t=xr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Hr(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,c=of(n)!==o||of(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function db(e){return _r(e)?e:e.contextElement}function yo(e){const t=db(e);if(!Hr(t))return jr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=XC(t);let l=(o?of(n.width):n.width)/r,c=(o?of(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Z8=jr(0);function KC(e){const t=Vn(e);return!cb()||!t.visualViewport?Z8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function J8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=db(e);let l=jr(1);t&&(r?_r(r)&&(l=yo(r)):l=yo(e));const c=J8(o,n,r)?KC(o):jr(0);let d=(a.left+c.x)/l.x,f=(a.top+c.y)/l.y,p=a.width/l.x,m=a.height/l.y;if(o){const b=Vn(o),y=r&&_r(r)?Vn(r):r;let _=b,T=fg(_);for(;T&&r&&y!==_;){const A=yo(T),C=T.getBoundingClientRect(),k=xr(T),N=C.left+(T.clientLeft+parseFloat(k.paddingLeft))*A.x,L=C.top+(T.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=N,f+=L,_=Vn(T),T=fg(_)}}return uf({width:p,height:m,x:d,y:f})}function jf(e,t){const n=Bf(e).scrollLeft;return t?t.left+n:es(Ur(e)).left+n}function ZC(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jf(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function eM(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Ur(r),c=t?Pf(t.floating):!1;if(r===l||c&&o)return n;let d={scrollLeft:0,scrollTop:0},f=jr(1);const p=jr(0),m=Hr(r);if((m||!m&&!o)&&((Bo(r)!=="body"||Mu(l))&&(d=Bf(r)),Hr(r))){const y=es(r);f=yo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=l&&!m&&!o?ZC(l,d):jr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function tM(e){return Array.from(e.getClientRects())}function nM(e){const t=Ur(e),n=Bf(e),r=e.ownerDocument.body,a=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+jf(e);const c=-n.scrollTop;return xr(r).direction==="rtl"&&(l+=$n(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:c}}const Px=25;function rM(e,t){const n=Vn(e),r=Ur(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,d=0;if(a){o=a.width,l=a.height;const p=cb();(!p||p&&t==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}const f=jf(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=Px&&(o-=_)}else f<=Px&&(o+=f);return{width:o,height:l,x:c,y:d}}const iM=new Set(["absolute","fixed"]);function aM(e,t){const n=es(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Hr(e)?yo(e):jr(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,d=a*o.x,f=r*o.y;return{width:l,height:c,x:d,y:f}}function Bx(e,t,n){let r;if(t==="viewport")r=rM(e,n);else if(t==="document")r=nM(Ur(e));else if(_r(t))r=aM(t,n);else{const a=KC(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return uf(r)}function JC(e,t){const n=ha(e);return n===t||!_r(n)||So(n)?!1:xr(n).position==="fixed"||JC(n,t)}function sM(e,t){const n=t.get(e);if(n)return n;let r=Tu(e,[],!1).filter(c=>_r(c)&&Bo(c)!=="body"),a=null;const o=xr(e).position==="fixed";let l=o?ha(e):e;for(;_r(l)&&!So(l);){const c=xr(l),d=ub(l);!d&&c.position==="fixed"&&(a=null),(o?!d&&!a:!d&&c.position==="static"&&!!a&&iM.has(a.position)||Mu(l)&&!d&&JC(e,l))?r=r.filter(p=>p!==l):a=c,l=ha(l)}return t.set(e,r),r}function oM(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Pf(t)?[]:sM(t,this._c):[].concat(n),r],c=l[0],d=l.reduce((f,p)=>{const m=Bx(t,p,a);return f.top=$n(m.top,f.top),f.right=fa(m.right,f.right),f.bottom=fa(m.bottom,f.bottom),f.left=$n(m.left,f.left),f},Bx(t,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function lM(e){const{width:t,height:n}=XC(e);return{width:t,height:n}}function uM(e,t,n){const r=Hr(t),a=Ur(t),o=n==="fixed",l=es(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=jr(0);function f(){d.x=jf(a)}if(r||!r&&!o)if((Bo(t)!=="body"||Mu(a))&&(c=Bf(t)),r){const y=es(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&f();o&&!r&&a&&f();const p=a&&!r&&!o?ZC(a,c):jr(0),m=l.left+c.scrollLeft-d.x-p.x,b=l.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:l.width,height:l.height}}function Wm(e){return xr(e).position==="static"}function jx(e,t){if(!Hr(e)||xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function ew(e,t){const n=Vn(e);if(Pf(e))return n;if(!Hr(e)){let a=ha(e);for(;a&&!So(a);){if(_r(a)&&!Wm(a))return a;a=ha(a)}return n}let r=jx(e,t);for(;r&&q8(r)&&Wm(r);)r=jx(r,t);return r&&So(r)&&Wm(r)&&!ub(r)?n:r||X8(e)||n}const cM=async function(e){const t=this.getOffsetParent||ew,n=this.getDimensions,r=await n(e.floating);return{reference:uM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dM(e){return xr(e).direction==="rtl"}const fM={convertOffsetParentRelativeRectToViewportRelativeRect:eM,getDocumentElement:Ur,getClippingRect:oM,getOffsetParent:ew,getElementRects:cM,getClientRects:tM,getDimensions:lM,getScale:yo,isElement:_r,isRTL:dM};function tw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hM(e,t){let n=null,r;const a=Ur(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=fd(m),T=fd(a.clientWidth-(p+b)),A=fd(a.clientHeight-(m+y)),C=fd(p),N={rootMargin:-_+"px "+-T+"px "+-A+"px "+-C+"px",threshold:$n(0,fa(1,d))||1};let L=!0;function O(P){const V=P[0].intersectionRatio;if(V!==d){if(!L)return l();V?l(!1,V):r=setTimeout(()=>{l(!1,1e-7)},1e3)}V===1&&!tw(f,e.getBoundingClientRect())&&l(),L=!1}try{n=new IntersectionObserver(O,{...N,root:a.ownerDocument})}catch{n=new IntersectionObserver(O,N)}n.observe(e)}return l(!0),o}function pM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=db(e),p=a||o?[...f?Tu(f):[],...Tu(t)]:[];p.forEach(C=>{a&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const m=f&&c?hM(f,n):null;let b=-1,y=null;l&&(y=new ResizeObserver(C=>{let[k]=C;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=y)==null||N.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,T=d?es(e):null;d&&A();function A(){const C=es(e);T&&!tw(T,C)&&n(),T=C,_=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(k=>{a&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),m?.(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const mM=H8,gM=F8,bM=P8,yM=z8,EM=B8,Hx=M8,vM=U8,_M=(e,t,n)=>{const r=new Map,a={platform:fM,...n},o={...a.platform,_c:r};return I8(e,t,{...a,platform:o})};var xM=typeof document<"u",TM=function(){},Dd=xM?w.useLayoutEffect:TM;function cf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!cf(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!cf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function nw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fx(e,t){const n=nw(e);return Math.round(t*n)/n}function Xm(e){const t=w.useRef(e);return Dd(()=>{t.current=e}),t}function SM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[p,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=w.useState(r);cf(b,r)||y(r);const[_,T]=w.useState(null),[A,C]=w.useState(null),k=w.useCallback(X=>{X!==P.current&&(P.current=X,T(X))},[]),N=w.useCallback(X=>{X!==V.current&&(V.current=X,C(X))},[]),L=o||_,O=l||A,P=w.useRef(null),V=w.useRef(null),G=w.useRef(p),Z=d!=null,z=Xm(d),re=Xm(a),W=Xm(f),he=w.useCallback(()=>{if(!P.current||!V.current)return;const X={placement:t,strategy:n,middleware:b};re.current&&(X.platform=re.current),_M(P.current,V.current,X).then(Ee=>{const H={...Ee,isPositioned:W.current!==!1};ue.current&&!cf(G.current,H)&&(G.current=H,If.flushSync(()=>{m(H)}))})},[b,t,n,re,W]);Dd(()=>{f===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,m(X=>({...X,isPositioned:!1})))},[f]);const ue=w.useRef(!1);Dd(()=>(ue.current=!0,()=>{ue.current=!1}),[]),Dd(()=>{if(L&&(P.current=L),O&&(V.current=O),L&&O){if(z.current)return z.current(L,O,he);he()}},[L,O,he,z,Z]);const se=w.useMemo(()=>({reference:P,floating:V,setReference:k,setFloating:N}),[k,N]),B=w.useMemo(()=>({reference:L,floating:O}),[L,O]),Q=w.useMemo(()=>{const X={position:n,left:0,top:0};if(!B.floating)return X;const Ee=Fx(B.floating,p.x),H=Fx(B.floating,p.y);return c?{...X,transform:"translate("+Ee+"px, "+H+"px)",...nw(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Ee,top:H}},[n,c,B.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:he,refs:se,elements:B,floatingStyles:Q}),[p,he,se,B,Q])}const CM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Hx({element:r.current,padding:a}).fn(n):{}:r?Hx({element:r,padding:a}).fn(n):{}}}},wM=(e,t)=>({...mM(e),options:[e,t]}),AM=(e,t)=>({...gM(e),options:[e,t]}),kM=(e,t)=>({...vM(e),options:[e,t]}),NM=(e,t)=>({...bM(e),options:[e,t]}),RM=(e,t)=>({...yM(e),options:[e,t]}),LM=(e,t)=>({...EM(e),options:[e,t]}),OM=(e,t)=>({...CM(e),options:[e,t]});var DM="Arrow",rw=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return x.jsx(Ti.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});rw.displayName=DM;var IM=rw;function MM(e){const[t,n]=w.useState(void 0);return da(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,c;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fb="Popper",[iw,aw]=HC(fb),[PM,sw]=iw(fb),ow=e=>{const{__scopePopper:t,children:n}=e,[r,a]=w.useState(null);return x.jsx(PM,{scope:t,anchor:r,onAnchorChange:a,children:n})};ow.displayName=fb;var lw="PopperAnchor",uw=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=sw(lw,n),l=w.useRef(null),c=ma(t,l),d=w.useRef(null);return w.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&o.onAnchorChange(d.current)}),r?null:x.jsx(Ti.div,{...a,ref:c})});uw.displayName=lw;var hb="PopperContent",[BM,jM]=iw(hb),cw=w.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:_,...T}=e,A=sw(hb,n),[C,k]=w.useState(null),N=ma(t,ve=>k(ve)),[L,O]=w.useState(null),P=MM(L),V=P?.width??0,G=P?.height??0,Z=r+(o!=="center"?"-"+o:""),z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},re=Array.isArray(f)?f:[f],W=re.length>0,he={padding:z,boundary:re.filter(FM),altBoundary:W},{refs:ue,floatingStyles:se,placement:B,isPositioned:Q,middlewareData:X}=SM({strategy:"fixed",placement:Z,whileElementsMounted:(...ve)=>pM(...ve,{animationFrame:y==="always"}),elements:{reference:A.anchor},middleware:[wM({mainAxis:a+G,alignmentAxis:l}),d&&AM({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?kM():void 0,...he}),d&&NM({...he}),RM({...he,apply:({elements:ve,rects:je,availableWidth:ze,availableHeight:yt})=>{const{width:Xt,height:fn}=je.reference,dr=ve.floating.style;dr.setProperty("--radix-popper-available-width",`${ze}px`),dr.setProperty("--radix-popper-available-height",`${yt}px`),dr.setProperty("--radix-popper-anchor-width",`${Xt}px`),dr.setProperty("--radix-popper-anchor-height",`${fn}px`)}}),L&&OM({element:L,padding:c}),UM({arrowWidth:V,arrowHeight:G}),b&&LM({strategy:"referenceHidden",...he})]}),[Ee,H]=hw(B),$=To(_);da(()=>{Q&&$?.()},[Q,$]);const ae=X.arrow?.x,D=X.arrow?.y,fe=X.arrow?.centerOffset!==0,[we,Se]=w.useState();return da(()=>{C&&Se(window.getComputedStyle(C).zIndex)},[C]),x.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:Q?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(BM,{scope:n,placedSide:Ee,onArrowChange:O,arrowX:ae,arrowY:D,shouldHideArrow:fe,children:x.jsx(Ti.div,{"data-side":Ee,"data-align":H,...T,ref:N,style:{...T.style,animation:Q?void 0:"none"}})})})});cw.displayName=hb;var dw="PopperArrow",HM={top:"bottom",right:"left",bottom:"top",left:"right"},fw=w.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=jM(dw,r),l=HM[o.placedSide];return x.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:x.jsx(IM,{...a,ref:n,style:{...a.style,display:"block"}})})});fw.displayName=dw;function FM(e){return e!==null}var UM=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,p]=hw(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(a.arrow?.x??0)+c/2,y=(a.arrow?.y??0)+d/2;let _="",T="";return f==="bottom"?(_=l?m:`${b}px`,T=`${-d}px`):f==="top"?(_=l?m:`${b}px`,T=`${r.floating.height+d}px`):f==="right"?(_=`${-d}px`,T=l?m:`${y}px`):f==="left"&&(_=`${r.floating.width+d}px`,T=l?m:`${y}px`),{data:{x:_,y:T}}}});function hw(e){const[t,n="center"]=e.split("-");return[t,n]}var zM=ow,pw=uw,$M=cw,VM=fw,qM="Portal",mw=w.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=w.useState(!1);da(()=>o(!0),[]);const l=n||a&&globalThis?.document?.body;return l?X4.createPortal(x.jsx(Ti.div,{...r,ref:t}),l):null});mw.displayName=qM;function GM(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var pb=e=>{const{present:t,children:n}=e,r=YM(t),a=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=ma(r.ref,QM(a));return typeof n=="function"||r.isPresent?w.cloneElement(a,{ref:o}):null};pb.displayName="Presence";function YM(e){const[t,n]=w.useState(),r=w.useRef(null),a=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[c,d]=GM(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const f=hd(r.current);o.current=c==="mounted"?f:"none"},[c]),da(()=>{const f=r.current,p=a.current;if(p!==e){const b=o.current,y=hd(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(p&&b!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),da(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,m=y=>{const T=hd(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&T&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},b=y=>{y.target===t&&(o.current=hd(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:w.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function hd(e){return e?.animationName||"none"}function QM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WM=$2[" useInsertionEffect ".trim().toString()]||da;function XM({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=KM({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:a;{const p=w.useRef(e!==void 0);w.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const f=w.useCallback(p=>{if(c){const m=ZM(p)?p(e):p;m!==e&&l.current?.(m)}else o(p)},[c,e,o,l]);return[d,f]}function KM({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),a=w.useRef(n),o=w.useRef(t);return WM(()=>{o.current=t},[t]),w.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function ZM(e){return typeof e=="function"}var JM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},no=new WeakMap,pd=new WeakMap,md={},Km=0,gw=function(e){return e&&(e.host||gw(e.parentNode))},eP=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=gw(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tP=function(e,t,n,r){var a=eP(t,Array.isArray(e)?e:[e]);md[n]||(md[n]=new WeakMap);var o=md[n],l=[],c=new Set,d=new Set(a),f=function(m){!m||c.has(m)||(c.add(m),f(m.parentNode))};a.forEach(f);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(b){if(c.has(b))p(b);else try{var y=b.getAttribute(r),_=y!==null&&y!=="false",T=(no.get(b)||0)+1,A=(o.get(b)||0)+1;no.set(b,T),o.set(b,A),l.push(b),T===1&&_&&pd.set(b,!0),A===1&&b.setAttribute(n,"true"),_||b.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",b,C)}})};return p(t),c.clear(),Km++,function(){l.forEach(function(m){var b=no.get(m)-1,y=o.get(m)-1;no.set(m,b),o.set(m,y),b||(pd.has(m)||m.removeAttribute(r),pd.delete(m)),y||m.removeAttribute(n)}),Km--,Km||(no=new WeakMap,no=new WeakMap,pd=new WeakMap,md={})}},nP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=JM(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),tP(r,a,n,"aria-hidden")):function(){return null}},Ir=function(){return Ir=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ir.apply(this,arguments)};function bw(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function rP(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Id="right-scroll-bar-position",Md="width-before-scroll-bar",iP="with-scroll-bars-hidden",aP="--removed-body-scroll-bar-size";function Zm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sP(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var oP=typeof window<"u"?w.useLayoutEffect:w.useEffect,Ux=new WeakMap;function lP(e,t){var n=sP(null,function(r){return e.forEach(function(a){return Zm(a,r)})});return oP(function(){var r=Ux.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(c){o.has(c)||Zm(c,null)}),o.forEach(function(c){a.has(c)||Zm(c,l)})}Ux.set(n,e)},[e]),n}function uP(e){return e}function cP(e,t){t===void 0&&(t=uP);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var d=function(){var p=l;l=[],p.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return a}function dP(e){e===void 0&&(e={});var t=cP(null);return t.options=Ir({async:!0,ssr:!1},e),t}var yw=function(e){var t=e.sideCar,n=bw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Ir({},n))};yw.isSideCarExport=!0;function fP(e,t){return e.useMedium(t),yw}var Ew=dP(),Jm=function(){},Hf=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:Jm,onWheelCapture:Jm,onTouchMoveCapture:Jm}),a=r[0],o=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,b=e.sideCar,y=e.noRelative,_=e.noIsolation,T=e.inert,A=e.allowPinchZoom,C=e.as,k=C===void 0?"div":C,N=e.gapMode,L=bw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=b,P=lP([n,t]),V=Ir(Ir({},L),a);return w.createElement(w.Fragment,null,p&&w.createElement(O,{sideCar:Ew,removeScrollBar:f,shards:m,noRelative:y,noIsolation:_,inert:T,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:N}),l?w.cloneElement(w.Children.only(c),Ir(Ir({},V),{ref:P})):w.createElement(k,Ir({},V,{className:d,ref:P}),c))});Hf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hf.classNames={fullWidth:Md,zeroRight:Id};var hP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pP(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hP();return t&&e.setAttribute("nonce",t),e}function mP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gP(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pP())&&(mP(t,n),gP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yP=function(){var e=bP();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vw=function(){var e=yP(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},EP={left:0,top:0,right:0,gap:0},e0=function(e){return parseInt(e||"",10)||0},vP=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[e0(n),e0(r),e0(a)]},_P=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return EP;var t=vP(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xP=vw(),Eo="data-scroll-locked",TP=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
1293
|
+
.`.concat(iP,` {
|
|
1294
|
+
overflow: hidden `).concat(r,`;
|
|
1295
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
1296
|
+
}
|
|
1297
|
+
body[`).concat(Eo,`] {
|
|
1298
|
+
overflow: hidden `).concat(r,`;
|
|
1299
|
+
overscroll-behavior: contain;
|
|
1300
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
1301
|
+
padding-left: `.concat(a,`px;
|
|
1302
|
+
padding-top: `).concat(o,`px;
|
|
1303
|
+
padding-right: `).concat(l,`px;
|
|
1304
|
+
margin-left:0;
|
|
1305
|
+
margin-top:0;
|
|
1306
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
1307
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.`).concat(Id,` {
|
|
1311
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.`).concat(Md,` {
|
|
1315
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.`).concat(Id," .").concat(Id,` {
|
|
1319
|
+
right: 0 `).concat(r,`;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
.`).concat(Md," .").concat(Md,` {
|
|
1323
|
+
margin-right: 0 `).concat(r,`;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
body[`).concat(Eo,`] {
|
|
1327
|
+
`).concat(aP,": ").concat(c,`px;
|
|
1328
|
+
}
|
|
1329
|
+
`)},zx=function(){var e=parseInt(document.body.getAttribute(Eo)||"0",10);return isFinite(e)?e:0},SP=function(){w.useEffect(function(){return document.body.setAttribute(Eo,(zx()+1).toString()),function(){var e=zx()-1;e<=0?document.body.removeAttribute(Eo):document.body.setAttribute(Eo,e.toString())}},[])},CP=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;SP();var o=w.useMemo(function(){return _P(a)},[a]);return w.createElement(xP,{styles:TP(o,!t,a,n?"":"!important")})},hg=!1;if(typeof window<"u")try{var gd=Object.defineProperty({},"passive",{get:function(){return hg=!0,!0}});window.addEventListener("test",gd,gd),window.removeEventListener("test",gd,gd)}catch{hg=!1}var ro=hg?{passive:!1}:!1,wP=function(e){return e.tagName==="TEXTAREA"},_w=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wP(e)&&n[t]==="visible")},AP=function(e){return _w(e,"overflowY")},kP=function(e){return _w(e,"overflowX")},$x=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=xw(e,r);if(a){var o=Tw(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},NP=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},RP=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xw=function(e,t){return e==="v"?AP(t):kP(t)},Tw=function(e,t){return e==="v"?NP(t):RP(t)},LP=function(e,t){return e==="h"&&t==="rtl"?-1:1},OP=function(e,t,n,r,a){var o=LP(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,d=t.contains(c),f=!1,p=l>0,m=0,b=0;do{if(!c)break;var y=Tw(e,c),_=y[0],T=y[1],A=y[2],C=T-A-o*_;(_||C)&&xw(e,c)&&(m+=C,b+=_);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(b)<1)&&(f=!0),f},bd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vx=function(e){return[e.deltaX,e.deltaY]},qx=function(e){return e&&"current"in e?e.current:e},DP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IP=function(e){return`
|
|
1330
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1331
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1332
|
+
`)},MP=0,io=[];function PP(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),a=w.useState(MP++)[0],o=w.useState(vw)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var T=rP([e.lockRef.current],(e.shards||[]).map(qx),!0).filter(Boolean);return T.forEach(function(A){return A.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),T.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=w.useCallback(function(T,A){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!l.current.allowPinchZoom;var C=bd(T),k=n.current,N="deltaX"in T?T.deltaX:k[0]-C[0],L="deltaY"in T?T.deltaY:k[1]-C[1],O,P=T.target,V=Math.abs(N)>Math.abs(L)?"h":"v";if("touches"in T&&V==="h"&&P.type==="range")return!1;var G=window.getSelection(),Z=G&&G.anchorNode,z=Z?Z===P||Z.contains(P):!1;if(z)return!1;var re=$x(V,P);if(!re)return!0;if(re?O=V:(O=V==="v"?"h":"v",re=$x(V,P)),!re)return!1;if(!r.current&&"changedTouches"in T&&(N||L)&&(r.current=O),!O)return!0;var W=r.current||O;return OP(W,A,T,W==="h"?N:L)},[]),d=w.useCallback(function(T){var A=T;if(!(!io.length||io[io.length-1]!==o)){var C="deltaY"in A?Vx(A):bd(A),k=t.current.filter(function(O){return O.name===A.type&&(O.target===A.target||A.target===O.shadowParent)&&DP(O.delta,C)})[0];if(k&&k.should){A.cancelable&&A.preventDefault();return}if(!k){var N=(l.current.shards||[]).map(qx).filter(Boolean).filter(function(O){return O.contains(A.target)}),L=N.length>0?c(A,N[0]):!l.current.noIsolation;L&&A.cancelable&&A.preventDefault()}}},[]),f=w.useCallback(function(T,A,C,k){var N={name:T,delta:A,target:C,should:k,shadowParent:BP(C)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(L){return L!==N})},1)},[]),p=w.useCallback(function(T){n.current=bd(T),r.current=void 0},[]),m=w.useCallback(function(T){f(T.type,Vx(T),T.target,c(T,e.lockRef.current))},[]),b=w.useCallback(function(T){f(T.type,bd(T),T.target,c(T,e.lockRef.current))},[]);w.useEffect(function(){return io.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:b}),document.addEventListener("wheel",d,ro),document.addEventListener("touchmove",d,ro),document.addEventListener("touchstart",p,ro),function(){io=io.filter(function(T){return T!==o}),document.removeEventListener("wheel",d,ro),document.removeEventListener("touchmove",d,ro),document.removeEventListener("touchstart",p,ro)}},[]);var y=e.removeScrollBar,_=e.inert;return w.createElement(w.Fragment,null,_?w.createElement(o,{styles:IP(a)}):null,y?w.createElement(CP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function BP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jP=fP(Ew,PP);var Sw=w.forwardRef(function(e,t){return w.createElement(Hf,Ir({},e,{ref:t,sideCar:jP}))});Sw.classNames=Hf.classNames;var Ff="Popover",[Cw]=HC(Ff,[aw]),Pu=aw(),[HP,ga]=Cw(Ff),ww=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!1}=e,c=Pu(t),d=w.useRef(null),[f,p]=w.useState(!1),[m,b]=XM({prop:r,defaultProp:a??!1,onChange:o,caller:Ff});return x.jsx(zM,{...c,children:x.jsx(HP,{scope:t,contentId:x8(),triggerRef:d,open:m,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(y=>!y),[b]),hasCustomAnchor:f,onCustomAnchorAdd:w.useCallback(()=>p(!0),[]),onCustomAnchorRemove:w.useCallback(()=>p(!1),[]),modal:l,children:n})})};ww.displayName=Ff;var Aw="PopoverAnchor",FP=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ga(Aw,n),o=Pu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return w.useEffect(()=>(l(),()=>c()),[l,c]),x.jsx(pw,{...o,...r,ref:t})});FP.displayName=Aw;var kw="PopoverTrigger",Nw=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ga(kw,n),o=Pu(n),l=ma(t,a.triggerRef),c=x.jsx(Ti.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Iw(a.open),...r,ref:l,onClick:ua(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:x.jsx(pw,{asChild:!0,...o,children:c})});Nw.displayName=kw;var mb="PopoverPortal",[UP,zP]=Cw(mb,{forceMount:void 0}),Rw=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,o=ga(mb,t);return x.jsx(UP,{scope:t,forceMount:n,children:x.jsx(pb,{present:n||o.open,children:x.jsx(mw,{asChild:!0,container:a,children:r})})})};Rw.displayName=mb;var Co="PopoverContent",Lw=w.forwardRef((e,t)=>{const n=zP(Co,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=ga(Co,e.__scopePopover);return x.jsx(pb,{present:r||o.open,children:o.modal?x.jsx(VP,{...a,ref:t}):x.jsx(qP,{...a,ref:t})})});Lw.displayName=Co;var $P=FC("PopoverContent.RemoveScroll"),VP=w.forwardRef((e,t)=>{const n=ga(Co,e.__scopePopover),r=w.useRef(null),a=ma(t,r),o=w.useRef(!1);return w.useEffect(()=>{const l=r.current;if(l)return nP(l)},[]),x.jsx(Sw,{as:$P,allowPinchZoom:!0,children:x.jsx(Ow,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ua(e.onCloseAutoFocus,l=>{l.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ua(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;o.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:ua(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),qP=w.forwardRef((e,t)=>{const n=ga(Co,e.__scopePopover),r=w.useRef(!1),a=w.useRef(!1);return x.jsx(Ow,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Ow=w.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,...m}=e,b=ga(Co,n),y=Pu(n);return f8(),x.jsx(VC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:x.jsx(zC,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>b.onOpenChange(!1),children:x.jsx($M,{"data-state":Iw(b.open),role:"dialog",id:b.contentId,...y,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Dw="PopoverClose",GP=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ga(Dw,n);return x.jsx(Ti.button,{type:"button",...r,ref:t,onClick:ua(e.onClick,()=>a.onOpenChange(!1))})});GP.displayName=Dw;var YP="PopoverArrow",QP=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Pu(n);return x.jsx(VM,{...a,...r,ref:t})});QP.displayName=YP;function Iw(e){return e?"open":"closed"}var WP=ww,XP=Nw,KP=Rw,ZP=Lw;function gb({...e}){return x.jsx(WP,{"data-slot":"popover",...e})}function bb({...e}){return x.jsx(XP,{"data-slot":"popover-trigger","data-testid":"popover-trigger",...e})}function yb({className:e,align:t="center",sideOffset:n=4,...r}){return x.jsx(KP,{children:x.jsx(ZP,{"data-slot":"popover-content","data-testid":"popover-content",align:t,sideOffset:n,className:V4("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md p-4 shadow-md outline-hidden border border-base-300",e),...r})})}const JP=w.memo(({projectPath:e,hasGit:t,onClose:n})=>{const r=Fg(),[a,o]=w.useState(""),l=Tf({queryKey:["branches",e,a],queryFn:async({pageParam:O})=>{const P=new URLSearchParams({project:e});return O&&P.set("cursor",O),a.trim()&&P.set("filter",a.trim()),nt(`/api/projects/branches?${P.toString()}`)},initialPageParam:null,getNextPageParam:O=>{if(!(!O||!O.hasMore))return O.nextCursor??void 0},enabled:!!(e&&t)}),c=l.data?.pages[0]?.current||"",d=l.data?.pages[0]?.defaultBranch||"main",f=w.useMemo(()=>l.data?l.data.pages.flatMap(O=>O.branches):[],[l.data]),p=f.find(O=>O.name===d),m=f.filter(O=>O.name!==d),b=l.hasNextPage,y=l.isLoading,_=l.isFetchingNextPage,T=zd({mutationFn:O=>nt(`/api/projects/branches/checkout?project=${encodeURIComponent(O.projectPath)}`,{method:"POST",body:JSON.stringify({name:O.name})}),onSuccess:(O,P)=>{r.invalidateQueries({queryKey:["branches",P.projectPath]}),r.invalidateQueries({queryKey:["branches-info",P.projectPath]}),e&&r.invalidateQueries({queryKey:["git-diff",e]})}}),A=zd({mutationFn:O=>nt(`/api/projects/branches?project=${encodeURIComponent(O.projectPath)}`,{method:"POST",body:JSON.stringify({name:O.name})}),onSuccess:(O,P)=>{r.invalidateQueries({queryKey:["branches",P.projectPath]}),r.invalidateQueries({queryKey:["branches-info",P.projectPath]}),e&&r.invalidateQueries({queryKey:["git-diff",e]})}}),C=w.useCallback(O=>{!e||O===c||(T.mutate({projectPath:e,name:O}),n())},[e,c,T,n]),k=w.useCallback(()=>{if(!e)return;const O=window.prompt("New branch name");if(!O)return;const P=O.trim();P&&(A.mutate({projectPath:e,name:P}),n())},[e,A,n]),N=w.useCallback(()=>{b&&!_&&l.fetchNextPage()},[b,_,l]),L=O=>x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center justify-between",onClick:()=>C(O.name),"data-testid":"branch-dropdown-branch","data-branch":O.name,children:[x.jsx("span",{className:"truncate",children:O.name}),x.jsxs("span",{className:"flex items-center gap-2 text-xs text-base-content/60",children:[O.name===c?x.jsx("span",{className:"badge badge-outline badge-sm",children:"Current"}):null,Du(O.updatedAt)]})]})},O.name);return x.jsxs("div",{className:"mt-3",children:[x.jsxs("div",{className:"flex items-center gap-2","data-testid":"branch-dropdown-filter-row",children:[x.jsx("input",{className:"input input-bordered input-sm w-full",placeholder:"Filter branches",value:a,onChange:O=>o(O.target.value),"data-testid":"branch-dropdown-filter"}),x.jsx("button",{type:"button",className:"btn btn-outline btn-sm whitespace-nowrap",disabled:!e||A.isPending,onClick:k,"data-testid":"branch-dropdown-new-branch",children:"New Branch"})]}),x.jsxs("div",{className:"mt-3 space-y-4 max-h-[50vh] overflow-auto","data-testid":"branch-dropdown-branches",children:[p?x.jsxs("div",{children:[x.jsx("div",{className:"text-xs font-semibold uppercase text-base-content/60",children:"Default Branch"}),x.jsx("ul",{className:"menu mt-2 w-full rounded-box bg-base-200/40 p-1","data-testid":"branch-dropdown-default-branch",children:L(p)})]}):null,x.jsxs("div",{children:[x.jsx("div",{className:"text-xs font-semibold uppercase text-base-content/60",children:"Other Branches"}),x.jsx("ul",{className:"menu w-full mt-2 rounded-box bg-base-200/40 p-1","data-testid":"branch-dropdown-other-branches",children:y?x.jsx("li",{className:"disabled",children:x.jsx("span",{children:"Loading branches..."})}):m.length?m.map(L):x.jsx("li",{className:"disabled",children:x.jsx("span",{children:"No branches"})})})]}),b&&x.jsx("button",{type:"button",className:"btn btn-ghost btn-sm w-full",onClick:N,disabled:_,"data-testid":"branch-dropdown-load-more",children:_?"Loading...":"Load More"})]})]})}),Uf=(function(e){if(e==null)return r9;if(typeof e=="function")return zf(e);if(typeof e=="object")return Array.isArray(e)?e9(e):t9(e);if(typeof e=="string")return n9(e);throw new Error("Expected function, string, or object as test")});function e9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uf(e[n]);return zf(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function t9(e){const t=e;return zf(n);function n(r){const a=r;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function n9(e){return zf(t);function t(n){return n&&n.type===e}}function zf(e){return t;function t(n,r,a){return!!(i9(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function r9(){return!0}function i9(e){return e!==null&&typeof e=="object"&&"type"in e}const Mw=[],Xl=!0,pg=!1,mg="skip";function Pw(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const o=Uf(a),l=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=Mw,_,T,A;if((!t||o(d,f,p[p.length-1]||void 0))&&(y=a9(n(d,p)),y[0]===pg))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==mg)for(T=(r?C.children.length:-1)+l,A=p.concat(C);T>-1&&T<C.children.length;){const k=C.children[T];if(_=c(k,T,A)(),_[0]===pg)return _;T=typeof _[1]=="number"?_[1]:T+l}}return y}}}function a9(e){return Array.isArray(e)?e:typeof e=="number"?[Xl,e]:e==null?Mw:[e]}function wo(e,t,n,r){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=r),Pw(e,o,c,a);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}function s9({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:a=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500"}){const c=t.length&&!t.every(f=>f==="*"),d=n.length&&!n.every(f=>f==="*");if(!e&&(c||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const p=c9(e,t,n,r,a,o,l);wo(f,p)}}function Gx(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function o9(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const l9=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),u9=new Set(["javascript:","data:","file:","vbscript:"]);function Yx(e,t,n,r=!1,a=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const l=Gx(e,n);if(!l||u9.has(l.protocol)||!(l9.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const d=o9(e);return l&&t.some(f=>{const p=Gx(f,n);return!p||p.origin!==l.origin?!1:l.href.startsWith(p.href)})?d?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:d?l.pathname+l.search+l.hash:l.href:null}const t0=Symbol("node-seen"),c9=(e,t,n,r,a,o,l)=>{const c=(d,f,p)=>{if(d.type!=="element"||d[t0])return Xl;if(d.tagName==="a"){const m=Yx(d.properties.href,t,e,!1,!1,a);return m===null?(d[t0]=!0,wo(d,c),p&&typeof f=="number"&&(p.children[f]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(d.properties.href),class:l},children:[...d.children,{type:"text",value:" [blocked]"}]}),mg):(d.properties.href=m,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Xl)}if(d.tagName==="img"){const m=Yx(d.properties.src,n,e,r,!0,a);return m===null?(d[t0]=!0,wo(d,c),p&&typeof f=="number"&&(p.children[f]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(d.properties.alt||"No description")+"]"}]}),mg):(d.properties.src=m,Xl)}return Xl};return c},Bw=-1,$f=0,ru=1,df=2,Eb=3,vb=4,_b=5,xb=6,jw=7,Hw=8,Qx=typeof self=="object"?self:globalThis,d9=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),r=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case $f:case Bw:return n(l,a);case ru:{const c=n([],a);for(const d of l)c.push(r(d));return c}case df:{const c=n({},a);for(const[d,f]of l)c[r(d)]=r(f);return c}case Eb:return n(new Date(l),a);case vb:{const{source:c,flags:d}=l;return n(new RegExp(c,d),a)}case _b:{const c=n(new Map,a);for(const[d,f]of l)c.set(r(d),r(f));return c}case xb:{const c=n(new Set,a);for(const d of l)c.add(r(d));return c}case jw:{const{name:c,message:d}=l;return n(new Qx[c](d),a)}case Hw:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new Qx[o](l),a)};return r},Wx=e=>d9(new Map,e)(0),ao="",{toString:f9}={},{keys:h9}=Object,Hl=e=>{const t=typeof e;if(t!=="object"||!e)return[$f,t];const n=f9.call(e).slice(8,-1);switch(n){case"Array":return[ru,ao];case"Object":return[df,ao];case"Date":return[Eb,ao];case"RegExp":return[vb,ao];case"Map":return[_b,ao];case"Set":return[xb,ao];case"DataView":return[ru,n]}return n.includes("Array")?[ru,n]:n.includes("Error")?[jw,n]:[df,n]},yd=([e,t])=>e===$f&&(t==="function"||t==="symbol"),p9=(e,t,n,r)=>{const a=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},o=l=>{if(n.has(l))return n.get(l);let[c,d]=Hl(l);switch(c){case $f:{let p=l;switch(d){case"bigint":c=Hw,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return a([Bw],l)}return a([c,p],l)}case ru:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),a([d,[...b]],l)}const p=[],m=a([c,p],l);for(const b of l)p.push(o(b));return m}case df:{if(d)switch(d){case"BigInt":return a([d,l.toString()],l);case"Boolean":case"Number":case"String":return a([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=a([c,p],l);for(const b of h9(l))(e||!yd(Hl(l[b])))&&p.push([o(b),o(l[b])]);return m}case Eb:return a([c,l.toISOString()],l);case vb:{const{source:p,flags:m}=l;return a([c,{source:p,flags:m}],l)}case _b:{const p=[],m=a([c,p],l);for(const[b,y]of l)(e||!(yd(Hl(b))||yd(Hl(y))))&&p.push([o(b),o(y)]);return m}case xb:{const p=[],m=a([c,p],l);for(const b of l)(e||!yd(Hl(b)))&&p.push(o(b));return m}}const{message:f}=l;return a([c,{name:d,message:f}],l)};return o},Xx=(e,{json:t,lossy:n}={})=>{const r=[];return p9(!(t||n),!!t,new Map,r)(e),r},ts=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Wx(Xx(e,t)):structuredClone(e):(e,t)=>Wx(Xx(e,t));const Kx=/[#.]/g;function m9(e,t){const n=e||"",r={};let a=0,o,l;for(;a<n.length;){Kx.lastIndex=a;const c=Kx.exec(n),d=n.slice(a,c?c.index:n.length);d&&(o?o==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,a+=d.length),c&&(o=c[0],a++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function Fw(e,t,n){const r=n?E9(n):void 0;function a(o,l,...c){let d;if(o==null){d={type:"root",children:[]};const f=l;c.unshift(f)}else{d=m9(o,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,g9(l))c.unshift(l);else for(const[m,b]of Object.entries(l))b9(e,d.properties,m,b)}for(const f of c)gg(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return a}function g9(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function b9(e,t,n,r){const a=Lu(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?a.spaceSeparated?o=L_(r):a.commaSeparated?o=R_(r):a.commaOrSpaceSeparated?o=L_(R_(r).join(" ")):o=Zx(a,a.property,r):Array.isArray(r)?o=[...r]:o=a.property==="style"?y9(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(Zx(a,a.property,c));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function gg(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)gg(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?gg(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Zx(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||yu(n)===yu(t)))return!0}return n}function y9(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function E9(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const v9=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],_9=Fw(Oo,"div"),x9=Fw(Fr,"g",v9);function T9(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const d=Jx(t,n[l-1]);c=d===-1?t.length+1:d+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function a(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],d=Jx(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function Jx(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
1333
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const qa={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Uw={}.hasOwnProperty,S9=Object.prototype;function C9(e,t){const n=t||{};return Tb({file:n.file||void 0,location:!1,schema:n.space==="svg"?Fr:Oo,verbose:n.verbose||!1},e)}function Tb(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pd(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:zw(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=T9(o),c=l.toPoint(0),d=l.toPoint(o.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pd(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pd(e,r,n),n}default:return n=w9(e,t),n}}function zw(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Tb(e,t[n]);r.push(a)}return r}function w9(e,t){const n=e.schema;e.schema=t.namespaceURI===qa.svg?Fr:Oo;let r=-1;const a={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;Uw.call(S9,d)||(a[d]=c.value)}const l=(e.schema.space==="svg"?x9:_9)(t.tagName,a,zw(e,t.childNodes));if(Pd(e,t,l),l.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&mo(d.startTag),p=d&&d.endTag&&mo(d.endTag),m=Tb(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),l.content=m}return e.schema=n,l}function Pd(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=A9(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function A9(e,t,n){const r=mo(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)Uw.call(n.attrs,l)&&(o[Lu(e.schema,l).property]=mo(n.attrs[l]));n.startTag;const c=mo(n.startTag),d=n.endTag?mo(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=o,t.data={position:f}}}return r}function mo(e){const t=eT({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=eT({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function eT(e){return e.line&&e.column?e:void 0}const k9={},N9={}.hasOwnProperty,$w=Vg("type",{handlers:{root:L9,element:P9,text:I9,comment:M9,doctype:D9}});function R9(e,t){const r=(t||k9).space;return $w(e,r==="svg"?Fr:Oo)}function L9(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Sb(e.children,n,t),jo(e,n),n}function O9(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Sb(e.children,n,t),jo(e,n),n}function D9(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return jo(e,t),t}function I9(e){const t={nodeName:"#text",value:e.value,parentNode:null};return jo(e,t),t}function M9(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return jo(e,t),t}function P9(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Fr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&N9.call(e.properties,o)){const d=B9(r,o,e.properties[o]);d&&a.push(d)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:qa[l],childNodes:[],parentNode:null};return c.childNodes=Sb(e.children,c,r),jo(e,c),e.tagName==="template"&&e.content&&(c.content=O9(e.content,r)),c}function B9(e,t,n){const r=Lu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?qg(n):Gg(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=r.attribute.slice(0,o)),a.namespace=qa[r.space]}return a}function Sb(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=$w(e[r],n);o.parentNode=t,a.push(o)}return a}function jo(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const j9=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),gt="�";var I;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(I||(I={}));const kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Vw(e){return e>=55296&&e<=57343}function H9(e){return e>=56320&&e<=57343}function F9(e,t){return(e-55296)*1024+9216+t}function qw(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Gw(e){return e>=64976&&e<=65007||j9.has(e)}var ie;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ie||(ie={}));const U9=65536;class z9{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=U9,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:o}=this,l=a+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(H9(n))return this.pos++,this._addGap(),F9(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ie.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Vw(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){qw(t)?this._err(ie.controlCharacterInInputStream):Gw(t)&&this._err(ie.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ue;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ue||(Ue={}));function Yw(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const $9=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),V9=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function q9(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=V9.get(e))!==null&&t!==void 0?t:e}var Qt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Qt||(Qt={}));const G9=32;var aa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(aa||(aa={}));function bg(e){return e>=Qt.ZERO&&e<=Qt.NINE}function Y9(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_F||e>=Qt.LOWER_A&&e<=Qt.LOWER_F}function Q9(e){return e>=Qt.UPPER_A&&e<=Qt.UPPER_Z||e>=Qt.LOWER_A&&e<=Qt.LOWER_Z||bg(e)}function W9(e){return e===Qt.EQUALS||Q9(e)}var qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(qt||(qt={}));var mi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(mi||(mi={}));class X9{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=mi.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Qt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|G9)===Qt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const o=r-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(bg(a)||Y9(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(bg(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Qt.SEMI)this.consumed+=1;else if(this.decodeMode===mi.Strict)return 0;return this.emitCodePoint(q9(this.result),this.consumed),this.errors&&(t!==Qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],o=(a&aa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=K9(r,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===mi.Attribute&&(o===0||W9(l))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],o=(a&aa.VALUE_LENGTH)>>14,o!==0){if(l===Qt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==mi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&aa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~aa.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==mi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function K9(e,t,n,r){const a=(t&aa.BRANCH_LENGTH)>>7,o=t&aa.JUMP_TABLE;if(a===0)return o!==0&&r===o?n:-1;if(o){const d=r-o;return d<0||d>=a?-1:e[n+d]-1}let l=n,c=l+a-1;for(;l<=c;){const d=l+c>>>1,f=e[d];if(f<r)l=d+1;else if(f>r)c=d-1;else return e[d+a]}return-1}var pe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(pe||(pe={}));var Ya;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ya||(Ya={}));var ar;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ar||(ar={}));var K;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(K||(K={}));var v;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(v||(v={}));const Z9=new Map([[K.A,v.A],[K.ADDRESS,v.ADDRESS],[K.ANNOTATION_XML,v.ANNOTATION_XML],[K.APPLET,v.APPLET],[K.AREA,v.AREA],[K.ARTICLE,v.ARTICLE],[K.ASIDE,v.ASIDE],[K.B,v.B],[K.BASE,v.BASE],[K.BASEFONT,v.BASEFONT],[K.BGSOUND,v.BGSOUND],[K.BIG,v.BIG],[K.BLOCKQUOTE,v.BLOCKQUOTE],[K.BODY,v.BODY],[K.BR,v.BR],[K.BUTTON,v.BUTTON],[K.CAPTION,v.CAPTION],[K.CENTER,v.CENTER],[K.CODE,v.CODE],[K.COL,v.COL],[K.COLGROUP,v.COLGROUP],[K.DD,v.DD],[K.DESC,v.DESC],[K.DETAILS,v.DETAILS],[K.DIALOG,v.DIALOG],[K.DIR,v.DIR],[K.DIV,v.DIV],[K.DL,v.DL],[K.DT,v.DT],[K.EM,v.EM],[K.EMBED,v.EMBED],[K.FIELDSET,v.FIELDSET],[K.FIGCAPTION,v.FIGCAPTION],[K.FIGURE,v.FIGURE],[K.FONT,v.FONT],[K.FOOTER,v.FOOTER],[K.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[K.FORM,v.FORM],[K.FRAME,v.FRAME],[K.FRAMESET,v.FRAMESET],[K.H1,v.H1],[K.H2,v.H2],[K.H3,v.H3],[K.H4,v.H4],[K.H5,v.H5],[K.H6,v.H6],[K.HEAD,v.HEAD],[K.HEADER,v.HEADER],[K.HGROUP,v.HGROUP],[K.HR,v.HR],[K.HTML,v.HTML],[K.I,v.I],[K.IMG,v.IMG],[K.IMAGE,v.IMAGE],[K.INPUT,v.INPUT],[K.IFRAME,v.IFRAME],[K.KEYGEN,v.KEYGEN],[K.LABEL,v.LABEL],[K.LI,v.LI],[K.LINK,v.LINK],[K.LISTING,v.LISTING],[K.MAIN,v.MAIN],[K.MALIGNMARK,v.MALIGNMARK],[K.MARQUEE,v.MARQUEE],[K.MATH,v.MATH],[K.MENU,v.MENU],[K.META,v.META],[K.MGLYPH,v.MGLYPH],[K.MI,v.MI],[K.MO,v.MO],[K.MN,v.MN],[K.MS,v.MS],[K.MTEXT,v.MTEXT],[K.NAV,v.NAV],[K.NOBR,v.NOBR],[K.NOFRAMES,v.NOFRAMES],[K.NOEMBED,v.NOEMBED],[K.NOSCRIPT,v.NOSCRIPT],[K.OBJECT,v.OBJECT],[K.OL,v.OL],[K.OPTGROUP,v.OPTGROUP],[K.OPTION,v.OPTION],[K.P,v.P],[K.PARAM,v.PARAM],[K.PLAINTEXT,v.PLAINTEXT],[K.PRE,v.PRE],[K.RB,v.RB],[K.RP,v.RP],[K.RT,v.RT],[K.RTC,v.RTC],[K.RUBY,v.RUBY],[K.S,v.S],[K.SCRIPT,v.SCRIPT],[K.SEARCH,v.SEARCH],[K.SECTION,v.SECTION],[K.SELECT,v.SELECT],[K.SOURCE,v.SOURCE],[K.SMALL,v.SMALL],[K.SPAN,v.SPAN],[K.STRIKE,v.STRIKE],[K.STRONG,v.STRONG],[K.STYLE,v.STYLE],[K.SUB,v.SUB],[K.SUMMARY,v.SUMMARY],[K.SUP,v.SUP],[K.TABLE,v.TABLE],[K.TBODY,v.TBODY],[K.TEMPLATE,v.TEMPLATE],[K.TEXTAREA,v.TEXTAREA],[K.TFOOT,v.TFOOT],[K.TD,v.TD],[K.TH,v.TH],[K.THEAD,v.THEAD],[K.TITLE,v.TITLE],[K.TR,v.TR],[K.TRACK,v.TRACK],[K.TT,v.TT],[K.U,v.U],[K.UL,v.UL],[K.SVG,v.SVG],[K.VAR,v.VAR],[K.WBR,v.WBR],[K.XMP,v.XMP]]);function Ho(e){var t;return(t=Z9.get(e))!==null&&t!==void 0?t:v.UNKNOWN}const ge=v,J9={[pe.HTML]:new Set([ge.ADDRESS,ge.APPLET,ge.AREA,ge.ARTICLE,ge.ASIDE,ge.BASE,ge.BASEFONT,ge.BGSOUND,ge.BLOCKQUOTE,ge.BODY,ge.BR,ge.BUTTON,ge.CAPTION,ge.CENTER,ge.COL,ge.COLGROUP,ge.DD,ge.DETAILS,ge.DIR,ge.DIV,ge.DL,ge.DT,ge.EMBED,ge.FIELDSET,ge.FIGCAPTION,ge.FIGURE,ge.FOOTER,ge.FORM,ge.FRAME,ge.FRAMESET,ge.H1,ge.H2,ge.H3,ge.H4,ge.H5,ge.H6,ge.HEAD,ge.HEADER,ge.HGROUP,ge.HR,ge.HTML,ge.IFRAME,ge.IMG,ge.INPUT,ge.LI,ge.LINK,ge.LISTING,ge.MAIN,ge.MARQUEE,ge.MENU,ge.META,ge.NAV,ge.NOEMBED,ge.NOFRAMES,ge.NOSCRIPT,ge.OBJECT,ge.OL,ge.P,ge.PARAM,ge.PLAINTEXT,ge.PRE,ge.SCRIPT,ge.SECTION,ge.SELECT,ge.SOURCE,ge.STYLE,ge.SUMMARY,ge.TABLE,ge.TBODY,ge.TD,ge.TEMPLATE,ge.TEXTAREA,ge.TFOOT,ge.TH,ge.THEAD,ge.TITLE,ge.TR,ge.TRACK,ge.UL,ge.WBR,ge.XMP]),[pe.MATHML]:new Set([ge.MI,ge.MO,ge.MN,ge.MS,ge.MTEXT,ge.ANNOTATION_XML]),[pe.SVG]:new Set([ge.TITLE,ge.FOREIGN_OBJECT,ge.DESC]),[pe.XLINK]:new Set,[pe.XML]:new Set,[pe.XMLNS]:new Set},yg=new Set([ge.H1,ge.H2,ge.H3,ge.H4,ge.H5,ge.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT;var j;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(j||(j={}));const Nt={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function e7(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Kl(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function t7(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function na(e){return t7(e)||Kl(e)}function tT(e){return na(e)||e7(e)}function Ed(e){return e+32}function Qw(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function nT(e){return Qw(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function n7(e){return e===I.NULL?ie.nullCharacterReference:e>1114111?ie.characterReferenceOutsideUnicodeRange:Vw(e)?ie.surrogateCharacterReference:Gw(e)?ie.noncharacterCharacterReference:qw(e)||e===I.CARRIAGE_RETURN?ie.controlCharacterReference:null}class r7{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new z9(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new X9($9,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ie.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ie.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=n7(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ue.START_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ue.END_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ue.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ue.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Yw(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ie.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ho(t.tagName),t.type===Ue.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ie.endTagWithAttributes),t.selfClosing&&this._err(ie.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ue.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ue.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ue.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ue.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Qw(t)?Ue.WHITESPACE_CHARACTER:t===I.NULL?Ue.NULL_CHARACTER:Ue.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ue.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?mi.Attribute:mi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(na(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ie.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(na(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ie.missingEndTagName),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.tagName+=gt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Kl(t)?Ed(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){na(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){na(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){na(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:na(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){na(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&nT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(gt);break}case I.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&nT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ie.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ie.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.name+=gt;break}default:this.currentAttr.name+=String.fromCodePoint(Kl(t)?Ed(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=gt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=gt;break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=gt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ie.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=gt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(kn.DASH_DASH,!0)?(this._createCommentToken(kn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(kn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(kn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(ie.cdataInHtmlContent),this._createCommentToken(kn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ie.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=gt;break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ie.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ie.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Kl(t))this._createDoctypeToken(String.fromCharCode(Ed(t))),this.state=j.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(ie.unexpectedNullCharacter),this._createDoctypeToken(gt),this.state=j.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.name+=gt;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Kl(t)?Ed(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(kn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(kn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ie.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=gt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=gt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=gt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=gt;break}case I.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.NULL:{this._err(ie.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ie.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&tT(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){tT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ie.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ww=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),rT=new Set([...Ww,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),ff=new Set([v.APPLET,v.CAPTION,v.HTML,v.MARQUEE,v.OBJECT,v.TABLE,v.TD,v.TEMPLATE,v.TH]),i7=new Set([...ff,v.OL,v.UL]),a7=new Set([...ff,v.BUTTON]),iT=new Set([v.ANNOTATION_XML,v.MI,v.MN,v.MO,v.MS,v.MTEXT]),aT=new Set([v.DESC,v.FOREIGN_OBJECT,v.TITLE]),s7=new Set([v.TR,v.TEMPLATE,v.HTML]),o7=new Set([v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML]),l7=new Set([v.TABLE,v.TEMPLATE,v.HTML]),u7=new Set([v.TD,v.TH]);class c7{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=v.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===v.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===pe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==pe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(yg,pe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(u7,pe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(l7,pe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(o7,pe.HTML)}clearBackToTableRowContext(){this.clearBackTo(s7,pe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===v.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===v.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case pe.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case pe.SVG:{if(aT.has(a))return!1;break}case pe.MATHML:{if(iT.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ff)}hasInListItemScope(t){return this.hasInDynamicScope(t,i7)}hasInButtonScope(t){return this.hasInDynamicScope(t,a7)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case pe.HTML:{if(yg.has(n))return!0;if(ff.has(n))return!1;break}case pe.SVG:{if(aT.has(n))return!1;break}case pe.MATHML:{if(iT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case v.TABLE:case v.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===pe.HTML)switch(this.tagIDs[t]){case v.TBODY:case v.THEAD:case v.TFOOT:return!0;case v.TABLE:case v.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case v.OPTION:case v.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ww.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&rT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&rT.has(this.currentTagId);)this.pop()}}const n0=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const sT={type:Dr.Marker};class d7{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===o&&this.treeAdapter.getNamespaceURI(f)===l){const p=this.treeAdapter.getAttrList(f);p.length===a&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<n0)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<n0)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(d=>a.get(d.name)===d.value)&&(o+=1,o>=n0&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(sT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(sT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const ra={createDocument(){return{nodeName:"#document",mode:ar.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ra.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ra.isTextNode(n)){n.value+=t;return}}ra.appendChild(e,ra.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ra.isTextNode(r)?r.value+=t:ra.insertBefore(e,ra.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xw="html",f7="about:legacy-compat",h7="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Kw=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],p7=[...Kw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],m7=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Zw=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],g7=[...Zw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oT(e,t){return t.some(n=>e.startsWith(n))}function b7(e){return e.name===Xw&&e.publicId===null&&(e.systemId===null||e.systemId===f7)}function y7(e){if(e.name!==Xw)return ar.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===h7)return ar.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),m7.has(n))return ar.QUIRKS;let r=t===null?p7:Kw;if(oT(n,r))return ar.QUIRKS;if(r=t===null?Zw:g7,oT(n,r))return ar.LIMITED_QUIRKS}return ar.NO_QUIRKS}const lT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},E7="definitionurl",v7="definitionURL",_7=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),x7=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:pe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:pe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:pe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:pe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:pe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:pe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:pe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:pe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:pe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:pe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:pe.XMLNS}]]),T7=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),S7=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function C7(e){const t=e.tagID;return t===v.FONT&&e.attrs.some(({name:r})=>r===Ya.COLOR||r===Ya.SIZE||r===Ya.FACE)||S7.has(t)}function Jw(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===E7){e.attrs[t].name=v7;break}}function eA(e){for(let t=0;t<e.attrs.length;t++){const n=_7.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Cb(e){for(let t=0;t<e.attrs.length;t++){const n=x7.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function w7(e){const t=T7.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ho(e.tagName))}function A7(e,t){return t===pe.MATHML&&(e===v.MI||e===v.MO||e===v.MN||e===v.MS||e===v.MTEXT)}function k7(e,t,n){if(t===pe.MATHML&&e===v.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ya.ENCODING){const a=n[r].value.toLowerCase();return a===lT.TEXT_HTML||a===lT.APPLICATION_XML}}return t===pe.SVG&&(e===v.FOREIGN_OBJECT||e===v.DESC||e===v.TITLE)}function N7(e,t,n,r){return(!r||r===pe.HTML)&&k7(e,t,n)||(!r||r===pe.MATHML)&&A7(e,t)}const R7="hidden",L7=8,O7=3;var F;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(F||(F={}));const D7={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},tA=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),uT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ra,onParseError:null};class cT{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...uT,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new r7(this.options,this),this.activeFormattingElements=new d7(this.treeAdapter),this.fragmentContextID=r?Ho(this.treeAdapter.getTagName(r)):v.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new c7(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...uT,...n};t??(t=r.treeAdapter.createElement(K.TEMPLATE,pe.HTML,[]));const a=r.treeAdapter.createElement("documentmock",pe.HTML,[]),o=new this(r,a,t);return o.fragmentContextID===v.TEMPLATE&&o.tmplInsertionModeStack.unshift(F.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:D7,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===pe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,pe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=Nt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==pe.HTML))switch(this.fragmentContextID){case v.TITLE:case v.TEXTAREA:{this.tokenizer.state=Nt.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=Nt.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=Nt.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=Nt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,pe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,pe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(K.HTML,pe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,v.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),o=r?a.lastIndexOf(r):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Ue.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===v.SVG&&this.treeAdapter.getTagName(n)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===pe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===v.MGLYPH||t.tagID===v.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,pe.HTML)}_processToken(t){switch(t.type){case Ue.CHARACTER:{this.onCharacter(t);break}case Ue.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ue.COMMENT:{this.onComment(t);break}case Ue.DOCTYPE:{this.onDoctype(t);break}case Ue.START_TAG:{this._processStartTag(t);break}case Ue.END_TAG:{this.onEndTag(t);break}case Ue.EOF:{this.onEof(t);break}case Ue.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return N7(t,a,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Dr.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case v.TR:{this.insertionMode=F.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=F.IN_TABLE;return}case v.BODY:{this.insertionMode=F.IN_BODY;return}case v.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(t);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case v.TD:case v.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case v.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===v.TEMPLATE)break;if(r===v.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return tA.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===pe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case v.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return J9[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uj(this,t);return}switch(this.insertionMode){case F.INITIAL:{Fl(this,t);break}case F.BEFORE_HTML:{iu(this,t);break}case F.BEFORE_HEAD:{au(this,t);break}case F.IN_HEAD:{su(this,t);break}case F.IN_HEAD_NO_SCRIPT:{ou(this,t);break}case F.AFTER_HEAD:{lu(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{rA(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{r0(this,t);break}case F.IN_TABLE_TEXT:{uA(this,t);break}case F.IN_COLUMN_GROUP:{hf(this,t);break}case F.AFTER_BODY:{pf(this,t);break}case F.AFTER_AFTER_BODY:{Bd(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lj(this,t);return}switch(this.insertionMode){case F.INITIAL:{Fl(this,t);break}case F.BEFORE_HTML:{iu(this,t);break}case F.BEFORE_HEAD:{au(this,t);break}case F.IN_HEAD:{su(this,t);break}case F.IN_HEAD_NO_SCRIPT:{ou(this,t);break}case F.AFTER_HEAD:{lu(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{r0(this,t);break}case F.IN_COLUMN_GROUP:{hf(this,t);break}case F.AFTER_BODY:{pf(this,t);break}case F.AFTER_AFTER_BODY:{Bd(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Eg(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{Eg(this,t);break}case F.IN_TABLE_TEXT:{Ul(this,t);break}case F.AFTER_BODY:{F7(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{U7(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{z7(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,ie.misplacedDoctype);break}case F.IN_TABLE_TEXT:{Ul(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ie.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?cj(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Fl(this,t);break}case F.BEFORE_HTML:{$7(this,t);break}case F.BEFORE_HEAD:{q7(this,t);break}case F.IN_HEAD:{Tr(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Q7(this,t);break}case F.AFTER_HEAD:{X7(this,t);break}case F.IN_BODY:{cn(this,t);break}case F.IN_TABLE:{Ao(this,t);break}case F.IN_TABLE_TEXT:{Ul(this,t);break}case F.IN_CAPTION:{GB(this,t);break}case F.IN_COLUMN_GROUP:{kb(this,t);break}case F.IN_TABLE_BODY:{Gf(this,t);break}case F.IN_ROW:{Yf(this,t);break}case F.IN_CELL:{WB(this,t);break}case F.IN_SELECT:{fA(this,t);break}case F.IN_SELECT_IN_TABLE:{KB(this,t);break}case F.IN_TEMPLATE:{JB(this,t);break}case F.AFTER_BODY:{tj(this,t);break}case F.IN_FRAMESET:{nj(this,t);break}case F.AFTER_FRAMESET:{ij(this,t);break}case F.AFTER_AFTER_BODY:{sj(this,t);break}case F.AFTER_AFTER_FRAMESET:{oj(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?dj(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Fl(this,t);break}case F.BEFORE_HTML:{V7(this,t);break}case F.BEFORE_HEAD:{G7(this,t);break}case F.IN_HEAD:{Y7(this,t);break}case F.IN_HEAD_NO_SCRIPT:{W7(this,t);break}case F.AFTER_HEAD:{K7(this,t);break}case F.IN_BODY:{qf(this,t);break}case F.TEXT:{PB(this,t);break}case F.IN_TABLE:{Su(this,t);break}case F.IN_TABLE_TEXT:{Ul(this,t);break}case F.IN_CAPTION:{YB(this,t);break}case F.IN_COLUMN_GROUP:{QB(this,t);break}case F.IN_TABLE_BODY:{vg(this,t);break}case F.IN_ROW:{dA(this,t);break}case F.IN_CELL:{XB(this,t);break}case F.IN_SELECT:{hA(this,t);break}case F.IN_SELECT_IN_TABLE:{ZB(this,t);break}case F.IN_TEMPLATE:{ej(this,t);break}case F.AFTER_BODY:{mA(this,t);break}case F.IN_FRAMESET:{rj(this,t);break}case F.AFTER_FRAMESET:{aj(this,t);break}case F.AFTER_AFTER_BODY:{Bd(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{Fl(this,t);break}case F.BEFORE_HTML:{iu(this,t);break}case F.BEFORE_HEAD:{au(this,t);break}case F.IN_HEAD:{su(this,t);break}case F.IN_HEAD_NO_SCRIPT:{ou(this,t);break}case F.AFTER_HEAD:{lu(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{oA(this,t);break}case F.TEXT:{BB(this,t);break}case F.IN_TABLE_TEXT:{Ul(this,t);break}case F.IN_TEMPLATE:{pA(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Ab(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{nA(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{r0(this,t);break}case F.IN_TABLE_TEXT:{lA(this,t);break}}}}function I7(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):sA(e,t),n}function M7(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function P7(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),d=c&&o>=O7;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=B7(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function B7(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function j7(e,t,n){const r=e.treeAdapter.getTagName(t),a=Ho(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===v.TEMPLATE&&o===pe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function H7(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function wb(e,t){for(let n=0;n<L7;n++){const r=I7(e,t);if(!r)break;const a=M7(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const o=P7(e,a,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&j7(e,l,o),H7(e,a,r)}}function Eg(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function F7(e,t){e._appendCommentNode(t,e.openElements.items[0])}function U7(e,t){e._appendCommentNode(t,e.document)}function Ab(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function z7(e,t){e._setDocumentType(t);const n=t.forceQuirks?ar.QUIRKS:y7(t);b7(t)||e._err(t,ie.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function Fl(e,t){e._err(t,ie.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ar.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function $7(e,t){t.tagID===v.HTML?(e._insertElement(t,pe.HTML),e.insertionMode=F.BEFORE_HEAD):iu(e,t)}function V7(e,t){const n=t.tagID;(n===v.HTML||n===v.HEAD||n===v.BODY||n===v.BR)&&iu(e,t)}function iu(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function q7(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.HEAD:{e._insertElement(t,pe.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:au(e,t)}}function G7(e,t){const n=t.tagID;n===v.HEAD||n===v.BODY||n===v.HTML||n===v.BR?au(e,t):e._err(t,ie.endTagWithoutMatchingOpenElement)}function au(e,t){e._insertFakeElement(K.HEAD,v.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function Tr(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case v.TITLE:{e._switchToTextParsing(t,Nt.RCDATA);break}case v.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Nt.RAWTEXT):(e._insertElement(t,pe.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{e._switchToTextParsing(t,Nt.RAWTEXT);break}case v.SCRIPT:{e._switchToTextParsing(t,Nt.SCRIPT_DATA);break}case v.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case v.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:su(e,t)}}function Y7(e,t){switch(t.tagID){case v.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{su(e,t);break}case v.TEMPLATE:{ss(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function ss(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==v.TEMPLATE&&e._err(t,ie.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ie.endTagWithoutMatchingOpenElement)}function su(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function Q7(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{Tr(e,t);break}case v.NOSCRIPT:{e._err(t,ie.nestedNoscriptInHead);break}default:ou(e,t)}}function W7(e,t){switch(t.tagID){case v.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case v.BR:{ou(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function ou(e,t){const n=t.type===Ue.EOF?ie.openElementsLeftAfterEof:ie.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function X7(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.BODY:{e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case v.FRAMESET:{e._insertElement(t,pe.HTML),e.insertionMode=F.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{e._err(t,ie.abandonedHeadElementChild),e.openElements.push(e.headElement,v.HEAD),Tr(e,t),e.openElements.remove(e.headElement);break}case v.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:lu(e,t)}}function K7(e,t){switch(t.tagID){case v.BODY:case v.HTML:case v.BR:{lu(e,t);break}case v.TEMPLATE:{ss(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function lu(e,t){e._insertFakeElement(K.BODY,v.BODY),e.insertionMode=F.IN_BODY,Vf(e,t)}function Vf(e,t){switch(t.type){case Ue.CHARACTER:{rA(e,t);break}case Ue.WHITESPACE_CHARACTER:{nA(e,t);break}case Ue.COMMENT:{Eg(e,t);break}case Ue.START_TAG:{cn(e,t);break}case Ue.END_TAG:{qf(e,t);break}case Ue.EOF:{oA(e,t);break}}}function nA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function rA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Z7(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function J7(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eB(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_FRAMESET)}function tB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function nB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&yg.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,pe.HTML)}function rB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function iB(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML),n||(e.formElement=e.openElements.current))}function aB(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===v.LI&&a===v.LI||(n===v.DD||n===v.DT)&&(a===v.DD||a===v.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==v.ADDRESS&&a!==v.DIV&&a!==v.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function sB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.tokenizer.state=Nt.PLAINTEXT}function oB(e,t){e.openElements.hasInScope(v.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1}function lB(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(wb(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uB(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cB(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(v.NOBR)&&(wb(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dB(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fB(e,t){e.treeAdapter.getDocumentMode(e.document)!==ar.QUIRKS&&e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function iA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aA(e){const t=Yw(e,Ya.TYPE);return t!=null&&t.toLowerCase()===R7}function hB(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),aA(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pB(e,t){e._appendElement(t,pe.HTML),t.ackSelfClosing=!0}function mB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gB(e,t){t.tagName=K.IMG,t.tagID=v.IMG,iA(e,t)}function bB(e,t){e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Nt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function yB(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Nt.RAWTEXT)}function EB(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Nt.RAWTEXT)}function dT(e,t){e._switchToTextParsing(t,Nt.RAWTEXT)}function vB(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function _B(e,t){e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function xB(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,pe.HTML)}function TB(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(v.RTC),e._insertElement(t,pe.HTML)}function SB(e,t){e._reconstructActiveFormattingElements(),Jw(t),Cb(t),t.selfClosing?e._appendElement(t,pe.MATHML):e._insertElement(t,pe.MATHML),t.ackSelfClosing=!0}function CB(e,t){e._reconstructActiveFormattingElements(),eA(t),Cb(t),t.selfClosing?e._appendElement(t,pe.SVG):e._insertElement(t,pe.SVG),t.ackSelfClosing=!0}function fT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function cn(e,t){switch(t.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{uB(e,t);break}case v.A:{lB(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{nB(e,t);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{tB(e,t);break}case v.LI:case v.DD:case v.DT:{aB(e,t);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{iA(e,t);break}case v.HR:{mB(e,t);break}case v.RB:case v.RTC:{xB(e,t);break}case v.RT:case v.RP:{TB(e,t);break}case v.PRE:case v.LISTING:{rB(e,t);break}case v.XMP:{yB(e,t);break}case v.SVG:{CB(e,t);break}case v.HTML:{Z7(e,t);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{Tr(e,t);break}case v.BODY:{J7(e,t);break}case v.FORM:{iB(e,t);break}case v.NOBR:{cB(e,t);break}case v.MATH:{SB(e,t);break}case v.TABLE:{fB(e,t);break}case v.INPUT:{hB(e,t);break}case v.PARAM:case v.TRACK:case v.SOURCE:{pB(e,t);break}case v.IMAGE:{gB(e,t);break}case v.BUTTON:{oB(e,t);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{dB(e,t);break}case v.IFRAME:{EB(e,t);break}case v.SELECT:{vB(e,t);break}case v.OPTION:case v.OPTGROUP:{_B(e,t);break}case v.NOEMBED:case v.NOFRAMES:{dT(e,t);break}case v.FRAMESET:{eB(e,t);break}case v.TEXTAREA:{bB(e,t);break}case v.NOSCRIPT:{e.options.scriptingEnabled?dT(e,t):fT(e,t);break}case v.PLAINTEXT:{sB(e,t);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:fT(e,t)}}function wB(e,t){if(e.openElements.hasInScope(v.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function AB(e,t){e.openElements.hasInScope(v.BODY)&&(e.insertionMode=F.AFTER_BODY,mA(e,t))}function kB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function NB(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(v.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(v.FORM):n&&e.openElements.remove(n))}function RB(e){e.openElements.hasInButtonScope(v.P)||e._insertFakeElement(K.P,v.P),e._closePElement()}function LB(e){e.openElements.hasInListItemScope(v.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(v.LI),e.openElements.popUntilTagNamePopped(v.LI))}function OB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function DB(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function IB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function MB(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,v.BR),e.openElements.pop(),e.framesetOk=!1}function sA(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(r===l&&(r!==v.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function qf(e,t){switch(t.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{wb(e,t);break}case v.P:{RB(e);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{kB(e,t);break}case v.LI:{LB(e);break}case v.DD:case v.DT:{OB(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{DB(e);break}case v.BR:{MB(e);break}case v.BODY:{wB(e,t);break}case v.HTML:{AB(e,t);break}case v.FORM:{NB(e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{IB(e,t);break}case v.TEMPLATE:{ss(e,t);break}default:sA(e,t)}}function oA(e,t){e.tmplInsertionModeStack.length>0?pA(e,t):Ab(e,t)}function PB(e,t){var n;t.tagID===v.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function BB(e,t){e._err(t,ie.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function r0(e,t){if(e.openElements.currentTagId!==void 0&&tA.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case Ue.CHARACTER:{uA(e,t);break}case Ue.WHITESPACE_CHARACTER:{lA(e,t);break}}else Bu(e,t)}function jB(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_CAPTION}function HB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function FB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,v.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,kb(e,t)}function UB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_TABLE_BODY}function zB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,v.TBODY),e.insertionMode=F.IN_TABLE_BODY,Gf(e,t)}function $B(e,t){e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VB(e,t){aA(t)?e._appendElement(t,pe.HTML):Bu(e,t),t.ackSelfClosing=!0}function qB(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,pe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case v.TD:case v.TH:case v.TR:{zB(e,t);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{Tr(e,t);break}case v.COL:{FB(e,t);break}case v.FORM:{qB(e,t);break}case v.TABLE:{$B(e,t);break}case v.TBODY:case v.TFOOT:case v.THEAD:{UB(e,t);break}case v.INPUT:{VB(e,t);break}case v.CAPTION:{jB(e,t);break}case v.COLGROUP:{HB(e,t);break}default:Bu(e,t)}}function Su(e,t){switch(t.tagID){case v.TABLE:{e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode());break}case v.TEMPLATE:{ss(e,t);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:Bu(e,t)}}function Bu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Vf(e,t),e.fosterParentingEnabled=n}function lA(e,t){e.pendingCharacterTokens.push(t)}function uA(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ul(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Bu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const cA=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function GB(e,t){const n=t.tagID;cA.has(n)?e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Ao(e,t)):cn(e,t)}function YB(e,t){const n=t.tagID;switch(n){case v.CAPTION:case v.TABLE:{e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===v.TABLE&&Su(e,t));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:qf(e,t)}}function kb(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.COL:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case v.TEMPLATE:{Tr(e,t);break}default:hf(e,t)}}function QB(e,t){switch(t.tagID){case v.COLGROUP:{e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case v.TEMPLATE:{ss(e,t);break}case v.COL:break;default:hf(e,t)}}function hf(e,t){e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function Gf(e,t){switch(t.tagID){case v.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_ROW;break}case v.TH:case v.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,v.TR),e.insertionMode=F.IN_ROW,Yf(e,t);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function vg(e,t){const n=t.tagID;switch(t.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case v.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Su(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:Su(e,t)}}function Yf(e,t){switch(t.tagID){case v.TH:case v.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,pe.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Gf(e,t));break}default:Ao(e,t)}}function dA(e,t){switch(t.tagID){case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case v.TABLE:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,vg(e,t));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(v.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,vg(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:Su(e,t)}}function WB(e,t){const n=t.tagID;cA.has(n)?(e.openElements.hasInTableScope(v.TD)||e.openElements.hasInTableScope(v.TH))&&(e._closeTableCell(),Yf(e,t)):cn(e,t)}function XB(e,t){const n=t.tagID;switch(n){case v.TD:case v.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),dA(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:qf(e,t)}}function fA(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case v.OPTGROUP:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case v.HR:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),t.tagID!==v.SELECT&&e._processStartTag(t));break}case v.SCRIPT:case v.TEMPLATE:{Tr(e,t);break}}}function hA(e,t){switch(t.tagID){case v.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===v.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===v.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop();break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop();break}case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode());break}case v.TEMPLATE:{ss(e,t);break}}}function KB(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fA(e,t)}function ZB(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e.onEndTag(t)):hA(e,t)}function JB(e,t){switch(t.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{Tr(e,t);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Ao(e,t);break}case v.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,kb(e,t);break}case v.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,Gf(e,t);break}case v.TD:case v.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,Yf(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,cn(e,t)}}function ej(e,t){t.tagID===v.TEMPLATE&&ss(e,t)}function pA(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ab(e,t)}function tj(e,t){t.tagID===v.HTML?cn(e,t):pf(e,t)}function mA(e,t){var n;if(t.tagID===v.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===v.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else pf(e,t)}function pf(e,t){e.insertionMode=F.IN_BODY,Vf(e,t)}function nj(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.FRAMESET:{e._insertElement(t,pe.HTML);break}case v.FRAME:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case v.NOFRAMES:{Tr(e,t);break}}}function rj(e,t){t.tagID===v.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==v.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function ij(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.NOFRAMES:{Tr(e,t);break}}}function aj(e,t){t.tagID===v.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function sj(e,t){t.tagID===v.HTML?cn(e,t):Bd(e,t)}function Bd(e,t){e.insertionMode=F.IN_BODY,Vf(e,t)}function oj(e,t){switch(t.tagID){case v.HTML:{cn(e,t);break}case v.NOFRAMES:{Tr(e,t);break}}}function lj(e,t){t.chars=gt,e._insertCharacters(t)}function uj(e,t){e._insertCharacters(t),e.framesetOk=!1}function gA(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==pe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cj(e,t){if(C7(t))gA(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===pe.MATHML?Jw(t):r===pe.SVG&&(w7(t),eA(t)),Cb(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dj(e,t){if(t.tagID===v.P||t.tagID===v.BR){gA(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===pe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const Qf=bA("end"),zr=bA("start");function bA(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function yA(e){const t=zr(e),n=Qf(e);if(t&&n)return{start:t,end:n}}const fj=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,hj=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),hT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function EA(e,t){const n=Tj(e),r=Vg("type",{handlers:{root:pj,element:mj,text:gj,comment:_A,doctype:bj,raw:Ej},unknown:vj}),a={parser:n?new cT(hT):cT.getFragmentParser(void 0,hT),handle(c){r(c,a)},stitches:!1,options:t||{}};r(e,a),Fo(a,zr());const o=n?a.parser.document:a.parser.getFragment(),l=C9(o,{file:a.options.file});return a.stitches&&wo(l,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function vA(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function pj(e,t){vA(e.children,t)}function mj(e,t){_j(e,t),vA(e.children,t),xj(e,t)}function gj(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ue.CHARACTER,chars:e.value,location:ju(e)};Fo(t,zr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function bj(e,t){const n={type:Ue.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ju(e)};Fo(t,zr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yj(e,t){t.stitches=!0;const n=Sj(e);if("children"in e&&"children"in n){const r=EA({type:"root",children:e.children},t.options);n.children=r.children}_A({type:"comment",value:{stitch:n}},t)}function _A(e,t){const n=e.value,r={type:Ue.COMMENT,data:n,location:ju(e)};Fo(t,zr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ej(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xA(t,zr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(fj,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function vj(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))yj(n,t);else{let r="";throw hj.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Fo(e,t){xA(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Nt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function xA(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function _j(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Nt.PLAINTEXT)return;Fo(t,zr(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:qa.html;a===qa.html&&n==="svg"&&(a=qa.svg);const o=R9({...e,children:[]},{space:a===qa.svg?"svg":"html"}),l={type:Ue.START_TAG,tagName:n,tagID:Ho(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:ju(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xj(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hS.includes(n)||t.parser.tokenizer.state===Nt.PLAINTEXT)return;Fo(t,Qf(e));const r={type:Ue.END_TAG,tagName:n,tagID:Ho(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ju(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Nt.RCDATA||t.parser.tokenizer.state===Nt.RAWTEXT||t.parser.tokenizer.state===Nt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Nt.DATA)}function Tj(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ju(e){const t=zr(e)||{line:void 0,column:void 0,offset:void 0},n=Qf(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Sj(e){return"children"in e?ts({...e,children:[]}):ts(e)}function Cj(e){return function(t,n){return EA(t,{...e,file:n})}}const Ba=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],pT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ba,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ba],h2:[["className","sr-only"]],img:[...Ba,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ba,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ba],table:[...Ba],ul:[...Ba,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ia={}.hasOwnProperty;function wj(e,t){let n={type:"root",children:[]};const r={schema:t?{...pT,...t}:pT,stack:[]},a=TA(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function TA(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Aj(e,n);case"doctype":return kj(e,n);case"element":return Nj(e,n);case"root":return Rj(e,n);case"text":return Lj(e,n)}}}function Aj(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return Hu(o,t),o}}function kj(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Hu(n,t),n}}function Nj(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=SA(e,t.children),a=Oj(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&ia.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(o=!1;++d<c.length;)e.stack.includes(c[d])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:a,children:r};return Hu(l,t),l}function Rj(e,t){const r={type:"root",children:SA(e,t.children)};return Hu(r,t),r}function Lj(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Hu(r,t),r}function SA(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const o=TA(e,r[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function Oj(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,o=r&&ia.call(r,n)?r[n]:void 0,l=r&&ia.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ia.call(c,f)){const p=c[f];let m=mT(e,gT(o,f),f,p);m==null&&(m=mT(e,gT(l,f),f,p)),m!=null&&(d[f]=m)}if(a&&ia.call(a,n)){const p=a[n];for(f in p)ia.call(p,f)&&!ia.call(d,f)&&(d[f]=p[f])}return d}function mT(e,t,n,r){return t?Array.isArray(r)?Dj(e,t,n,r):CA(e,t,n,r):void 0}function Dj(e,t,n,r){let a=-1;const o=[];for(;++a<r.length;){const l=CA(e,t,n,r[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function CA(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Ij(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){a=!0;break}}else if(l===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Ij(e,t,n){const r=e.schema.protocols&&ia.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),o=a.indexOf(":"),l=a.indexOf("?"),c=a.indexOf("#"),d=a.indexOf("/");if(o<0||d>-1&&o>d||l>-1&&o>l||c>-1&&o>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(o===p.length&&a.slice(0,p.length)===p)return!0}return!1}function Hu(e,t){const n=yA(t);t.data&&(e.data=ts(t.data)),n&&(e.position=n)}function gT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],o=typeof a=="string"?a:a[0];if(o===t)return a;o==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Mj(e){return function(t){return wj(t,e)}}const bn=ba(/[A-Za-z]/),un=ba(/[\dA-Za-z]/),Pj=ba(/[#-'*+\--9=?A-Z^-~]/);function mf(e){return e!==null&&(e<32||e===127)}const _g=ba(/\d/),Bj=ba(/[\dA-Fa-f]/),jj=ba(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const Wf=ba(new RegExp("\\p{P}|\\p{S}","u")),ns=ba(/\s/);function ba(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Hj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Fj(e,t,n){const a=Uf((n||{}).ignore||[]),o=Uj(t);let l=-1;for(;++l<o.length;)Pw(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],_=b?b.children:void 0;if(a(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=o[l][0],y=o[l][1];let _=0;const A=m.children.indexOf(f);let C=!1,k=[];b.lastIndex=0;let N=b.exec(f.value);for(;N;){const L=N.index,O={index:N.index,input:N.input,stack:[...p,f]};let P=y(...N,O);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?b.lastIndex=L+1:(_!==L&&k.push({type:"text",value:f.value.slice(_,L)}),Array.isArray(P)?k.push(...P):P&&k.push(P),_=L+N[0].length,C=!0),!b.global)break;N=b.exec(f.value)}return C?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(A,1,...k)):k=[f],A+k.length}}function Uj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([zj(a[0]),$j(a[1])])}return t}function zj(e){return typeof e=="string"?new RegExp(Hj(e),"g"):e}function $j(e){return typeof e=="function"?e:function(){return e}}const i0="phrasing",a0=["autolink","link","image","label"];function Vj(){return{transforms:[Kj],enter:{literalAutolink:Gj,literalAutolinkEmail:s0,literalAutolinkHttp:s0,literalAutolinkWww:s0},exit:{literalAutolink:Xj,literalAutolinkEmail:Wj,literalAutolinkHttp:Yj,literalAutolinkWww:Qj}}}function qj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:i0,notInConstruct:a0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:i0,notInConstruct:a0},{character:":",before:"[ps]",after:"\\/",inConstruct:i0,notInConstruct:a0}]}}function Gj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function s0(e){this.config.enter.autolinkProtocol.call(this,e)}function Yj(e){this.config.exit.autolinkProtocol.call(this,e)}function Qj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Wj(e){this.config.exit.autolinkEmail.call(this,e)}function Xj(e){this.exit(e)}function Kj(e){Fj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Jj]],{ignore:["link","linkReference"]})}function Zj(e,t,n,r,a){let o="";if(!wA(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!eH(n)))return!1;const l=tH(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function Jj(e,t,n,r){return!wA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function eH(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function tH(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=Kd(e,"(");let o=Kd(e,")");for(;r!==-1&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function wA(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ns(n)||Wf(n))&&(!t||n!==47)}function vr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}AA.peek=cH;function nH(){this.buffer()}function rH(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iH(){this.buffer()}function aH(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sH(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oH(e){this.exit(e)}function lH(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uH(e){this.exit(e)}function cH(){return"["}function AA(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=a.move("]"),o}function dH(){return{enter:{gfmFootnoteCallString:nH,gfmFootnoteCall:rH,gfmFootnoteDefinitionLabelString:iH,gfmFootnoteDefinition:aH},exit:{gfmFootnoteCallString:sH,gfmFootnoteCall:oH,gfmFootnoteDefinitionLabelString:lH,gfmFootnoteDefinition:uH}}}function fH(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:AA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,o,l){const c=o.createTracker(l);let d=c.move("[^");const f=o.enter("footnoteDefinition"),p=o.enter("label");return d+=c.move(o.safe(o.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
1334
|
+
`:" ")+o.indentLines(o.containerFlow(r,c.current()),t?kA:hH))),f(),d}}function hH(e,t,n){return t===0?e:kA(e,t,n)}function kA(e,t,n){return(n?"":" ")+e}const pH=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NA.peek=EH;function mH(){return{canContainEols:["delete"],enter:{strikethrough:bH},exit:{strikethrough:yH}}}function gH(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pH}],handlers:{delete:NA}}}function bH(e){this.enter({type:"delete",children:[]},e)}function yH(e){this.exit(e)}function NA(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),o(),l}function EH(){return"~"}function vH(e){return e.length}function _H(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||vH,o=[],l=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const T=[],A=[];let C=-1;for(e[p].length>f&&(f=e[p].length);++C<e[p].length;){const k=xH(e[p][C]);if(n.alignDelimiters!==!1){const N=a(k);A[C]=N,(d[C]===void 0||N>d[C])&&(d[C]=N)}T.push(k)}l[p]=T,c[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)o[m]=bT(r[m]);else{const T=bT(r);for(;++m<f;)o[m]=T}m=-1;const b=[],y=[];for(;++m<f;){const T=o[m];let A="",C="";T===99?(A=":",C=":"):T===108?A=":":T===114&&(C=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-C.length);const N=A+"-".repeat(k)+C;n.alignDelimiters!==!1&&(k=A.length+k+C.length,k>d[m]&&(d[m]=k),y[m]=k),b[m]=N}l.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<l.length;){const T=l[p],A=c[p];m=-1;const C=[];for(;++m<f;){const k=T[m]||"";let N="",L="";if(n.alignDelimiters!==!1){const O=d[m]-(A[m]||0),P=o[m];P===114?N=" ".repeat(O):P===99?O%2?(N=" ".repeat(O/2+.5),L=" ".repeat(O/2-.5)):(N=" ".repeat(O/2),L=N):L=" ".repeat(O)}n.delimiterStart!==!1&&!m&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&C.push(" "),n.alignDelimiters!==!1&&C.push(N),C.push(k),n.alignDelimiters!==!1&&C.push(L),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&C.push("|")}_.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return _.join(`
|
|
1335
|
+
`)}function xH(e){return e==null?"":String(e)}function bT(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function TH(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),SH);return a(),l}function SH(e,t,n){return">"+(n?"":" ")+e}function CH(e,t){return yT(e,t.inConstruct,!0)&&!yT(e,t.notInConstruct,!1)}function yT(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ET(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
1336
|
+
`&&CH(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
1337
|
+
`}function wH(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++o>l&&(l=o):o=1,a=r+t.length,r=n.indexOf(t,a);return l}function AH(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kH(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function NH(e,t,n,r){const a=kH(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(AH(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(o,RH);return m(),b}const c=n.createTracker(r),d=a.repeat(Math.max(wH(o,a)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
|
|
1338
|
+
`,encode:["`"],...c.current()})),m()}return p+=c.move(`
|
|
1339
|
+
`),o&&(p+=c.move(o+`
|
|
1340
|
+
`)),p+=c.move(d),f(),p}function RH(e,t,n){return(n?"":" ")+e}function Nb(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function LH(e,t,n,r){const a=Nb(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
1341
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=d.move(" "+a),f+=d.move(n.safe(e.title,{before:f,after:a,...d.current()})),f+=d.move(a),c()),l(),f}function OH(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Cu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ko(e){if(e===null||dt(e)||ns(e))return 1;if(Wf(e))return 2}function gf(e,t,n){const r=ko(e),a=ko(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}RA.peek=DH;function RA(e,t,n,r){const a=OH(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(a);let d=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const f=d.charCodeAt(0),p=gf(r.before.charCodeAt(r.before.length-1),f,a);p.inside&&(d=Cu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=gf(r.after.charCodeAt(0),m,a);b.inside&&(d=d.slice(0,-1)+Cu(m));const y=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function DH(e,t,n){return n.options.emphasis||"*"}const IH={};function Rb(e,t){const n=IH,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return LA(e,r,a)}function LA(e,t,n){if(MH(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vT(e.children,t,n)}return Array.isArray(e)?vT(e,t,n):""}function vT(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=LA(e[a],t,n);return r.join("")}function MH(e){return!!(e&&typeof e=="object")}function PH(e,t){let n=!1;return wo(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,pg}),!!((!e.depth||e.depth<3)&&Rb(e)&&(t.options.setext||n))}function BH(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(PH(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...o.current(),before:`
|
|
1342
|
+
`,after:`
|
|
1343
|
+
`});return m(),p(),b+`
|
|
1344
|
+
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
1345
|
+
`))+1))}const l="#".repeat(a),c=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
1346
|
+
`,...o.current()});return/^[\t ]/.test(f)&&(f=Cu(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}OA.peek=jH;function OA(e){return e.value||""}function jH(){return"<"}DA.peek=HH;function DA(e,t,n,r){const a=Nb(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=d.move(" "+a),f+=d.move(n.safe(e.title,{before:f,after:a,...d.current()})),f+=d.move(a),c()),f+=d.move(")"),l(),f}function HH(){return"!"}IA.peek=FH;function IA(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=p,o(),a==="full"||!f||f!==m?d+=c.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function FH(){return"!"}MA.peek=UH;function MA(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return a+r+a}function UH(){return"`"}function PA(e,t){const n=Rb(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}BA.peek=zH;function BA(e,t,n,r){const a=Nb(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(PA(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),f+=l.move(" "+a),f+=l.move(n.safe(e.title,{before:f,after:a,...l.current()})),f+=l.move(a),d()),f+=l.move(")"),c(),f}function zH(e,t,n){return PA(e,n)?"<":"["}jA.peek=$H;function jA(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=p,o(),a==="full"||!f||f!==m?d+=c.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function $H(){return"["}function Lb(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VH(e){const t=Lb(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qH(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function HA(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function GH(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?qH(n):Lb(n);const c=e.ordered?l==="."?")":".":VH(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),HA(n)===l&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),f}function YH(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function QH(e,t,n,r){const a=YH(n);let o=n.bulletCurrent||Lb(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?o:o+" ".repeat(l-o.length))+m}}function WH(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),a(),l}const XH=Uf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function KH(e,t,n,r){return(e.children.some(function(l){return XH(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ZH(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}FA.peek=JH;function FA(e,t,n,r){const a=ZH(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(a+a);let d=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const f=d.charCodeAt(0),p=gf(r.before.charCodeAt(r.before.length-1),f,a);p.inside&&(d=Cu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=gf(r.after.charCodeAt(0),m,a);b.inside&&(d=d.slice(0,-1)+Cu(m));const y=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function JH(e,t,n){return n.options.strong||"*"}function eF(e,t,n,r){return n.safe(e.value,r)}function tF(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nF(e,t,n){const r=(HA(n)+(n.options.ruleSpaces?" ":"")).repeat(tF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const UA={blockquote:TH,break:ET,code:NH,definition:LH,emphasis:RA,hardBreak:ET,heading:BH,html:OA,image:DA,imageReference:IA,inlineCode:MA,link:BA,linkReference:jA,list:GH,listItem:QH,paragraph:WH,root:KH,strong:FA,text:eF,thematicBreak:nF},_T=document.createElement("i");function Ob(e){const t="&"+e+";";_T.innerHTML=t;const n=_T.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zA(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const rF=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iF(e){return e.replace(rF,aF)}function aF(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return zA(n.slice(o?2:1),o?16:10)}return Ob(n)||e}function sF(){return{enter:{table:oF,tableData:xT,tableHeader:xT,tableRow:uF},exit:{codeText:cF,table:lF,tableData:o0,tableHeader:o0,tableRow:o0}}}function oF(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function lF(e){this.exit(e),this.data.inTable=void 0}function uF(e){this.enter({type:"tableRow",children:[]},e)}function o0(e){this.exit(e)}function xT(e){this.enter({type:"tableCell",children:[]},e)}function cF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,dF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function dF(e,t){return t==="|"?t:e}function fF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
1347
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(y,_,T,A){return f(p(y,T,A),y.align)}function c(y,_,T,A){const C=m(y,T,A),k=f([C]);return k.slice(0,k.indexOf(`
|
|
1348
|
+
`))}function d(y,_,T,A){const C=T.enter("tableCell"),k=T.enter("phrasing"),N=T.containerPhrasing(y,{...A,before:o,after:o});return k(),C(),N}function f(y,_){return _H(y,{align:_,alignDelimiters:r,padding:n,stringLength:a})}function p(y,_,T){const A=y.children;let C=-1;const k=[],N=_.enter("table");for(;++C<A.length;)k[C]=m(A[C],_,T);return N(),k}function m(y,_,T){const A=y.children;let C=-1;const k=[],N=_.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],y,_,T);return N(),k}function b(y,_,T){let A=UA.inlineCode(y,_,T);return T.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function hF(){return{exit:{taskListCheckValueChecked:TT,taskListCheckValueUnchecked:TT,paragraph:mF}}}function pF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gF}}}function TT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function mF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const c=a[o];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function gF(e,t,n,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let d=UA.listItem(e,t,n,{...r,...c.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+l}}function bF(){return[Vj(),dH(),mH(),sF(),hF()]}function yF(e){return{extensions:[qj(),fH(e),gH(),fF(e),pF()]}}function qn(e,t,n,r){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function sr(e,t){return e.length>0?(qn(e,e.length,0,t),e):t}const ST={}.hasOwnProperty;function $A(e){const t={};let n=-1;for(;++n<e.length;)EF(t,e[n]);return t}function EF(e,t){let n;for(n in t){const a=(ST.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){ST.call(a,l)||(a[l]=[]);const c=o[l];vF(a[l],Array.isArray(c)?c:c?[c]:[])}}}function vF(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qn(e,0,0,r)}const _F={tokenize:AF,partial:!0},VA={tokenize:kF,partial:!0},qA={tokenize:NF,partial:!0},GA={tokenize:RF,partial:!0},xF={tokenize:LF,partial:!0},YA={name:"wwwAutolink",tokenize:CF,previous:WA},QA={name:"protocolAutolink",tokenize:wF,previous:XA},Si={name:"emailAutolink",tokenize:SF,previous:KA},$r={};function TF(){return{text:$r}}let ja=48;for(;ja<123;)$r[ja]=Si,ja++,ja===58?ja=65:ja===91&&(ja=97);$r[43]=Si;$r[45]=Si;$r[46]=Si;$r[95]=Si;$r[72]=[Si,QA];$r[104]=[Si,QA];$r[87]=[Si,YA];$r[119]=[Si,YA];function SF(e,t,n){const r=this;let a,o;return l;function l(m){return!xg(m)||!KA.call(r,r.previous)||Db(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return xg(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(xF,p,f)(m):m===45||m===95||un(m)?(o=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),a=!0,d}function p(m){return o&&a&&bn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function CF(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!WA.call(r,r.previous)||Db(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_F,e.attempt(VA,e.attempt(qA,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function wF(e,t,n){const r=this;let a="",o=!1;return l;function l(m){return(m===72||m===104)&&XA.call(r,r.previous)&&!Db(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(bn(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),o?f:(o=!0,d)):n(m)}function f(m){return m===null||mf(m)||dt(m)||ns(m)||Wf(m)?n(m):e.attempt(VA,e.attempt(qA,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function AF(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function kF(e,t,n){let r,a,o;return l;function l(f){return f===46||f===95?e.check(GA,d,c)(f):f===null||dt(f)||ns(f)||f!==45&&Wf(f)?d(f):(o=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(a=r,r=void 0),e.consume(f),l}function d(f){return a||r||!o?n(f):t(f)}}function NF(e,t){let n=0,r=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(GA,t,o)(l):l===null||dt(l)||ns(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&r++,e.consume(l),a}}function RF(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),a):c===60||c===null||dt(c)||ns(c)?t(c):n(c)}function a(c){return c===null||c===40||c===91||dt(c)||ns(c)?t(c):r(c)}function o(c){return bn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):bn(c)?(e.consume(c),l):n(c)}}function LF(e,t,n){return r;function r(o){return e.consume(o),a}function a(o){return un(o)?n(o):t(o)}}function WA(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function XA(e){return!bn(e)}function KA(e){return!(e===47||xg(e))}function xg(e){return e===43||e===45||e===46||e===95||un(e)}function Db(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Uo(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&un(e.charCodeAt(n+1))&&un(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Xf(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Tg={name:"attention",resolveAll:OF,tokenize:DF};function OF(e,t){let n=-1,r,a,o,l,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},b={...e[n][1].start};CT(m,-d),CT(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=sr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=sr(f,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),f=sr(f,Xf(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=sr(f,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=sr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,qn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DF(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=ko(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const f=e.exit("attentionSequence"),p=ko(d),m=!p||p===2&&a||n.includes(d),b=!a||a===2&&p||n.includes(r);return f._open=!!(o===42?m:m&&(a||!b)),f._close=!!(o===42?b:b&&(p||!m)),t(d)}}function CT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const IF={name:"autolink",tokenize:MF};function MF(e,t,n){let r=0;return a;function a(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return bn(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||un(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||un(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||mf(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Pj(y)?(e.consume(y),f):n(y)}function p(y){return un(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||un(y))&&r++<63){const _=y===45?b:m;return e.consume(y),_}return n(y)}}function Xe(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return qe(d)&&o++<a?(e.consume(d),c):(e.exit(n),t(d))}}const Fu={partial:!0,tokenize:PF};function PF(e,t,n){return r;function r(o){return qe(o)?Xe(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||ke(o)?t(o):n(o)}}const ZA={continuation:{tokenize:jF},exit:HF,name:"blockQuote",tokenize:BF};function BF(e,t,n){const r=this;return a;function a(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return qe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function jF(e,t,n){const r=this;return a;function a(l){return qe(l)?Xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(ZA,t,n)(l)}}function HF(e){e.exit("blockQuote")}const JA={name:"characterEscape",tokenize:FF};function FF(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return jj(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const ek={name:"characterReference",tokenize:UF};function UF(e,t,n){const r=this;let a=0,o,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,l=un,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Bj,p):(e.enter("characterReferenceValue"),o=7,l=_g,p(m))}function p(m){if(m===59&&a){const b=e.exit("characterReferenceValue");return l===un&&!Ob(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&a++<o?(e.consume(m),p):n(m)}}const wT={partial:!0,tokenize:$F},AT={concrete:!0,name:"codeFenced",tokenize:zF};function zF(e,t,n){const r=this,a={partial:!0,tokenize:O};let o=0,l=0,c;return d;function d(P){return f(P)}function f(P){const V=r.events[r.events.length-1];return o=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,c=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(P)}function p(P){return P===c?(l++,e.consume(P),p):l<3?n(P):(e.exit("codeFencedFenceSequence"),qe(P)?Xe(e,m,"whitespace")(P):m(P))}function m(P){return P===null||ke(P)?(e.exit("codeFencedFence"),r.interrupt?t(P):e.check(wT,T,L)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(P))}function b(P){return P===null||ke(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(P)):qe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,y,"whitespace")(P)):P===96&&P===c?n(P):(e.consume(P),b)}function y(P){return P===null||ke(P)?m(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(P))}function _(P){return P===null||ke(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(P)):P===96&&P===c?n(P):(e.consume(P),_)}function T(P){return e.attempt(a,L,A)(P)}function A(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),C}function C(P){return o>0&&qe(P)?Xe(e,k,"linePrefix",o+1)(P):k(P)}function k(P){return P===null||ke(P)?e.check(wT,T,L)(P):(e.enter("codeFlowValue"),N(P))}function N(P){return P===null||ke(P)?(e.exit("codeFlowValue"),k(P)):(e.consume(P),N)}function L(P){return e.exit("codeFenced"),t(P)}function O(P,V,G){let Z=0;return z;function z(se){return P.enter("lineEnding"),P.consume(se),P.exit("lineEnding"),re}function re(se){return P.enter("codeFencedFence"),qe(se)?Xe(P,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(se):W(se)}function W(se){return se===c?(P.enter("codeFencedFenceSequence"),he(se)):G(se)}function he(se){return se===c?(Z++,P.consume(se),he):Z>=l?(P.exit("codeFencedFenceSequence"),qe(se)?Xe(P,ue,"whitespace")(se):ue(se)):G(se)}function ue(se){return se===null||ke(se)?(P.exit("codeFencedFence"),V(se)):G(se)}}}function $F(e,t,n){const r=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const l0={name:"codeIndented",tokenize:qF},VF={partial:!0,tokenize:GF};function qF(e,t,n){const r=this;return a;function a(f){return e.enter("codeIndented"),Xe(e,o,"linePrefix",5)(f)}function o(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):ke(f)?e.attempt(VF,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||ke(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function GF(e,t,n){const r=this;return a;function a(l){return r.parser.lazy[r.now().line]?n(l):ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):Xe(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ke(l)?a(l):n(l)}}const YF={name:"codeText",previous:WF,resolve:QF,tokenize:XF};function QF(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function WF(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XF(e,t,n){let r=0,a,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,p(m)):ke(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||ke(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),a++,p):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",f(m))}}class KF{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&zl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);zl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zl(this.left,n.reverse())}}}function zl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function tk(e){const t={};let n=-1,r,a,o,l,c,d,f;const p=new KF(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ZF(p,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,a=void 0;o--;)if(l=p.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(p.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(r[1].end={...p.get(a)[1].start},c=p.slice(a,n),c.unshift(r),p.splice(a,n-a+1,c))}}return qn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function ZF(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let p,m,b=-1,y=n,_=0,T=0;const A=[T];for(;y;){for(;e.get(++a)[1]!==y;);o.push(a),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(T=b+1,A.push(T),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const C=c.slice(A[b],A[b+1]),k=o.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const JF={resolve:tU,tokenize:nU},eU={partial:!0,tokenize:rU};function tU(e){return tk(e),e}function nU(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?o(c):ke(c)?e.check(eU,l,o)(c):(e.consume(c),a)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function rU(e,t,n){const r=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xe(e,o,"linePrefix")}function o(l){if(l===null||ke(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function nk(e,t,n,r,a,o,l,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(C){return C===60?(e.enter(r),e.enter(a),e.enter(o),e.consume(C),e.exit(o),b):C===null||C===32||C===41||mf(C)?n(C):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),T(C))}function b(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),b(C)):C===null||C===60||ke(C)?n(C):(e.consume(C),C===92?_:y)}function _(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function T(C){return!p&&(C===null||C===41||dt(C))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(C)):p<f&&C===40?(e.consume(C),p++,T):C===41?(e.consume(C),p--,T):C===null||C===32||C===40||mf(C)?n(C):(e.consume(C),C===92?A:T)}function A(C){return C===40||C===41||C===92?(e.consume(C),T):T(C)}}function rk(e,t,n,r,a,o){const l=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(a),e.consume(y),e.exit(a),e.enter(o),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(o),e.enter(a),e.consume(y),e.exit(a),e.exit(r),t):ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||ke(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!qe(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function ik(e,t,n,r,a,o){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(o),f(b))}function f(b){return b===l?(e.exit(o),d(l)):b===null?n(b):ke(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Xe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===l||b===null||ke(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===l||b===92?(e.consume(b),p):p(b)}}function uu(e,t){let n;return r;function r(a){return ke(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):qe(a)?Xe(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const iU={name:"definition",tokenize:sU},aU={partial:!0,tokenize:oU};function sU(e,t,n){const r=this;let a;return o;function o(y){return e.enter("definition"),l(y)}function l(y){return rk.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return a=vr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return dt(y)?uu(e,f)(y):f(y)}function f(y){return nk(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(aU,m,m)(y)}function m(y){return qe(y)?Xe(e,b,"whitespace")(y):b(y)}function b(y){return y===null||ke(y)?(e.exit("definition"),r.parser.defined.push(a),t(y)):n(y)}}function oU(e,t,n){return r;function r(c){return dt(c)?uu(e,a)(c):n(c)}function a(c){return ik(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return qe(c)?Xe(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ke(c)?t(c):n(c)}}const lU={name:"hardBreakEscape",tokenize:uU};function uU(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return ke(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const cU={name:"headingAtx",resolve:dU,tokenize:fU};function dU(e,t){let n=e.length-2,r=3,a,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qn(e,r,n-r+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function fU(e,t,n){let r=0;return a;function a(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||dt(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||ke(p)?(e.exit("atxHeading"),t(p)):qe(p)?Xe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||dt(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const hU=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],kT=["pre","script","style","textarea"],pU={concrete:!0,name:"htmlFlow",resolveTo:bU,tokenize:yU},mU={partial:!0,tokenize:vU},gU={partial:!0,tokenize:EU};function bU(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function yU(e,t,n){const r=this;let a,o,l,c,d;return f;function f(D){return p(D)}function p(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),m}function m(D){return D===33?(e.consume(D),b):D===47?(e.consume(D),o=!0,T):D===63?(e.consume(D),a=3,r.interrupt?t:H):bn(D)?(e.consume(D),l=String.fromCharCode(D),A):n(D)}function b(D){return D===45?(e.consume(D),a=2,y):D===91?(e.consume(D),a=5,c=0,_):bn(D)?(e.consume(D),a=4,r.interrupt?t:H):n(D)}function y(D){return D===45?(e.consume(D),r.interrupt?t:H):n(D)}function _(D){const fe="CDATA[";return D===fe.charCodeAt(c++)?(e.consume(D),c===fe.length?r.interrupt?t:W:_):n(D)}function T(D){return bn(D)?(e.consume(D),l=String.fromCharCode(D),A):n(D)}function A(D){if(D===null||D===47||D===62||dt(D)){const fe=D===47,we=l.toLowerCase();return!fe&&!o&&kT.includes(we)?(a=1,r.interrupt?t(D):W(D)):hU.includes(l.toLowerCase())?(a=6,fe?(e.consume(D),C):r.interrupt?t(D):W(D)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?k(D):N(D))}return D===45||un(D)?(e.consume(D),l+=String.fromCharCode(D),A):n(D)}function C(D){return D===62?(e.consume(D),r.interrupt?t:W):n(D)}function k(D){return qe(D)?(e.consume(D),k):z(D)}function N(D){return D===47?(e.consume(D),z):D===58||D===95||bn(D)?(e.consume(D),L):qe(D)?(e.consume(D),N):z(D)}function L(D){return D===45||D===46||D===58||D===95||un(D)?(e.consume(D),L):O(D)}function O(D){return D===61?(e.consume(D),P):qe(D)?(e.consume(D),O):N(D)}function P(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),d=D,V):qe(D)?(e.consume(D),P):G(D)}function V(D){return D===d?(e.consume(D),d=null,Z):D===null||ke(D)?n(D):(e.consume(D),V)}function G(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||dt(D)?O(D):(e.consume(D),G)}function Z(D){return D===47||D===62||qe(D)?N(D):n(D)}function z(D){return D===62?(e.consume(D),re):n(D)}function re(D){return D===null||ke(D)?W(D):qe(D)?(e.consume(D),re):n(D)}function W(D){return D===45&&a===2?(e.consume(D),B):D===60&&a===1?(e.consume(D),Q):D===62&&a===4?(e.consume(D),$):D===63&&a===3?(e.consume(D),H):D===93&&a===5?(e.consume(D),Ee):ke(D)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(mU,ae,he)(D)):D===null||ke(D)?(e.exit("htmlFlowData"),he(D)):(e.consume(D),W)}function he(D){return e.check(gU,ue,ae)(D)}function ue(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),se}function se(D){return D===null||ke(D)?he(D):(e.enter("htmlFlowData"),W(D))}function B(D){return D===45?(e.consume(D),H):W(D)}function Q(D){return D===47?(e.consume(D),l="",X):W(D)}function X(D){if(D===62){const fe=l.toLowerCase();return kT.includes(fe)?(e.consume(D),$):W(D)}return bn(D)&&l.length<8?(e.consume(D),l+=String.fromCharCode(D),X):W(D)}function Ee(D){return D===93?(e.consume(D),H):W(D)}function H(D){return D===62?(e.consume(D),$):D===45&&a===2?(e.consume(D),H):W(D)}function $(D){return D===null||ke(D)?(e.exit("htmlFlowData"),ae(D)):(e.consume(D),$)}function ae(D){return e.exit("htmlFlow"),t(D)}}function EU(e,t,n){const r=this;return a;function a(l){return ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function vU(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Fu,t,n)}}const _U={name:"htmlText",tokenize:xU};function xU(e,t,n){const r=this;let a,o,l;return c;function c(H){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(H),d}function d(H){return H===33?(e.consume(H),f):H===47?(e.consume(H),O):H===63?(e.consume(H),N):bn(H)?(e.consume(H),G):n(H)}function f(H){return H===45?(e.consume(H),p):H===91?(e.consume(H),o=0,_):bn(H)?(e.consume(H),k):n(H)}function p(H){return H===45?(e.consume(H),y):n(H)}function m(H){return H===null?n(H):H===45?(e.consume(H),b):ke(H)?(l=m,Q(H)):(e.consume(H),m)}function b(H){return H===45?(e.consume(H),y):m(H)}function y(H){return H===62?B(H):H===45?b(H):m(H)}function _(H){const $="CDATA[";return H===$.charCodeAt(o++)?(e.consume(H),o===$.length?T:_):n(H)}function T(H){return H===null?n(H):H===93?(e.consume(H),A):ke(H)?(l=T,Q(H)):(e.consume(H),T)}function A(H){return H===93?(e.consume(H),C):T(H)}function C(H){return H===62?B(H):H===93?(e.consume(H),C):T(H)}function k(H){return H===null||H===62?B(H):ke(H)?(l=k,Q(H)):(e.consume(H),k)}function N(H){return H===null?n(H):H===63?(e.consume(H),L):ke(H)?(l=N,Q(H)):(e.consume(H),N)}function L(H){return H===62?B(H):N(H)}function O(H){return bn(H)?(e.consume(H),P):n(H)}function P(H){return H===45||un(H)?(e.consume(H),P):V(H)}function V(H){return ke(H)?(l=V,Q(H)):qe(H)?(e.consume(H),V):B(H)}function G(H){return H===45||un(H)?(e.consume(H),G):H===47||H===62||dt(H)?Z(H):n(H)}function Z(H){return H===47?(e.consume(H),B):H===58||H===95||bn(H)?(e.consume(H),z):ke(H)?(l=Z,Q(H)):qe(H)?(e.consume(H),Z):B(H)}function z(H){return H===45||H===46||H===58||H===95||un(H)?(e.consume(H),z):re(H)}function re(H){return H===61?(e.consume(H),W):ke(H)?(l=re,Q(H)):qe(H)?(e.consume(H),re):Z(H)}function W(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),a=H,he):ke(H)?(l=W,Q(H)):qe(H)?(e.consume(H),W):(e.consume(H),ue)}function he(H){return H===a?(e.consume(H),a=void 0,se):H===null?n(H):ke(H)?(l=he,Q(H)):(e.consume(H),he)}function ue(H){return H===null||H===34||H===39||H===60||H===61||H===96?n(H):H===47||H===62||dt(H)?Z(H):(e.consume(H),ue)}function se(H){return H===47||H===62||dt(H)?Z(H):n(H)}function B(H){return H===62?(e.consume(H),e.exit("htmlTextData"),e.exit("htmlText"),t):n(H)}function Q(H){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),X}function X(H){return qe(H)?Xe(e,Ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):Ee(H)}function Ee(H){return e.enter("htmlTextData"),l(H)}}const Ib={name:"labelEnd",resolveAll:wU,resolveTo:AU,tokenize:kU},TU={tokenize:NU},SU={tokenize:RU},CU={tokenize:LU};function wU(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&qn(e,0,e.length,n),e}function AU(e,t){let n=e.length,r=0,a,o,l,c;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=sr(c,e.slice(o+1,o+r+3)),c=sr(c,[["enter",p,t]]),c=sr(c,Xf(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=sr(c,[["exit",p,t],e[l-2],e[l-1],["exit",f,t]]),c=sr(c,e.slice(l+1)),c=sr(c,[["exit",d,t]]),qn(e,o,e.length,c),e}function kU(e,t,n){const r=this;let a=r.events.length,o,l;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){o=r.events[a][1];break}return c;function c(b){return o?o._inactive?m(b):(l=r.parser.defined.includes(vr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(TU,p,l?p:m)(b):b===91?e.attempt(SU,p,l?f:m)(b):l?p(b):m(b)}function f(b){return e.attempt(CU,p,m)(b)}function p(b){return t(b)}function m(b){return o._balanced=!0,n(b)}}function NU(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return dt(m)?uu(e,o)(m):o(m)}function o(m){return m===41?p(m):nk(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return dt(m)?uu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?ik(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return dt(m)?uu(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function RU(e,t,n){const r=this;return a;function a(c){return rk.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(vr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function LU(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const OU={name:"labelStartImage",resolveAll:Ib.resolveAll,tokenize:DU};function DU(e,t,n){const r=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const IU={name:"labelStartLink",resolveAll:Ib.resolveAll,tokenize:MU};function MU(e,t,n){const r=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const u0={name:"lineEnding",tokenize:PU};function PU(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const jd={name:"thematicBreak",tokenize:BU};function BU(e,t,n){let r=0,a;return o;function o(f){return e.enter("thematicBreak"),l(f)}function l(f){return a=f,c(f)}function c(f){return f===a?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ke(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===a?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),qe(f)?Xe(e,c,"whitespace")(f):c(f))}}const Nn={continuation:{tokenize:UU},exit:$U,name:"list",tokenize:FU},jU={partial:!0,tokenize:VU},HU={partial:!0,tokenize:zU};function FU(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:_g(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(jd,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return _g(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Fu,r.interrupt?n:p,e.attempt(jU,b,m))}function p(y){return r.containerState.initialBlankLine=!0,o++,b(y)}function m(y){return qe(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function UU(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fu,a,o);function a(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!qe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(HU,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function zU(e,t,n){const r=this;return Xe(e,a,"listItemIndent",r.containerState.size+1);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function $U(e){e.exit(this.containerState.type)}function VU(e,t,n){const r=this;return Xe(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=r.events[r.events.length-1];return!qe(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const NT={name:"setextUnderline",resolveTo:qU,tokenize:GU};function qU(e,t){let n=e.length,r,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function GU(e,t,n){const r=this;let a;return o;function o(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===a?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),qe(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ke(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const YU={tokenize:tz,partial:!0};function QU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ZU,continuation:{tokenize:JU},exit:ez}},text:{91:{name:"gfmFootnoteCall",tokenize:KU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WU,resolveTo:XU}}}}function WU(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=vr(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function XU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function KU(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(o>999||m===93&&!l||m===null||m===91||dt(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(vr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return dt(m)||(l=!0),o++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function ZU(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(l>999||_===93&&!c||_===null||_===91||dt(_))return n(_);if(_===93){e.exit("chunkString");const T=e.exit("gfmFootnoteDefinitionLabelString");return o=vr(r.sliceSerialize(T)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return dt(_)||(c=!0),l++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),l++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),a.includes(o)||a.push(o),Xe(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function JU(e,t,n){return e.check(Fu,t,e.attempt(YU,t,n))}function ez(e){e.exit("gfmFootnoteDefinition")}function tz(e,t,n){const r=this;return Xe(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function nz(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",p,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&qn(b,b.length,0,Xf(y,l.slice(f+1,d),c)),qn(b,b.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",p,c]]),qn(l,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,c,d){const f=this.previous,p=this.events;let m=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(l.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const T=ko(f);if(_===126)return m>1?d(_):(l.consume(_),m++,y);if(m<2&&!n)return d(_);const A=l.exit("strikethroughSequenceTemporary"),C=ko(_);return A._open=!C||C===2&&!!T,A._close=!T||T===2&&!!C,c(_)}}}class rz{constructor(){this.map=[]}add(t,n,r){iz(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const o of a)t.push(o);a=r.pop()}this.map.length=0}}function iz(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function az(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function sz(){return{flow:{null:{name:"table",tokenize:oz,resolveAll:lz}}}}function oz(e,t,n){const r=this;let a=0,o=0,l;return c;function c(z){let re=r.events.length-1;for(;re>-1;){const ue=r.events[re][1].type;if(ue==="lineEnding"||ue==="linePrefix")re--;else break}const W=re>-1?r.events[re][1].type:null,he=W==="tableHead"||W==="tableRow"?P:d;return he===P&&r.parser.lazy[r.now().line]?n(z):he(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(l=!0,o+=1),p(z)}function p(z){return z===null?n(z):ke(z)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):qe(z)?Xe(e,p,"whitespace")(z):(o+=1,l&&(l=!1,a+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),l=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||dt(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?b:m)}function b(z){return z===92||z===124?(e.consume(z),m):m(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),l=!1,qe(z)?Xe(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):_(z))}function _(z){return z===45||z===58?A(z):z===124?(l=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),T):O(z)}function T(z){return qe(z)?Xe(e,A,"whitespace")(z):A(z)}function A(z){return z===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(o+=1,C(z)):z===null||ke(z)?L(z):O(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),k(z)):O(z)}function k(z){return z===45?(e.consume(z),k):z===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(z))}function N(z){return qe(z)?Xe(e,L,"whitespace")(z):L(z)}function L(z){return z===124?_(z):z===null||ke(z)?!l||a!==o?O(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):O(z)}function O(z){return n(z)}function P(z){return e.enter("tableRow"),V(z)}function V(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),V):z===null||ke(z)?(e.exit("tableRow"),t(z)):qe(z)?Xe(e,V,"whitespace")(z):(e.enter("data"),G(z))}function G(z){return z===null||z===124||dt(z)?(e.exit("data"),V(z)):(e.consume(z),z===92?Z:G)}function Z(z){return z===92||z===124?(e.consume(z),G):G(z)}}function lz(e,t){let n=-1,r=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,p,m;const b=new rz;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(RT(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),a=_.type==="tableDelimiterRow"?2:p?3:1):a&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=vd(b,t,o,a,void 0,m),o=[0,0,0,0]),l[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=vd(b,t,o,a,void 0,m)),o=l,l=[o[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],m=vd(b,t,o,a,n,m)):l[1]!==0&&(m=vd(b,t,l,a,n,m)),a=0):a&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&RT(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=az(t.events,n))}return e}function vd(e,t,n,r,a,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=fo(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=fo(t.events,n[2]),p=fo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,T=n[3]-n[2]-1;e.add(_,T,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(o.end=Object.assign({},fo(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function RT(e,t,n,r,a){const o=[],l=fo(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const uz={name:"tasklistCheck",tokenize:dz};function cz(){return{text:{91:uz}}}function dz(e,t,n){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return dt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return ke(d)?t(d):qe(d)?e.check({tokenize:fz},t,n)(d):n(d)}}function fz(e,t,n){return Xe(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function hz(e){return $A([TF(),QU(),nz(e),sz(),cz()])}const pz={};function mz(e){const t=this,n=e||pz,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(hz(n)),o.push(bF()),l.push(yF(n))}var gz=Object.defineProperty,bz=Object.defineProperties,yz=Object.getOwnPropertyDescriptors,LT=Object.getOwnPropertySymbols,Ez=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable,OT=(e,t,n)=>t in e?gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ak=(e,t)=>{for(var n in t||(t={}))Ez.call(t,n)&&OT(e,n,t[n]);if(LT)for(var n of LT(t))vz.call(t,n)&&OT(e,n,t[n]);return e},sk=(e,t)=>bz(e,yz(t)),_z=/(\*\*)([^*]*\*?)$/,xz=/(__)([^_]*?)$/,Tz=/(\*\*\*)([^*]*?)$/,Sz=/(\*)([^*]*?)$/,Cz=/(_)([^_]*?)$/,wz=/(`)([^`]*?)$/,Az=/(~~)([^~]*?)$/,os=/^[\s_~*`]*$/,ok=/^[\s]*[-*+][\s]+$/,kz=/[\p{L}\p{N}_]/u,Nz=/^```[^`\n]*```?$/,Rz=/^\*{4,}$/,Lz=/(__)([^_]+)_$/,Oz=/(~~)([^~]+)~$/,Dz=/__/g,DT=/~~/g,pa=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:kz.test(e)},No=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Iz=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},lk=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Kf=(e,t)=>{let n=!1,r=!1;for(let a=0;a<e.length&&a<t;a+=1){if(e[a]==="\\"&&e[a+1]==="$"){a+=1;continue}e[a]==="$"&&(e[a+1]==="$"?(r=!r,a+=1,n=!1):r||(n=!n))}return n||r},Mz=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
1349
|
+
`)return!1}return!1},uk=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Mz(e,t):!1;if(e[n]===`
|
|
1350
|
+
`)return!1}return!1},Mb=(e,t,n)=>{let r=0;for(let d=t-1;d>=0;d-=1)if(e[d]===`
|
|
1351
|
+
`){r=d+1;break}let a=e.length;for(let d=t;d<e.length;d+=1)if(e[d]===`
|
|
1352
|
+
`){a=d;break}let o=e.substring(r,a),l=0,c=!1;for(let d of o)if(d===n)l+=1;else if(d!==" "&&d!==" "){c=!0;break}return l>=3&&!c},Pz=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let a=t-1;a>=0;a-=1)if(e[a]===`
|
|
1353
|
+
`){r=a+1;break}for(let a=r;a<t;a+=1)if(e[a]!==" "&&e[a]!==" ")return!1;return!0},Bz=(e,t,n,r)=>n==="\\"||e.includes("$")&&Kf(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&pa(n)&&pa(r)||Pz(e,t,r)),ck=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let a=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";Bz(e,r,a,o)||(t+=1)}return t},jz=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Kf(e,t)||uk(e,t)||n==="_"||r==="_"||n&&r&&pa(n)&&pa(r)),Hz=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let a=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";jz(e,r,a,o)||(t+=1)}return t},Fz=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},Uz=(e,t,n)=>{if(!t||os.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
1354
|
+
`),a=r===-1?0:r+1,o=e.substring(a,n);return ok.test(o)&&t.includes(`
|
|
1355
|
+
`)?!0:Mb(e,n,"*")},zz=e=>{let t=e.match(_z);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return No(e,r)||Uz(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},$z=(e,t,n)=>{if(!t||os.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
1356
|
+
`),a=r===-1?0:r+1,o=e.substring(a,n);return ok.test(o)&&t.includes(`
|
|
1357
|
+
`)?!0:Mb(e,n,"_")},Vz=e=>{let t=e.match(xz);if(!t){let a=e.match(Lz);if(a){let o=e.lastIndexOf(a[1]);if(!No(e,o)&&(e.match(Dz)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return No(e,r)||$z(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},qz=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Kf(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&pa(n)&&pa(r))continue;return t}return-1},Gz=e=>{if(!e.match(Sz))return e;let t=qz(e);if(t===-1||No(e,t))return e;let n=e.substring(t+1);return!n||os.test(n)?e:ck(e)%2===1?`${e}*`:e},dk=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Kf(e,t)&&!uk(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&pa(n)&&pa(r))continue;return t}return-1},Yz=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
1358
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Qz=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=dk(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Wz=e=>{if(!e.match(Cz))return e;let t=dk(e);if(t===-1||No(e,t))return e;let n=e.substring(t+1);if(!n||os.test(n))return e;if(Hz(e)%2===1){let r=Qz(e);return r!==null?r:Yz(e)}return e},Xz=e=>{let t=(e.match(/\*\*/g)||[]).length,n=ck(e);return t%2===0&&n%2===0},Kz=(e,t,n)=>!t||os.test(t)||No(e,n)?!0:Mb(e,n,"*"),Zz=e=>{if(Rz.test(e))return e;let t=e.match(Tz);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Kz(e,n,r)?e:Fz(e)%2===1?Xz(e)?e:`${e}***`:e},bf=(e,t)=>{let n=!1,r=!1;for(let a=0;a<t;a+=1){if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}!r&&e[a]==="`"&&(n=!n)}return n||r},Jz=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",a=t>1&&e.substring(t-2,t+1)==="```";return n||r||a},e$=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!Jz(e,n)&&(t+=1);return t},t$=e=>!e.match(Nz)||e.includes(`
|
|
1359
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,n$=e=>(e.match(/```/g)||[]).length%2===1,r$=e=>{let t=t$(e);if(t!==null)return t;let n=e.match(wz);if(n&&!n$(e)){let r=n[2];if(!r||os.test(r))return e;if(e$(e)%2===1)return`${e}\``}return e},i$=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",a$=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!i$(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},s$=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
1360
|
+
`,t)!==-1&&!e.endsWith(`
|
|
1361
|
+
`)?`${e}
|
|
1362
|
+
$$`:`${e}$$`},o$=e=>a$(e)%2===0?e:s$(e),l$=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Iz(e,t);if(r===-1||bf(e,r))return null;let a=r>0&&e[r-1]==="!",o=a?r-1:r,l=e.substring(0,o);if(a)return l;let c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},IT=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!bf(e,n)){if(n>0&&e[n-1]==="!")continue;let r=lk(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let a=e.indexOf(")",r+2);a!==-1&&(n=a)}}return-1},u$=(e,t,n)=>{let r=t>0&&e[t-1]==="!",a=r?t-1:t,o=e.substring(t+1);if(!o.includes("]")){let l=e.substring(0,a);if(r)return l;if(n==="text-only"){let c=IT(e,t);return c!==-1?e.substring(0,c)+e.substring(c+1):`${l}${o}`}return`${e}](streamdown:incomplete-link)`}if(lk(e,t)===-1){let l=e.substring(0,a);if(r)return l;if(n==="text-only"){let c=IT(e,t);if(c!==-1)return e.substring(0,c)+e.substring(c+1);let d=e.substring(t+1);return`${l}${d}`}return`${e}](streamdown:incomplete-link)`}return null},fk=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bf(e,n)){let r=l$(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bf(e,r)){let a=u$(e,r,t);if(a!==null)return a}return e},c$=/^-{1,2}$/,d$=/^[\s]*-{1,2}[\s]+$/,f$=/^={1,2}$/,h$=/^[\s]*={1,2}[\s]+$/,p$=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
1363
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),a=n.trim();if(c$.test(a)&&!n.match(d$)){let o=r.split(`
|
|
1364
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}if(f$.test(a)&&!n.match(h$)){let o=r.split(`
|
|
1365
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}return e},m$=e=>{let t=e.match(Az);if(t){let n=t[2];if(!n||os.test(n))return e;if((e.match(DT)||[]).length%2===1)return`${e}~~`}else if(e.match(Oz)&&(e.match(DT)||[]).length%2===1)return`${e}~`;return e},c0=e=>e!==!1,Un={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},g$=[{handler:{name:"setextHeadings",handle:p$,priority:Un.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:fk,priority:Un.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Zz,priority:Un.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:zz,priority:Un.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Vz,priority:Un.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Gz,priority:Un.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Wz,priority:Un.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:r$,priority:Un.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:m$,priority:Un.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:o$,priority:Un.KATEX},optionKey:"katex"}],b$=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return g$.filter(({handler:r,optionKey:a})=>r.name==="links"?c0(e?.links)||c0(e?.images):c0(e?.[a])).map(({handler:r,earlyReturn:a})=>r.name==="links"?{handler:sk(ak({},r),{handle:o=>fk(o,n)}),earlyReturn:n==="protocol"?a:void 0}:{handler:r,earlyReturn:a})},y$=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,a=b$(t),o=((n=t?.handlers)!=null?n:[]).map(c=>{var d;return{handler:sk(ak({},c),{priority:(d=c.priority)!=null?d:Un.DEFAULT}),earlyReturn:void 0}}),l=[...a,...o].sort((c,d)=>{var f,p;return((f=c.handler.priority)!=null?f:Un.DEFAULT)-((p=d.handler.priority)!=null?p:Un.DEFAULT)});for(let{handler:c,earlyReturn:d}of l)if(r=c.handle(r),d!=null&&d(r))return r;return r},E$=y$;function hk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=hk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function v$(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=hk(e))&&(r&&(r+=" "),r+=t);return r}const _$=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},x$=(e,t)=>({classGroupId:e,validator:t}),pk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yf="-",MT=[],T$="arbitrary..",S$=e=>{const t=w$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return C$(l);const c=l.split(yf),d=c[0]===""&&c.length>1?1:0;return mk(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],f=n[l];return d?f?_$(f,d):d:f||MT}return n[l]||MT}}},mk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],o=n.nextPart.get(a);if(o){const f=mk(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(yf):e.slice(t).join(yf),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},C$=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?T$+r:void 0})(),w$=e=>{const{theme:t,classGroups:n}=e;return A$(n,t)},A$=(e,t)=>{const n=pk();for(const r in e){const a=e[r];Pb(a,n,r,t)}return n},Pb=(e,t,n,r)=>{const a=e.length;for(let o=0;o<a;o++){const l=e[o];k$(l,t,n,r)}},k$=(e,t,n,r)=>{if(typeof e=="string"){N$(e,t,n);return}if(typeof e=="function"){R$(e,t,n,r);return}L$(e,t,n,r)},N$=(e,t,n)=>{const r=e===""?t:gk(t,e);r.classGroupId=n},R$=(e,t,n,r)=>{if(O$(e)){Pb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(x$(n,e))},L$=(e,t,n,r)=>{const a=Object.entries(e),o=a.length;for(let l=0;l<o;l++){const[c,d]=a[l];Pb(d,gk(t,c),n,r)}},gk=(e,t)=>{let n=e;const r=t.split(yf),a=r.length;for(let o=0;o<a;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=pk(),n.nextPart.set(l,c)),n=c}return n},O$=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,D$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return a(o,l),l},set(o,l){o in n?n[o]=l:a(o,l)}}},Sg="!",PT=":",I$=[],BT=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),M$=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];let l=0,c=0,d=0,f;const p=a.length;for(let T=0;T<p;T++){const A=a[T];if(l===0&&c===0){if(A===PT){o.push(a.slice(d,T)),d=T+1;continue}if(A==="/"){f=T;continue}}A==="["?l++:A==="]"?l--:A==="("?c++:A===")"&&c--}const m=o.length===0?a:a.slice(d);let b=m,y=!1;m.endsWith(Sg)?(b=m.slice(0,-1),y=!0):m.startsWith(Sg)&&(b=m.slice(1),y=!0);const _=f&&f>d?f-d:void 0;return BT(o,y,b,_)};if(t){const a=t+PT,o=r;r=l=>l.startsWith(a)?o(l.slice(a.length)):BT(I$,!1,l,void 0,!0)}if(n){const a=r;r=o=>n({className:o,parseClassName:a})}return r},P$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",d=t.has(l);c||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},B$=e=>({cache:D$(e.cacheSize),parseClassName:M$(e),sortModifiers:P$(e),...S$(e)}),j$=/\s+/,H$=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],c=e.trim().split(j$);let d="";for(let f=c.length-1;f>=0;f-=1){const p=c[f],{isExternal:m,modifiers:b,hasImportantModifier:y,baseClassName:_,maybePostfixModifierPosition:T}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let A=!!T,C=r(A?_.substring(0,T):_);if(!C){if(!A){d=p+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=p+(d.length>0?" "+d:d);continue}A=!1}const k=b.length===0?"":b.length===1?b[0]:o(b).join(":"),N=y?k+Sg:k,L=N+C;if(l.indexOf(L)>-1)continue;l.push(L);const O=a(C,A);for(let P=0;P<O.length;++P){const V=O[P];l.push(N+V)}d=p+(d.length>0?" "+d:d)}return d},F$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=bk(n))&&(a&&(a+=" "),a+=r);return a},bk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bk(e[r]))&&(n&&(n+=" "),n+=t);return n},U$=(e,...t)=>{let n,r,a,o;const l=d=>{const f=t.reduce((p,m)=>m(p),e());return n=B$(f),r=n.cache.get,a=n.cache.set,o=c,c(d)},c=d=>{const f=r(d);if(f)return f;const p=H$(d,n);return a(d,p),p};return o=l,(...d)=>o(F$(...d))},z$=[],jt=e=>{const t=n=>n[e]||z$;return t.isThemeGetter=!0,t},yk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ek=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$$=/^\d+\/\d+$/,V$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,q$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,G$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Y$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Q$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,so=e=>$$.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Ki=e=>!!e&&Number.isInteger(Number(e)),d0=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),hi=e=>V$.test(e),W$=()=>!0,X$=e=>q$.test(e)&&!G$.test(e),vk=()=>!1,K$=e=>Y$.test(e),Z$=e=>Q$.test(e),J$=e=>!xe(e)&&!Te(e),eV=e=>zo(e,Tk,vk),xe=e=>yk.test(e),Ha=e=>zo(e,Sk,X$),f0=e=>zo(e,aV,Fe),jT=e=>zo(e,_k,vk),tV=e=>zo(e,xk,Z$),_d=e=>zo(e,Ck,K$),Te=e=>Ek.test(e),$l=e=>$o(e,Sk),nV=e=>$o(e,sV),HT=e=>$o(e,_k),rV=e=>$o(e,Tk),iV=e=>$o(e,xk),xd=e=>$o(e,Ck,!0),zo=(e,t,n)=>{const r=yk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$o=(e,t,n=!1)=>{const r=Ek.exec(e);return r?r[1]?t(r[1]):n:!1},_k=e=>e==="position"||e==="percentage",xk=e=>e==="image"||e==="url",Tk=e=>e==="length"||e==="size"||e==="bg-size",Sk=e=>e==="length",aV=e=>e==="number",sV=e=>e==="family-name",Ck=e=>e==="shadow",oV=()=>{const e=jt("color"),t=jt("font"),n=jt("text"),r=jt("font-weight"),a=jt("tracking"),o=jt("leading"),l=jt("breakpoint"),c=jt("container"),d=jt("spacing"),f=jt("radius"),p=jt("shadow"),m=jt("inset-shadow"),b=jt("text-shadow"),y=jt("drop-shadow"),_=jt("blur"),T=jt("perspective"),A=jt("aspect"),C=jt("ease"),k=jt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...L(),Te,xe],P=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],G=()=>[Te,xe,d],Z=()=>[so,"full","auto",...G()],z=()=>[Ki,"none","subgrid",Te,xe],re=()=>["auto",{span:["full",Ki,Te,xe]},Ki,Te,xe],W=()=>[Ki,"auto",Te,xe],he=()=>["auto","min","max","fr",Te,xe],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...G()],Q=()=>[so,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],X=()=>[e,Te,xe],Ee=()=>[...L(),HT,jT,{position:[Te,xe]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",rV,eV,{size:[Te,xe]}],ae=()=>[d0,$l,Ha],D=()=>["","none","full",f,Te,xe],fe=()=>["",Fe,$l,Ha],we=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[Fe,d0,HT,jT],je=()=>["","none",_,Te,xe],ze=()=>["none",Fe,Te,xe],yt=()=>["none",Fe,Te,xe],Xt=()=>[Fe,Te,xe],fn=()=>[so,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[W$],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[J$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hi],shadow:[hi],spacing:["px",Fe],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",so,xe,Te,A]}],container:["container"],columns:[{columns:[Fe,xe,Te,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ki,"auto",Te,xe]}],basis:[{basis:[so,"full","auto",c,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,so,"auto","initial","none",xe]}],grow:[{grow:["",Fe,Te,xe]}],shrink:[{shrink:["",Fe,Te,xe]}],order:[{order:[Ki,"first","last","none",Te,xe]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[c,"screen",...Q()]}],"min-w":[{"min-w":[c,"screen","none",...Q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",n,$l,Ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,f0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",d0,xe]}],"font-family":[{font:[nV,xe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Te,xe]}],"line-clamp":[{"line-clamp":[Fe,"none",Te,f0]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",Te,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Te,Ha]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[Fe,"auto",Te,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ee()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ki,Te,xe],radial:["",Te,xe],conic:[Ki,Te,xe]},iV,tV]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Te,xe]}],"outline-w":[{outline:["",Fe,$l,Ha]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",p,xd,_d]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",m,xd,_d]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[Fe,Ha]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",b,xd,_d]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[Fe,Te,xe]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[Te,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ee()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,xe]}],filter:[{filter:["","none",Te,xe]}],blur:[{blur:je()}],brightness:[{brightness:[Fe,Te,xe]}],contrast:[{contrast:[Fe,Te,xe]}],"drop-shadow":[{"drop-shadow":["","none",y,xd,_d]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",Fe,Te,xe]}],"hue-rotate":[{"hue-rotate":[Fe,Te,xe]}],invert:[{invert:["",Fe,Te,xe]}],saturate:[{saturate:[Fe,Te,xe]}],sepia:[{sepia:["",Fe,Te,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,xe]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Te,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Te,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Te,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Te,xe]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Te,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Te,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Te,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Te,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Te,xe]}],ease:[{ease:["linear","initial",C,Te,xe]}],delay:[{delay:[Fe,Te,xe]}],animate:[{animate:["none",k,Te,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,Te,xe]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:yt()}],"scale-x":[{"scale-x":yt()}],"scale-y":[{"scale-y":yt()}],"scale-z":[{"scale-z":yt()}],"scale-3d":["scale-3d"],skew:[{skew:Xt()}],"skew-x":[{"skew-x":Xt()}],"skew-y":[{"skew-y":Xt()}],transform:[{transform:[Te,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fn()}],"translate-x":[{"translate-x":fn()}],"translate-y":[{"translate-y":fn()}],"translate-z":[{"translate-z":fn()}],"translate-none":["translate-none"],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,xe]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[Fe,$l,Ha,f0]}],stroke:[{stroke:["none",...X()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},lV=U$(oV),uV=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cV=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dV={};function FT(e,t){return(dV.jsx?cV:uV).test(e)}var oo={},h0,UT;function fV(){if(UT)return h0;UT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
1366
|
+
`,f="/",p="*",m="",b="comment",y="declaration";function _(A,C){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];C=C||{};var k=1,N=1;function L(ue){var se=ue.match(t);se&&(k+=se.length);var B=ue.lastIndexOf(d);N=~B?ue.length-B:N+ue.length}function O(){var ue={line:k,column:N};return function(se){return se.position=new P(ue),Z(),se}}function P(ue){this.start=ue,this.end={line:k,column:N},this.source=C.source}P.prototype.content=A;function V(ue){var se=new Error(C.source+":"+k+":"+N+": "+ue);if(se.reason=ue,se.filename=C.source,se.line=k,se.column=N,se.source=A,!C.silent)throw se}function G(ue){var se=ue.exec(A);if(se){var B=se[0];return L(B),A=A.slice(B.length),se}}function Z(){G(n)}function z(ue){var se;for(ue=ue||[];se=re();)se!==!1&&ue.push(se);return ue}function re(){var ue=O();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var se=2;m!=A.charAt(se)&&(p!=A.charAt(se)||f!=A.charAt(se+1));)++se;if(se+=2,m===A.charAt(se-1))return V("End of comment missing");var B=A.slice(2,se-2);return N+=2,L(B),A=A.slice(se),N+=2,ue({type:b,comment:B})}}function W(){var ue=O(),se=G(r);if(se){if(re(),!G(a))return V("property missing ':'");var B=G(o),Q=ue({type:y,property:T(se[0].replace(e,m)),value:B?T(B[0].replace(e,m)):m});return G(l),Q}}function he(){var ue=[];z(ue);for(var se;se=W();)se!==!1&&(ue.push(se),z(ue));return ue}return Z(),he()}function T(A){return A?A.replace(c,m):m}return h0=_,h0}var zT;function hV(){if(zT)return oo;zT=1;var e=oo&&oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oo,"__esModule",{value:!0}),oo.default=n;const t=e(fV());function n(r,a){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?a(f,p,d):p&&(o=o||{},o[f]=p)}),o}return oo}var Vl={},$T;function pV(){if($T)return Vl;$T=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},l=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),o(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(a,c):f=f.replace(r,c),f.replace(t,l))};return Vl.camelCase=d,Vl}var ql,VT;function mV(){if(VT)return ql;VT=1;var e=ql&&ql.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(hV()),n=pV();function r(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(c,d){c&&d&&(l[(0,n.camelCase)(c,o)]=d)}),l}return r.default=r,ql=r,ql}var gV=mV();const bV=Au(gV);function cu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qT(e.position):"start"in e||"end"in e?qT(e):"line"in e||"column"in e?Cg(e):""}function Cg(e){return GT(e&&e.line)+":"+GT(e&&e.column)}function qT(e){return Cg(e&&e.start)+"-"+Cg(e&&e.end)}function GT(e){return e&&typeof e=="number"?e:1}class dn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=cu(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dn.prototype.file="";dn.prototype.name="";dn.prototype.reason="";dn.prototype.message="";dn.prototype.stack="";dn.prototype.column=void 0;dn.prototype.line=void 0;dn.prototype.ancestors=void 0;dn.prototype.cause=void 0;dn.prototype.fatal=void 0;dn.prototype.place=void 0;dn.prototype.ruleId=void 0;dn.prototype.source=void 0;const Bb={}.hasOwnProperty,yV=new Map,EV=/[A-Z]/g,vV=new Set(["table","tbody","thead","tfoot","tr"]),_V=new Set(["td","th"]),wk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xV(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=RV(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=NV(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Fr:Oo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ak(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Ak(e,t,n){if(t.type==="element")return TV(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return SV(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wV(e,t,n);if(t.type==="mdxjsEsm")return CV(e,t);if(t.type==="root")return AV(e,t,n);if(t.type==="text")return kV(e,t)}function TV(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Fr,e.schema=a),e.ancestors.push(t);const o=Nk(e,t.tagName,!1),l=LV(e,t);let c=Hb(e,t);return vV.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Sf(d):!0})),kk(e,l,o,t),jb(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function SV(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wu(e,t.position)}function CV(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wu(e,t.position)}function wV(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Fr,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Nk(e,t.name,!0),l=OV(e,t),c=Hb(e,t);return kk(e,l,o,t),jb(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function AV(e,t,n){const r={};return jb(r,Hb(e,t)),e.create(t,e.Fragment,r,n)}function kV(e,t){return t.value}function kk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jb(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function NV(e,t,n){return r;function r(a,o,l,c){const f=Array.isArray(l.children)?n:t;return c?f(o,l,c):f(o,l)}}function RV(e,t){return n;function n(r,a,o,l){const c=Array.isArray(o.children),d=zr(r);return t(a,o,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function LV(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Bb.call(t.properties,a)){const o=DV(e,a,t.properties[a]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&_V.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function OV(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else wu(e,t.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else wu(e,t.position);else o=r.value===null?!0:r.value;n[a]=o}return n}function Hb(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:yV;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const f=a.get(d)||0;l=d+"-"+f,a.set(d,f+1)}}const c=Ak(e,o,l);c!==void 0&&n.push(c)}return n}function DV(e,t,n){const r=Lu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?qg(n):Gg(n)),r.property==="style"){let a=typeof n=="object"?n:IV(e,String(n));return e.stylePropertyNameCase==="css"&&(a=MV(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?KO[r.property]||r.property:r.attribute,n]}}function IV(e,t){try{return bV(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new dn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=wk+"#cannot-parse-style-attribute",a}}function Nk(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const c=FT(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=FT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Bb.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);wu(e)}function wu(e,t){const n=new dn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=wk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function MV(e){const t={};let n;for(n in e)Bb.call(e,n)&&(t[PV(n)]=e[n]);return t}function PV(e){let t=e.replace(EV,BV);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BV(e){return"-"+e.toLowerCase()}const jV={tokenize:HV};function HV(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ke(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const FV={tokenize:UV},YT={tokenize:zV};function UV(e){const t=this,n=[];let r=0,a,o,l;return c;function c(N){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,d,f)(N)}return f(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&k();const L=t.events.length;let O=L,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}C(r);let V=L;for(;V<t.events.length;)t.events[V][1].end={...P},V++;return qn(t.events,O+1,0,t.events.slice(L)),t.events.length=V,f(N)}return c(N)}function f(N){if(r===n.length){if(!a)return b(N);if(a.currentConstruct&&a.currentConstruct.concrete)return _(N);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(YT,p,m)(N)}function p(N){return a&&k(),C(r),b(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,_(N)}function b(N){return t.containerState={},e.attempt(YT,y,_)(N)}function y(N){return r++,n.push([t.currentConstruct,t.containerState]),b(N)}function _(N){if(N===null){a&&k(),C(0),e.consume(N);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),T(N)}function T(N){if(N===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(N);return}return ke(N)?(e.consume(N),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),T)}function A(N,L){const O=t.sliceStream(N);if(L&&O.push(null),N.previous=o,o&&(o.next=N),o=N,a.defineSkip(N.start),a.write(O),t.parser.lazy[N.start.line]){let P=a.events.length;for(;P--;)if(a.events[P][1].start.offset<l&&(!a.events[P][1].end||a.events[P][1].end.offset>l))return;const V=t.events.length;let G=V,Z,z;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(Z){z=t.events[G][1].end;break}Z=!0}for(C(r),P=V;P<t.events.length;)t.events[P][1].end={...z},P++;qn(t.events,G+1,0,t.events.slice(V)),t.events.length=P}}function C(N){let L=n.length;for(;L-- >N;){const O=n[L];t.containerState=O[1],O[0].exit.call(t,e)}n.length=N}function k(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function zV(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const $V={tokenize:VV};function VV(e){const t=this,n=e.attempt(Fu,r,e.attempt(this.parser.constructs.flowInitial,a,Xe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(JF,a)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qV={resolveAll:Lk()},GV=Rk("string"),YV=Rk("text");function Rk(e){return{resolveAll:Lk(e==="text"?QV:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],o=n.attempt(a,l,c);return l;function l(p){return f(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=a[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Lk(e){return t;function t(n,r){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,r):n}}function QV(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let o=a.length,l=-1,c=0,d;for(;o--;){const f=a[o];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const WV={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:ZA},XV={91:iU},KV={[-2]:l0,[-1]:l0,32:l0},ZV={35:cU,42:jd,45:[NT,jd],60:pU,61:NT,95:jd,96:AT,126:AT},JV={38:ek,92:JA},eq={[-5]:u0,[-4]:u0,[-3]:u0,33:OU,38:ek,42:Tg,60:[IF,_U],91:IU,92:[lU,JA],93:Ib,95:Tg,96:YF},tq={null:[Tg,qV]},nq={null:[42,95]},rq={null:[]},iq=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nq,contentInitial:XV,disable:rq,document:WV,flow:ZV,flowInitial:KV,insideSpan:tq,string:JV,text:eq},Symbol.toStringTag,{value:"Module"}));function aq(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],c=[];const d={attempt:V(O),check:V(P),consume:k,enter:N,exit:L,interrupt:V(P,{interrupt:!0})},f={code:null,containerState:{},defineSkip:T,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&o.push(t),f;function m(re){return l=sr(l,re),A(),l[l.length-1]!==null?[]:(G(t,0),f.events=Xf(o,f.events,f),f.events)}function b(re,W){return oq(y(re),W)}function y(re){return sq(l,re)}function _(){const{_bufferIndex:re,_index:W,line:he,column:ue,offset:se}=r;return{_bufferIndex:re,_index:W,line:he,column:ue,offset:se}}function T(re){a[re.line]=re.column,z()}function A(){let re;for(;r._index<l.length;){const W=l[r._index];if(typeof W=="string")for(re=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===re&&r._bufferIndex<W.length;)C(W.charCodeAt(r._bufferIndex));else C(W)}}function C(re){p=p(re)}function k(re){ke(re)?(r.line++,r.column=1,r.offset+=re===-3?2:1,z()):re!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=re}function N(re,W){const he=W||{};return he.type=re,he.start=_(),f.events.push(["enter",he,f]),c.push(he),he}function L(re){const W=c.pop();return W.end=_(),f.events.push(["exit",W,f]),W}function O(re,W){G(re,W.from)}function P(re,W){W.restore()}function V(re,W){return he;function he(ue,se,B){let Q,X,Ee,H;return Array.isArray(ue)?ae(ue):"tokenize"in ue?ae([ue]):$(ue);function $(Se){return ve;function ve(je){const ze=je!==null&&Se[je],yt=je!==null&&Se.null,Xt=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(yt)?yt:yt?[yt]:[]];return ae(Xt)(je)}}function ae(Se){return Q=Se,X=0,Se.length===0?B:D(Se[X])}function D(Se){return ve;function ve(je){return H=Z(),Ee=Se,Se.partial||(f.currentConstruct=Se),Se.name&&f.parser.constructs.disable.null.includes(Se.name)?we():Se.tokenize.call(W?Object.assign(Object.create(f),W):f,d,fe,we)(je)}}function fe(Se){return re(Ee,H),se}function we(Se){return H.restore(),++X<Q.length?D(Q[X]):B}}}function G(re,W){re.resolveAll&&!o.includes(re)&&o.push(re),re.resolve&&qn(f.events,W,f.events.length-W,re.resolve(f.events.slice(W),f)),re.resolveTo&&(f.events=re.resolveTo(f.events,f))}function Z(){const re=_(),W=f.previous,he=f.currentConstruct,ue=f.events.length,se=Array.from(c);return{from:ue,restore:B};function B(){r=re,f.previous=W,f.currentConstruct=he,f.events.length=ue,c=se,z()}}function z(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function sq(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(r,o)];else{if(l=e.slice(n,a),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function oq(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
1367
|
+
`;break}case-3:{l=`\r
|
|
1368
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,r.push(l)}return r.join("")}function lq(e){const r={constructs:$A([iq,...(e||{}).extensions||[]]),content:a(jV),defined:[],document:a(FV),flow:a($V),lazy:{},string:a(GV),text:a(YV)};return r;function a(o){return l;function l(c){return aq(r,o,c)}}}function uq(e){for(;!tk(e););return e}const QT=/[\0\t\n\r]/g;function cq(){let e=1,t="",n=!0,r;return a;function a(o,l,c){const d=[];let f,p,m,b,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(QT.lastIndex=m,f=QT.exec(o),b=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(b),!f){t=o.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(o.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Ok={}.hasOwnProperty;function dq(e,t,n){return typeof t!="string"&&(n=t,t=void 0),fq(n)(uq(lq(n).document().write(cq()(e,t,!0))))}function fq(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ln),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:o(Ci),blockQuote:o(yt),characterEscape:Z,characterReference:Z,codeFenced:o(Xt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Xt,l),codeText:o(fn,l),codeTextData:Z,data:Z,codeFlowValue:Z,definition:o(dr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Gn),hardBreakEscape:o(Vr),hardBreakTrailing:o(Vr),htmlFlow:o(hn,l),htmlFlowData:Z,htmlText:o(hn,l),htmlTextData:Z,image:o(Kt),label:l,link:o(Ln),listItem:o(vn),listItemValue:b,listOrdered:o(En,m),listUnordered:o(En),paragraph:o(qr),reference:D,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Ci),strong:o(fr),thematicBreak:o($u)},exit:{atxHeading:d(),atxHeadingSequence:O,autolink:d(),autolinkEmail:ze,autolinkProtocol:je,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:Se,characterReference:ve,codeFenced:d(A),codeFencedFence:T,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:z,codeIndented:d(C),codeText:d(se),codeTextData:z,data:z,definition:d(),definitionDestinationString:L,definitionLabelString:k,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(he),htmlFlowData:z,htmlText:d(ue),htmlTextData:z,image:d(Q),label:Ee,labelText:X,lineEnding:re,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:fe,resourceDestinationString:H,resourceTitleString:$,resource:ae,setextHeading:d(G),setextHeadingLineSequence:V,setextHeadingText:P,strong:d(),thematicBreak:d()}};Dk(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let ye={type:"root",children:[]};const Ne={stack:[ye],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:p,data:n},Me=[];let Ke=-1;for(;++Ke<le.length;)if(le[Ke][1].type==="listOrdered"||le[Ke][1].type==="listUnordered")if(le[Ke][0]==="enter")Me.push(Ke);else{const xt=Me.pop();Ke=a(le,xt,Ke)}for(Ke=-1;++Ke<le.length;){const xt=t[le[Ke][0]];Ok.call(xt,le[Ke][1].type)&&xt[le[Ke][1].type].call(Object.assign({sliceSerialize:le[Ke][2].sliceSerialize},Ne),le[Ke][1])}if(Ne.tokenStack.length>0){const xt=Ne.tokenStack[Ne.tokenStack.length-1];(xt[1]||WT).call(Ne,void 0,xt[0])}for(ye.position={start:Zi(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Zi(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<t.transforms.length;)ye=t.transforms[Ke](ye)||ye;return ye}function a(le,ye,Ne){let Me=ye-1,Ke=-1,xt=!1,hr,Zt,Tt,St;for(;++Me<=Ne;){const rt=le[Me];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?Ke++:Ke--,St=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(hr&&!St&&!Ke&&!Tt&&(Tt=Me),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!Ke&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||Ke===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(hr){let Sr=Me;for(Zt=void 0;Sr--;){const On=le[Sr];if(On[1].type==="lineEnding"||On[1].type==="lineEndingBlank"){if(On[0]==="exit")continue;Zt&&(le[Zt][1].type="lineEndingBlank",xt=!0),On[1].type="lineEnding",Zt=Sr}else if(!(On[1].type==="linePrefix"||On[1].type==="blockQuotePrefix"||On[1].type==="blockQuotePrefixWhitespace"||On[1].type==="blockQuoteMarker"||On[1].type==="listItemIndent"))break}Tt&&(!Zt||Tt<Zt)&&(hr._spread=!0),hr.end=Object.assign({},Zt?le[Zt][1].start:rt[1].end),le.splice(Zt||Me,0,["exit",hr,rt[2]]),Me++,Ne++}if(rt[1].type==="listItemPrefix"){const Sr={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};hr=Sr,le.splice(Me,0,["enter",Sr,rt[2]]),Me++,Ne++,Tt=void 0,St=!0}}}return le[ye][1]._spread=xt,Ne}function o(le,ye){return Ne;function Ne(Me){c.call(this,le(Me),Me),ye&&ye.call(this,Me)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(le,ye,Ne){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([ye,Ne||void 0]),le.position={start:Zi(ye.start),end:void 0}}function d(le){return ye;function ye(Ne){le&&le.call(this,Ne),f.call(this,Ne)}}function f(le,ye){const Ne=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==le.type&&(ye?ye.call(this,le,Me[0]):(Me[1]||WT).call(this,le,Me[0]));else throw new Error("Cannot close `"+le.type+"` ("+cu({start:le.start,end:le.end})+"): it’s not open");Ne.position.end=Zi(le.end)}function p(){return Rb(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(le){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function y(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=le}function _(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=le}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.value=le.replace(/(\r?\n|\r)$/g,"")}function k(le){const ye=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ye,Ne.identifier=vr(this.sliceSerialize(le)).toLowerCase()}function N(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.title=le}function L(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.url=le}function O(le){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Ne=this.sliceSerialize(le).length;ye.depth=Ne}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function V(le){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(le){const Ne=this.stack[this.stack.length-1].children;let Me=Ne[Ne.length-1];(!Me||Me.type!=="text")&&(Me=Pt(),Me.position={start:Zi(le.start),end:void 0},Ne.push(Me)),this.stack.push(Me)}function z(le){const ye=this.stack.pop();ye.value+=this.sliceSerialize(le),ye.position.end=Zi(le.end)}function re(le){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=ye.children[ye.children.length-1];Ne.position.end=Zi(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(Z.call(this,le),z.call(this,le))}function W(){this.data.atHardBreak=!0}function he(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.value=le}function ue(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.value=le}function se(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.value=le}function B(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ye,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function Q(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ye,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function X(le){const ye=this.sliceSerialize(le),Ne=this.stack[this.stack.length-2];Ne.label=iF(ye),Ne.identifier=vr(ye).toLowerCase()}function Ee(){const le=this.stack[this.stack.length-1],ye=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const Me=le.children;Ne.children=Me}else Ne.alt=ye}function H(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.url=le}function $(){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.title=le}function ae(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function fe(le){const ye=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ye,Ne.identifier=vr(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function we(le){this.data.characterReferenceType=le.type}function Se(le){const ye=this.sliceSerialize(le),Ne=this.data.characterReferenceType;let Me;Ne?(Me=zA(ye,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Ob(ye);const Ke=this.stack[this.stack.length-1];Ke.value+=Me}function ve(le){const ye=this.stack.pop();ye.position.end=Zi(le.end)}function je(le){z.call(this,le);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(le)}function ze(le){z.call(this,le);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(le)}function yt(){return{type:"blockquote",children:[]}}function Xt(){return{type:"code",lang:null,meta:null,value:""}}function fn(){return{type:"inlineCode",value:""}}function dr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gn(){return{type:"emphasis",children:[]}}function Ci(){return{type:"heading",depth:0,children:[]}}function Vr(){return{type:"break"}}function hn(){return{type:"html",value:""}}function Kt(){return{type:"image",title:null,url:"",alt:null}}function Ln(){return{type:"link",title:null,url:"",children:[]}}function En(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function vn(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function qr(){return{type:"paragraph",children:[]}}function fr(){return{type:"strong",children:[]}}function Pt(){return{type:"text",value:""}}function $u(){return{type:"thematicBreak"}}}function Zi(e){return{line:e.line,column:e.column,offset:e.offset}}function Dk(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dk(e,r):hq(e,r)}}function hq(e,t){let n;for(n in t)if(Ok.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function WT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cu({start:t.start,end:t.end})+") is still open")}function pq(e){const t=this;t.parser=n;function n(r){return dq(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mq(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gq(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
1369
|
+
`}]}function bq(e,t){const n=t.value?t.value+`
|
|
1370
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function yq(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eq(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vq(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Uo(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function _q(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ik(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function Tq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ik(e,t);const a={src:Uo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function Sq(e,t){const n={src:Uo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Cq(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function wq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ik(e,t);const a={href:Uo(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Aq(e,t){const n={href:Uo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kq(e,t,n){const r=e.all(t),a=n?Nq(n):Mk(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(a||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
1371
|
+
`}),p.type==="element"&&p.tagName==="p"&&!a?l.push(...p.children):l.push(p)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
1372
|
+
`});const f={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,f),e.applyData(t,f)}function Nq(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Mk(n[r])}return t}function Mk(e){const t=e.spread;return t??e.children.length>1}function Rq(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Lq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Dq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iq(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=zr(t.children[1]),d=Qf(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function Mq(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=l?l[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:o,properties:b,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function Pq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const XT=9,KT=32;function Bq(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(ZT(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(ZT(t.slice(a),a>0,!1)),o.join("")}function ZT(e,t,n){let r=0,a=e.length;if(t){let o=e.codePointAt(r);for(;o===XT||o===KT;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(a-1);for(;o===XT||o===KT;)a--,o=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function jq(e,t){const n={type:"text",value:Bq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Fq={blockquote:mq,break:gq,code:bq,delete:yq,emphasis:Eq,footnoteReference:vq,heading:_q,html:xq,imageReference:Tq,image:Sq,inlineCode:Cq,linkReference:wq,link:Aq,listItem:kq,list:Rq,paragraph:Lq,root:Oq,strong:Dq,table:Iq,tableCell:Pq,tableRow:Mq,text:jq,thematicBreak:Hq,toml:Td,yaml:Td,definition:Td,footnoteDefinition:Td};function Td(){}function Uq(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $q(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Uq,r=e.options.footnoteBackLabel||zq,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=Uo(m.toLowerCase());let y=0;const _=[],T=e.footnoteCounts.get(m);for(;T!==void 0&&++y<=T;){_.length>0&&_.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ts(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
1373
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
1374
|
+
`}]}}const wg={}.hasOwnProperty,Vq={};function qq(e,t){const n=t||Vq,r=new Map,a=new Map,o=new Map,l={...Fq,...n.handlers},c={all:f,applyData:Yq,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:Gq,wrap:Wq};return wo(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:a,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(wg.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const{children:T,...A}=p,C=ts(A);return C.children=c.all(p),C}return ts(p)}return(c.options.unknownHandler||Qq)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=JT(_.value)),!Array.isArray(_)&&_.type==="element")){const T=_.children[0];T&&T.type==="text"&&(T.value=JT(T.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function Gq(e,t){e.position&&(t.position=yA(e))}function Yq(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,ts(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Qq(e,t){const n=t.data||{},r="value"in t&&!(wg.call(n,"hProperties")||wg.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wq(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
1375
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
1376
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
1377
|
+
`}),n}function JT(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function e2(e,t){const n=qq(e,t),r=n.one(e,void 0),a=$q(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
1378
|
+
`},a),o}function Xq(e,t){return e&&"run"in e?async function(n,r){const a=e2(n,{file:r,...t});await e.run(a,r)}:function(n,r){return e2(n,{file:r,...e||t})}}function t2(e){if(e)throw e}var p0,n2;function Kq(){if(n2)return p0;n2=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},l=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return p0=function d(){var f,p,m,b,y,_,T=arguments[0],A=1,C=arguments.length,k=!1;for(typeof T=="boolean"&&(k=T,T=arguments[1]||{},A=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});A<C;++A)if(f=arguments[A],f!=null)for(p in f)m=c(T,p),b=c(f,p),T!==b&&(k&&b&&(o(b)||(y=a(b)))?(y?(y=!1,_=m&&a(m)?m:[]):_=m&&o(m)?m:{},l(T,{name:p,newValue:d(k,_,b)})):typeof b<"u"&&l(T,{name:p,newValue:b}));return T},p0}var Zq=Kq();const m0=Au(Zq);function Ag(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jq(){const e=[],t={run:n,use:r};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(d,...f){const p=e[++o];let m=-1;if(d){l(d);return}for(;++m<a.length;)(f[m]===null||f[m]===void 0)&&(f[m]=a[m]);a=f,p?eG(p,c)(...f):l(null,...f)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function eG(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(a);try{d=e.apply(this,l)}catch(f){const p=f;if(c&&n)throw p;return a(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(l,...c){n||(n=!0,t(l,...c))}function o(l){a(null,l)}}const Lr={basename:tG,dirname:nG,extname:rG,join:iG,sep:"/"};function tG(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Uu(e);let n=0,r=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else r<0&&(o=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(r=a):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function nG(e){if(Uu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function rG(e){Uu(e);let t=e.length,n=-1,r=0,a=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function iG(...e){let t=-1,n;for(;++t<e.length;)Uu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aG(n)}function aG(e){Uu(e);const t=e.codePointAt(0)===47;let n=sG(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sG(e,t){let n="",r=0,a=-1,o=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",r=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function Uu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oG={cwd:lG};function lG(){return"/"}function kg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uG(e){if(typeof e=="string")e=new URL(e);else if(!kg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return cG(e)}function cG(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const g0=["history","path","basename","stem","extname","dirname"];class dG{constructor(t){let n;t?kg(t)?n={path:t}:typeof t=="string"||fG(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":oG.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<g0.length;){const o=g0[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)g0.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){y0(t,"basename"),b0(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){r2(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(b0(t,"extname"),r2(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kg(t)&&(t=uG(t)),y0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){y0(t,"stem"),b0(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new dn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function b0(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function y0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function r2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function fG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hG=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),pG={}.hasOwnProperty;class Fb extends hG{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Jq()}copy(){const t=new Fb;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(m0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(_0("data",this.frozen),this.namespace[t]=n,this):pG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Sd(t),r=this.parser||this.Parser;return E0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),E0("process",this.parser||this.Parser),v0("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const c=Sd(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,_=r.stringify(y,b);bG(_)?b.value=_:b.result=_,f(p,b)});function f(p,m){p||!m?l(p):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),E0("processSync",this.parser||this.Parser),v0("processSync",this.compiler||this.Compiler),this.process(t,a),a2("processSync","process",n),r;function a(o,l){n=!0,t2(o),r=l}}run(t,n,r){i2(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const d=Sd(n);a.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,o),a2("runSync","run",r),a;function o(l,c){t2(l),a=c,r=!0}}stringify(t,n){this.freeze();const r=Sd(n),a=this.compiler||this.Compiler;return v0("stringify",a),i2(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(_0("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(a.settings=m0(!0,a.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];o(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const T=r[b][1];Ag(T)&&Ag(y)&&(y=m0(!0,T,y)),r[b]=[f,y,..._]}}}}const mG=new Fb().freeze();function E0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function v0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function i2(e){if(!Ag(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function a2(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sd(e){return gG(e)?e:new dG(e)}function gG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bG(e){return typeof e=="string"||yG(e)}function yG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ub(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ls=Ub();function Pk(e){ls=e}var du={exec:()=>null};function et(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(a,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(yn.caret,"$1"),n=n.replace(a,l),r},getRegex:()=>new RegExp(n,t)};return r}var EG=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),yn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},vG=/^(?:[ \t]*(?:\n|$))+/,_G=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xG=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,TG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zb=/(?:[*+-]|\d{1,9}[.)])/,Bk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jk=et(Bk).replace(/bull/g,zb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),SG=et(Bk).replace(/bull/g,zb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,CG=/^[^\n]+/,Vb=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wG=et(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vb).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),AG=et(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zb).getRegex(),Zf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",qb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kG=et("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",qb).replace("tag",Zf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Hk=et($b).replace("hr",zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zf).getRegex(),NG=et(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hk).getRegex(),Gb={blockquote:NG,code:_G,def:wG,fences:xG,heading:TG,hr:zu,html:kG,lheading:jk,list:AG,newline:vG,paragraph:Hk,table:du,text:CG},s2=et("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zf).getRegex(),RG={...Gb,lheading:SG,table:s2,paragraph:et($b).replace("hr",zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",s2).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zf).getRegex()},LG={...Gb,html:et(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:du,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:et($b).replace("hr",zu).replace("heading",` *#{1,6} *[^
|
|
1379
|
+
]`).replace("lheading",jk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},OG=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,DG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fk=/^( {2,}|\\)\n(?!\s*$)/,IG=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jf=/[\p{P}\p{S}]/u,Yb=/[\s\p{P}\p{S}]/u,Uk=/[^\s\p{P}\p{S}]/u,MG=et(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Yb).getRegex(),zk=/(?!~)[\p{P}\p{S}]/u,PG=/(?!~)[\s\p{P}\p{S}]/u,BG=/(?:[^\s\p{P}\p{S}]|~)/u,jG=et(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",EG?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),$k=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,HG=et($k,"u").replace(/punct/g,Jf).getRegex(),FG=et($k,"u").replace(/punct/g,zk).getRegex(),Vk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",UG=et(Vk,"gu").replace(/notPunctSpace/g,Uk).replace(/punctSpace/g,Yb).replace(/punct/g,Jf).getRegex(),zG=et(Vk,"gu").replace(/notPunctSpace/g,BG).replace(/punctSpace/g,PG).replace(/punct/g,zk).getRegex(),$G=et("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Uk).replace(/punctSpace/g,Yb).replace(/punct/g,Jf).getRegex(),VG=et(/\\(punct)/,"gu").replace(/punct/g,Jf).getRegex(),qG=et(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),GG=et(qb).replace("(?:-->|$)","-->").getRegex(),YG=et("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",GG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ef=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,QG=et(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ef).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qk=et(/^!?\[(label)\]\[(ref)\]/).replace("label",Ef).replace("ref",Vb).getRegex(),Gk=et(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vb).getRegex(),WG=et("reflink|nolink(?!\\()","g").replace("reflink",qk).replace("nolink",Gk).getRegex(),o2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qb={_backpedal:du,anyPunctuation:VG,autolink:qG,blockSkip:jG,br:Fk,code:DG,del:du,emStrongLDelim:HG,emStrongRDelimAst:UG,emStrongRDelimUnd:$G,escape:OG,link:QG,nolink:Gk,punctuation:MG,reflink:qk,reflinkSearch:WG,tag:YG,text:IG,url:du},XG={...Qb,link:et(/^!?\[(label)\]\((.*?)\)/).replace("label",Ef).getRegex(),reflink:et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ef).getRegex()},Ng={...Qb,emStrongRDelimAst:zG,emStrongLDelim:FG,url:et(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",o2).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:et(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",o2).getRegex()},KG={...Ng,br:et(Fk).replace("{2,}","*").getRegex(),text:et(Ng.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Cd={normal:Gb,gfm:RG,pedantic:LG},Gl={normal:Qb,gfm:Ng,breaks:KG,pedantic:XG},ZG={"&":"&","<":"<",">":">",'"':""","'":"'"},l2=e=>ZG[e];function pi(e,t){if(t){if(yn.escapeTest.test(e))return e.replace(yn.escapeReplace,l2)}else if(yn.escapeTestNoEncode.test(e))return e.replace(yn.escapeReplaceNoEncode,l2);return e}function u2(e){try{e=encodeURI(e).replace(yn.percentDecode,"%")}catch{return null}return e}function c2(e,t){let n=e.replace(yn.findPipe,(o,l,c)=>{let d=!1,f=l;for(;--f>=0&&c[f]==="\\";)d=!d;return d?"|":" |"}),r=n.split(yn.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(yn.slashPipe,"|");return r}function Yl(e,t,n){let r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function JG(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function d2(e,t,n,r,a){let o=t.href,l=t.title||null,c=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,d}function eY(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let a=r[1];return t.split(`
|
|
1380
|
+
`).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=a.length?o.slice(a.length):o}).join(`
|
|
1381
|
+
`)}var vf=class{options;rules;lexer;constructor(e){this.options=e||ls}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Yl(n,`
|
|
1382
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=eY(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Yl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Yl(t[0],`
|
|
1383
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Yl(t[0],`
|
|
1384
|
+
`).split(`
|
|
1385
|
+
`),r="",a="",o=[];for(;n.length>0;){let l=!1,c=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))c.push(n[d]),l=!0;else if(!l)c.push(n[d]);else break;n=n.slice(d);let f=c.join(`
|
|
1386
|
+
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
1387
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
1388
|
+
${f}`:f,a=a?`${a}
|
|
1389
|
+
${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=m,n.length===0)break;let b=o.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let y=b,_=y.raw+`
|
|
1390
|
+
`+n.join(`
|
|
1391
|
+
`),T=this.blockquote(_);o[o.length-1]=T,r=r.substring(0,r.length-y.raw.length)+T.raw,a=a.substring(0,a.length-y.text.length)+T.text;break}else if(b?.type==="list"){let y=b,_=y.raw+`
|
|
1392
|
+
`+n.join(`
|
|
1393
|
+
`),T=this.list(_);o[o.length-1]=T,r=r.substring(0,r.length-b.raw.length)+T.raw,a=a.substring(0,a.length-y.raw.length)+T.raw,n=_.substring(o.at(-1).raw.length).split(`
|
|
1394
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:o,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),l=!1;for(;e;){let d=!1,f="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let m=t[2].split(`
|
|
1395
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),b=e.split(`
|
|
1396
|
+
`,1)[0],y=!m.trim(),_=0;if(this.options.pedantic?(_=2,p=m.trimStart()):y?_=t[1].length+1:(_=t[2].search(this.rules.other.nonSpaceChar),_=_>4?1:_,p=m.slice(_),_+=t[1].length),y&&this.rules.other.blankLine.test(b)&&(f+=b+`
|
|
1397
|
+
`,e=e.substring(b.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(_),A=this.rules.other.hrRegex(_),C=this.rules.other.fencesBeginRegex(_),k=this.rules.other.headingBeginRegex(_),N=this.rules.other.htmlBeginRegex(_);for(;e;){let L=e.split(`
|
|
1398
|
+
`,1)[0],O;if(b=L,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),O=b):O=b.replace(this.rules.other.tabCharGlobal," "),C.test(b)||k.test(b)||N.test(b)||T.test(b)||A.test(b))break;if(O.search(this.rules.other.nonSpaceChar)>=_||!b.trim())p+=`
|
|
1399
|
+
`+O.slice(_);else{if(y||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(m)||k.test(m)||A.test(m))break;p+=`
|
|
1400
|
+
`+b}!y&&!b.trim()&&(y=!0),f+=L+`
|
|
1401
|
+
`,e=e.substring(L.length+1),m=O.slice(_)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0)),a.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),a.raw+=f}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let d of a.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),d.tokens[0]?.type==="text"||d.tokens[0]?.type==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let p={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=p.checked,a.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=p.raw+d.tokens[0].raw,d.tokens[0].text=p.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(p)):d.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):d.tokens.unshift(p)}}if(!a.loose){let f=d.tokens.filter(m=>m.type==="space"),p=f.length>0&&f.some(m=>this.rules.other.anyLine.test(m.raw));a.loose=p}}if(a.loose)for(let d of a.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=c2(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
1402
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let l of r)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(c2(l,o.header.length).map((c,d)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[d]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
1403
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Yl(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=JG(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],a=o[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),d2(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[r.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return d2(n,a,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,o,l,c=a,d=0,f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+a);(r=f.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(l=[...o].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&a%3&&!((a+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);let p=[...r[0]][0].length,m=e.slice(0,a+r.index+p+l);if(Math.min(a,l)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let b=m.slice(2,-2);return{type:"strong",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},or=class Rg{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ls,this.options.tokenizer=this.options.tokenizer||new vf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:yn,block:Cd.normal,inline:Gl.normal};this.options.pedantic?(n.block=Cd.pedantic,n.inline=Gl.pedantic):this.options.gfm&&(n.block=Cd.gfm,this.options.breaks?n.inline=Gl.breaks:n.inline=Gl.gfm),this.tokenizer.rules=n}static get rules(){return{block:Cd,inline:Gl}}static lex(t,n){return new Rg(n).lex(t)}static lexInline(t,n){return new Rg(n).inlineTokens(t)}lex(t){t=t.replace(yn.carriageReturn,`
|
|
1404
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(yn.tabCharGlobal," ").replace(yn.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(l=>(a=l.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let l=n.at(-1);a.raw.length===1&&l!==void 0?l.raw+=`
|
|
1405
|
+
`:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
1406
|
+
`)?"":`
|
|
1407
|
+
`)+a.raw,l.text+=`
|
|
1408
|
+
`+a.text,this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
1409
|
+
`)?"":`
|
|
1410
|
+
`)+a.raw,l.text+=`
|
|
1411
|
+
`+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},n.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let o=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(o))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
1412
|
+
`)?"":`
|
|
1413
|
+
`)+a.raw,l.text+=`
|
|
1414
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a),r=o.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
1415
|
+
`)?"":`
|
|
1416
|
+
`)+a.raw,l.text+=`
|
|
1417
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=a[2]?a[2].length:0,r=r.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let d;if(this.options.extensions?.inline?.some(p=>(d=p.call({lexer:this},t,n))?(t=t.substring(d.raw.length),n.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let p=n.at(-1);d.type==="text"&&p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(d=this.tokenizer.emStrong(t,r,c)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),n.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),n.push(d);continue}let f=t;if(this.options.extensions?.startInline){let p=1/0,m=t.slice(1),b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},m),typeof b=="number"&&b>=0&&(p=Math.min(p,b))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(c=d.raw.slice(-1)),l=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=d.raw,p.text+=d.text):n.push(d);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},_f=class{options;parser;constructor(e){this.options=e||ls}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(yn.notSpaceStart)?.[0],a=e.replace(yn.endingNewline,"")+`
|
|
1418
|
+
`;return r?'<pre><code class="language-'+pi(r)+'">'+(n?a:pi(a,!0))+`</code></pre>
|
|
1419
|
+
`:"<pre><code>"+(n?a:pi(a,!0))+`</code></pre>
|
|
1420
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
1421
|
+
${this.parser.parse(e)}</blockquote>
|
|
1422
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
1423
|
+
`}hr(e){return`<hr>
|
|
1424
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l<e.items.length;l++){let c=e.items[l];r+=this.listitem(c)}let a=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+a+o+`>
|
|
1425
|
+
`+r+"</"+a+`>
|
|
1426
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
1427
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
1428
|
+
`}table(e){let t="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);t+=this.tablerow({text:n});let r="";for(let a=0;a<e.rows.length;a++){let o=e.rows[a];n="";for(let l=0;l<o.length;l++)n+=this.tablecell(o[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
1429
|
+
<thead>
|
|
1430
|
+
`+t+`</thead>
|
|
1431
|
+
`+r+`</table>
|
|
1432
|
+
`}tablerow({text:e}){return`<tr>
|
|
1433
|
+
${e}</tr>
|
|
1434
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
1435
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${pi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),a=u2(e);if(a===null)return r;e=a;let o='<a href="'+e+'"';return t&&(o+=' title="'+pi(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=u2(e);if(a===null)return pi(n);e=a;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${pi(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:pi(e.text)}},Wb=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},yr=class Lg{options;renderer;textRenderer;constructor(t){this.options=t||ls,this.options.renderer=this.options.renderer||new _f,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wb}static parse(t,n){return new Lg(n).parse(t)}static parseInline(t,n){return new Lg(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let a=t[r];if(this.options.extensions?.renderers?.[a.type]){let l=a,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){let r="";for(let a=0;a<t.length;a++){let o=t[a];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=c||"";continue}}let l=o;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Zl=class{options;block;constructor(e){this.options=e||ls}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?or.lex:or.lexInline}provideParser(){return this.block?yr.parse:yr.parseInline}},tY=class{defaults=Ub();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=yr;Renderer=_f;TextRenderer=Wb;Lexer=or;Tokenizer=vf;Hooks=Zl;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let o=a;for(let l of o.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of o.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let o=a;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=a;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...c){let d=o.renderer.apply(this,c);return d===!1&&(d=l.apply(this,c)),d}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),a.extensions=n),r.renderer){let o=this.defaults.renderer||new _f(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,d=r.renderer[c],f=o[c];o[c]=(...p)=>{let m=d.apply(o,p);return m===!1&&(m=f.apply(o,p)),m||""}}a.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new vf(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,d=r.tokenizer[c],f=o[c];o[c]=(...p)=>{let m=d.apply(o,p);return m===!1&&(m=f.apply(o,p)),m}}a.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Zl;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,d=r.hooks[c],f=o[c];Zl.passThroughHooks.has(l)?o[c]=p=>{if(this.defaults.async&&Zl.passThroughHooksRespectAsync.has(l))return(async()=>{let b=await d.call(o,p);return f.call(o,b)})();let m=d.call(o,p);return f.call(o,m)}:o[c]=(...p)=>{if(this.defaults.async)return(async()=>{let b=await d.apply(o,p);return b===!1&&(b=await f.apply(o,p)),b})();let m=d.apply(o,p);return m===!1&&(m=f.apply(o,p)),m}}a.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;a.walkTokens=function(c){let d=[];return d.push(l.call(this,c)),o&&(d=d.concat(o.call(this,c))),d}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return or.lex(t,n??this.defaults)}parser(t,n){return yr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let a={...r},o={...this.defaults,...a},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,d=await(o.hooks?await o.hooks.provideLexer():t?or.lex:or.lexInline)(c,o),f=o.hooks?await o.hooks.processAllTokens(d):d;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser():t?yr.parse:yr.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer():t?or.lex:or.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let d=(o.hooks?o.hooks.provideParser():t?yr.parse:yr.parseInline)(c,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
|
|
1436
|
+
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+pi(r.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(r);throw r}}},rs=new tY;function ut(e,t){return rs.parse(e,t)}ut.options=ut.setOptions=function(e){return rs.setOptions(e),ut.defaults=rs.defaults,Pk(ut.defaults),ut};ut.getDefaults=Ub;ut.defaults=ls;ut.use=function(...e){return rs.use(...e),ut.defaults=rs.defaults,Pk(ut.defaults),ut};ut.walkTokens=function(e,t){return rs.walkTokens(e,t)};ut.parseInline=rs.parseInline;ut.Parser=yr;ut.parser=yr.parse;ut.Renderer=_f;ut.TextRenderer=Wb;ut.Lexer=or;ut.lexer=or.lex;ut.Tokenizer=vf;ut.Hooks=Zl;ut.parse=ut;ut.options;ut.setOptions;ut.use;ut.walkTokens;ut.parseInline;yr.parse;or.lex;var nY=300,rY="300px",iY=500;function aY(e={}){let{immediate:t=!1,debounceDelay:n=nY,rootMargin:r=rY,idleTimeout:a=iY}=e,[o,l]=w.useState(!1),c=w.useRef(null),d=w.useRef(null),f=w.useRef(null),p=w.useMemo(()=>y=>{let _=Date.now();return window.setTimeout(()=>{y({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-_))})},1)},[]),m=w.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(y,_)=>window.requestIdleCallback(y,_):p,[p]),b=w.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?y=>window.cancelIdleCallback(y):y=>{clearTimeout(y)},[]);return w.useEffect(()=>{if(t){l(!0);return}let y=c.current;if(!y)return;d.current&&(clearTimeout(d.current),d.current=null),f.current&&(b(f.current),f.current=null);let _=()=>{d.current&&(clearTimeout(d.current),d.current=null),f.current&&(b(f.current),f.current=null)},T=N=>{f.current=m(L=>{L.timeRemaining()>0||L.didTimeout?(l(!0),N.disconnect()):f.current=m(()=>{l(!0),N.disconnect()},{timeout:a/2})},{timeout:a})},A=N=>{_(),d.current=window.setTimeout(()=>{var L,O;let P=N.takeRecords();(P.length===0||(O=(L=P.at(-1))==null?void 0:L.isIntersecting)!=null&&O)&&T(N)},n)},C=(N,L)=>{N.isIntersecting?A(L):_()},k=new IntersectionObserver(N=>{for(let L of N)C(L,k)},{rootMargin:r,threshold:0});return k.observe(y),()=>{d.current&&clearTimeout(d.current),f.current&&b(f.current),k.disconnect()}},[t,n,r,a,b,m]),{shouldRender:o,containerRef:c}}var Xb=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Kb=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),eh=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),sY=e=>x.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[x.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),oY=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),lY=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Yk=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),f2=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),uY=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),cY=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Le=(...e)=>lV(v$(e)),vo=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},dY=w.createContext({code:""}),Qk=()=>w.useContext(dY),h2=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:a,code:o,...l})=>{let[c,d]=w.useState(!1),f=w.useRef(0),{code:p}=Qk(),{isAnimating:m}=w.useContext(cr),b=o??p,y=async()=>{var T;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.writeText)){t?.(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(b),d(!0),e?.(),f.current=window.setTimeout(()=>d(!1),n))}catch(A){t?.(A)}};w.useEffect(()=>()=>{window.clearTimeout(f.current)},[]);let _=c?Xb:Kb;return x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-copy-button",disabled:m,onClick:y,title:"Copy Code",type:"button",...l,children:r??x.jsx(_,{size:14})})},p2={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},fY=({onDownload:e,onError:t,language:n,children:r,className:a,code:o,...l})=>{let{code:c}=Qk(),{isAnimating:d}=w.useContext(cr),f=o??c,p=`file.${n&&n in p2?p2[n]:"txt"}`,m="text/plain",b=()=>{try{vo(p,f,m),e?.()}catch(y){t?.(y)}};return x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-download-button",disabled:d,onClick:b,title:"Download file",type:"button",...l,children:r??x.jsx(eh,{size:14})})},m2=()=>x.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[x.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),x.jsx("div",{className:"flex w-full items-center justify-center p-4",children:x.jsx(sY,{className:"size-4 animate-spin"})})]}),hY=/\.[^/.]+$/,pY=({node:e,className:t,src:n,alt:r,...a})=>{let o=async()=>{if(n)try{let l=await(await fetch(n)).blob(),c=new URL(n,window.location.origin).pathname.split("/").pop()||"",d=c.split(".").pop(),f=c.includes(".")&&d!==void 0&&d.length<=4,p="";if(f)p=c;else{let m=l.type,b="png";m.includes("jpeg")||m.includes("jpg")?b="jpg":m.includes("png")?b="png":m.includes("svg")?b="svg":m.includes("gif")?b="gif":m.includes("webp")&&(b="webp"),p=`${(r||c||"image").replace(hY,"")}.${b}`}vo(p,l,l.type)}catch{window.open(n,"_blank")}};return n?x.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[x.jsx("img",{alt:r,className:Le("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...a}),x.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),x.jsx("button",{className:Le("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:x.jsx(eh,{size:14})})]}):null},fu=0,mY=()=>{fu+=1,fu===1&&(document.body.style.overflow="hidden")},gY=()=>{fu=Math.max(0,fu-1),fu===0&&(document.body.style.overflow="")},bY=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[a,o]=w.useState(!1),l=w.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),c=w.useCallback(()=>{r(),n()},[r,n]);return w.useEffect(()=>{if(t){mY();let d=f=>{f.key==="Escape"&&n()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),gY()}}},[t,n]),t?x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:d=>{d.key==="Escape"&&n()},role:"button",tabIndex:0,children:x.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),role:"presentation",children:[x.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:x.jsx(Yk,{size:16})}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[x.jsx(f2,{size:20}),x.jsx("span",{children:"Open external link?"})]}),x.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),x.jsx("div",{className:Le("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:l,type:"button",children:a?x.jsxs(x.Fragment,{children:[x.jsx(Xb,{size:14}),x.jsx("span",{children:"Copied"})]}):x.jsxs(x.Fragment,{children:[x.jsx(Kb,{size:14}),x.jsx("span",{children:"Copy link"})]})}),x.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:c,type:"button",children:[x.jsx(f2,{size:14}),x.jsx("span",{children:"Open link"})]})]})]})}):null},Og=w.createContext(null),Wk=()=>w.useContext(Og),RW=()=>{var e;let t=Wk();return(e=t?.code)!=null?e:null},Zb=()=>{var e;let t=Wk();return(e=t?.mermaid)!=null?e:null},yY=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((a,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let d=document.createElement("canvas"),f=c.width*r,p=c.height*r;d.width=f,d.height=p;let m=d.getContext("2d");if(!m){o(new Error("Failed to create 2D canvas context for PNG export"));return}m.drawImage(c,0,0,f,p),d.toBlob(b=>{if(!b){o(new Error("Failed to create PNG blob"));return}a(b)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},EY=({chart:e,children:t,className:n,onDownload:r,config:a,onError:o})=>{let[l,c]=w.useState(!1),d=w.useRef(null),{isAnimating:f}=w.useContext(cr),p=Zb(),m=async b=>{try{if(b==="mmd"){vo("diagram.mmd",e,"text/plain"),c(!1),r?.(b);return}if(!p){o?.(new Error("Mermaid plugin not available"));return}let y=p.getMermaid(a),_=e.split("").reduce((C,k)=>(C<<5)-C+k.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(_)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:A}=await y.render(T,e);if(!A){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){vo("diagram.svg",A,"image/svg+xml"),c(!1),r?.(b);return}if(b==="png"){let C=await yY(A);vo("diagram.png",C,"image/png"),r?.(b),c(!1);return}}catch(y){o?.(y)}};return w.useEffect(()=>{let b=y=>{let _=y.composedPath();d.current&&!_.includes(d.current)&&c(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),x.jsxs("div",{className:"relative",ref:d,children:[x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:f,onClick:()=>c(!l),title:"Download diagram",type:"button",children:t??x.jsx(eh,{size:14})}),l?x.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},hu=0,vY=()=>{hu+=1,hu===1&&(document.body.style.overflow="hidden")},_Y=()=>{hu=Math.max(0,hu-1),hu===0&&(document.body.style.overflow="")},xY=({chart:e,config:t,onFullscreen:n,onExit:r,className:a,...o})=>{let[l,c]=w.useState(!1),{isAnimating:d,controls:f}=w.useContext(cr),p=(()=>{if(typeof f=="boolean")return f;let b=f.mermaid;return b===!1?!1:b===!0||b===void 0?!0:b.panZoom!==!1})(),m=()=>{c(!l)};return w.useEffect(()=>{if(l){vY();let b=y=>{y.key==="Escape"&&c(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),_Y()}}},[l]),w.useEffect(()=>{l?n?.():r&&r()},[l,n,r]),x.jsxs(x.Fragment,{children:[x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:d,onClick:m,title:"View fullscreen",type:"button",...o,children:x.jsx(oY,{size:14})}),l?x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:m,onKeyDown:b=>{b.key==="Escape"&&m()},role:"button",tabIndex:0,children:[x.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:m,title:"Exit fullscreen",type:"button",children:x.jsx(Yk,{size:20})}),x.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:x.jsx(C3,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:p})})]}):null]})},Xk=e=>{var t,n;let r=[],a=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let d=[],f=c.querySelectorAll("td");for(let p of f)d.push(((n=p.textContent)==null?void 0:n.trim())||"");a.push(d)}return{headers:r,rows:a}},Kk=e=>{let{headers:t,rows:n}=e,r=c=>{let d=!1,f=!1;for(let p of c){if(p==='"'){d=!0,f=!0;break}(p===","||p===`
|
|
1437
|
+
`)&&(d=!0)}return d?f?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},a=t.length>0?n.length+1:n.length,o=new Array(a),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
|
|
1438
|
+
`)},TY=e=>{let{headers:t,rows:n}=e,r=c=>{let d=!1;for(let p of c)if(p===" "||p===`
|
|
1439
|
+
`||p==="\r"){d=!0;break}if(!d)return c;let f=[];for(let p of c)p===" "?f.push("\\t"):p===`
|
|
1440
|
+
`?f.push("\\n"):p==="\r"?f.push("\\r"):f.push(p);return f.join("")},a=t.length>0?n.length+1:n.length,o=new Array(a),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
|
|
1441
|
+
`)},x0=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},SY=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),a=0,o=t.map(c=>x0(c));r[a]=`| ${o.join(" | ")} |`,a+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[a]=`| ${l.join(" | ")} |`,a+=1;for(let c of n)if(c.length<t.length){let d=new Array(t.length);for(let f=0;f<t.length;f+=1)d[f]=f<c.length?x0(c[f]):"";r[a]=`| ${d.join(" | ")} |`,a+=1}else{let d=c.map(f=>x0(f));r[a]=`| ${d.join(" | ")} |`,a+=1}return r.join(`
|
|
1442
|
+
`)},CY=({children:e,className:t,onCopy:n,onError:r,timeout:a=2e3})=>{let[o,l]=w.useState(!1),[c,d]=w.useState(!1),f=w.useRef(null),p=w.useRef(0),{isAnimating:m}=w.useContext(cr),b=async _=>{var T,A;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.write)){r?.(new Error("Clipboard API not available"));return}try{let C=(A=f.current)==null?void 0:A.closest('[data-streamdown="table-wrapper"]'),k=C?.querySelector("table");if(!k){r?.(new Error("Table not found"));return}let N=Xk(k),L=_==="csv"?Kk(N):TY(N),O=new ClipboardItem({"text/plain":new Blob([L],{type:"text/plain"}),"text/html":new Blob([k.outerHTML],{type:"text/html"})});await navigator.clipboard.write([O]),d(!0),l(!1),n?.(_),p.current=window.setTimeout(()=>d(!1),a)}catch(C){r?.(C)}};w.useEffect(()=>{let _=T=>{let A=T.composedPath();f.current&&!A.includes(f.current)&&l(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_),window.clearTimeout(p.current)}},[]);let y=c?Xb:Kb;return x.jsxs("div",{className:"relative",ref:f,children:[x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:m,onClick:()=>l(!o),title:"Copy table",type:"button",children:e??x.jsx(y,{size:14})}),o?x.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},wY=({children:e,className:t,onDownload:n,onError:r})=>{let[a,o]=w.useState(!1),l=w.useRef(null),{isAnimating:c}=w.useContext(cr),d=f=>{var p;try{let m=(p=l.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),b=m?.querySelector("table");if(!b){r?.(new Error("Table not found"));return}let y=Xk(b),_=f==="csv"?Kk(y):SY(y);vo(`table.${f==="csv"?"csv":"md"}`,_,f==="csv"?"text/csv":"text/markdown"),o(!1),n?.(f)}catch(m){r?.(m)}};return w.useEffect(()=>{let f=p=>{let m=p.composedPath();l.current&&!m.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),x.jsxs("div",{className:"relative",ref:l,children:[x.jsx("button",{className:Le("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>o(!a),title:"Download table",type:"button",children:e??x.jsx(eh,{size:14})}),a?x.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),x.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},AY=({children:e,className:t,showControls:n,...r})=>x.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?x.jsxs("div",{className:"flex items-center justify-end gap-1",children:[x.jsx(CY,{}),x.jsx(wY,{})]}):null,x.jsx("div",{className:"overflow-x-auto",children:x.jsx("table",{className:Le("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),kY=w.lazy(()=>M(()=>import("./code-block-37QAKDTI-D73VmzOZ.js"),[]).then(e=>({default:e.CodeBlock}))),NY=w.lazy(()=>M(()=>Promise.resolve().then(()=>xW),void 0).then(e=>({default:e.Mermaid}))),RY=/language-([^\s]+)/;function th(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,a=e.position.end,o=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&a?.line===o?.line&&a?.column===o?.column}function _t(e,t){return e.className===t.className&&th(e.node,t.node)}var Dg=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,wd=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Jb=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("ol",{className:Le("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>_t(e,t));Jb.displayName="MarkdownOl";var Zk=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("li",{className:Le("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&th(e.node,t.node));Zk.displayName="MarkdownLi";var Jk=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("ul",{className:Le("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>_t(e,t));Jk.displayName="MarkdownUl";var e3=w.memo(({className:e,node:t,...n})=>x.jsx("hr",{className:Le("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>_t(e,t));e3.displayName="MarkdownHr";var t3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("span",{className:Le("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>_t(e,t));t3.displayName="MarkdownStrong";var LY=({children:e,className:t,href:n,node:r,...a})=>{let{linkSafety:o}=w.useContext(cr),[l,c]=w.useState(!1),d=n==="streamdown:incomplete-link",f=w.useCallback(async y=>{if(!(!(o!=null&&o.enabled&&n)||d)){if(y.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[o,n,d]),p=w.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),m=w.useCallback(()=>{c(!1)},[]),b={url:n??"",isOpen:l,onClose:m,onConfirm:p};return o!=null&&o.enabled&&n?x.jsxs(x.Fragment,{children:[x.jsx("button",{className:Le("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",onClick:f,type:"button",children:e}),o.renderModal?o.renderModal(b):x.jsx(bY,{...b})]}):x.jsx("a",{className:Le("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...a,children:e})},n3=w.memo(LY,(e,t)=>_t(e,t)&&e.href===t.href);n3.displayName="MarkdownA";var r3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h1",{className:Le("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>_t(e,t));r3.displayName="MarkdownH1";var i3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h2",{className:Le("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>_t(e,t));i3.displayName="MarkdownH2";var a3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h3",{className:Le("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>_t(e,t));a3.displayName="MarkdownH3";var s3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h4",{className:Le("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>_t(e,t));s3.displayName="MarkdownH4";var o3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h5",{className:Le("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>_t(e,t));o3.displayName="MarkdownH5";var l3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("h6",{className:Le("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>_t(e,t));l3.displayName="MarkdownH6";var u3=w.memo(({children:e,className:t,node:n,...r})=>{let{controls:a}=w.useContext(cr),o=Dg(a,"table");return x.jsx(AY,{className:t,showControls:o,...r,children:e})},(e,t)=>_t(e,t));u3.displayName="MarkdownTable";var c3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("thead",{className:Le("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>_t(e,t));c3.displayName="MarkdownThead";var d3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("tbody",{className:Le("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>_t(e,t));d3.displayName="MarkdownTbody";var f3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("tr",{className:Le("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>_t(e,t));f3.displayName="MarkdownTr";var h3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("th",{className:Le("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>_t(e,t));h3.displayName="MarkdownTh";var p3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("td",{className:Le("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>_t(e,t));p3.displayName="MarkdownTd";var m3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("blockquote",{className:Le("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>_t(e,t));m3.displayName="MarkdownBlockquote";var g3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("sup",{className:Le("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>_t(e,t));g3.displayName="MarkdownSup";var b3=w.memo(({children:e,className:t,node:n,...r})=>x.jsx("sub",{className:Le("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>_t(e,t));b3.displayName="MarkdownSub";var y3=w.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let a=l=>{var c,d;if(!w.isValidElement(l))return!1;let f=Array.isArray(l.props.children)?l.props.children:[l.props.children],p=!1,m=!1;for(let b of f)if(b){if(typeof b=="string")b.trim()!==""&&(p=!0);else if(w.isValidElement(b))if(((c=b.props)==null?void 0:c["data-footnote-backref"])!==void 0)m=!0;else{let y=Array.isArray(b.props.children)?b.props.children:[b.props.children];for(let _ of y){if(typeof _=="string"&&_.trim()!==""){p=!0;break}if(w.isValidElement(_)&&((d=_.props)==null?void 0:d["data-footnote-backref"])===void 0){p=!0;break}}}}return m&&!p},o=Array.isArray(e)?e.map(l=>{if(!w.isValidElement(l))return l;if(l.type===Jb){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(d=>!a(d));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?x.jsx("section",{className:t,...r,children:o}):null}return x.jsx("section",{className:t,...r,children:e})},(e,t)=>_t(e,t));y3.displayName="MarkdownSection";var OY=({node:e,className:t,children:n,...r})=>{var a,o,l;let c=((a=e?.position)==null?void 0:a.start.line)===((o=e?.position)==null?void 0:o.end.line),{mermaid:d,controls:f}=w.useContext(cr),p=Zb();if(c)return x.jsx("code",{className:Le("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let m=t?.match(RY),b=(l=m?.at(1))!=null?l:"",y="";if(w.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?y=n.props.children:typeof n=="string"&&(y=n),b==="mermaid"&&p){let T=Dg(f,"mermaid"),A=wd(f,"download"),C=wd(f,"copy"),k=wd(f,"fullscreen"),N=wd(f,"panZoom"),L=T&&(A||C||k);return x.jsx(w.Suspense,{fallback:x.jsx(m2,{}),children:x.jsxs("div",{className:Le("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[L?x.jsxs("div",{className:"flex items-center justify-end gap-2",children:[A?x.jsx(EY,{chart:y,config:d?.config}):null,C?x.jsx(h2,{code:y}):null,k?x.jsx(xY,{chart:y,config:d?.config}):null]}):null,x.jsx(NY,{chart:y,config:d?.config,showControls:N})]})})}let _=Dg(f,"code");return x.jsx(w.Suspense,{fallback:x.jsx(m2,{}),children:x.jsx(kY,{className:Le("overflow-x-auto border-border border-t",t),code:y,language:b,children:_?x.jsxs(x.Fragment,{children:[x.jsx(fY,{code:y,language:b}),x.jsx(h2,{})]}):null})})},E3=w.memo(OY,(e,t)=>e.className===t.className&&th(e.node,t.node));E3.displayName="MarkdownCode";var v3=w.memo(pY,(e,t)=>e.className===t.className&&th(e.node,t.node));v3.displayName="MarkdownImg";var _3=w.memo(({children:e,className:t,node:n,...r})=>{var a,o;let l=(Array.isArray(e)?e:[e]).filter(c=>c!=null&&c!=="");if(l.length===1&&w.isValidElement(l[0])){let c=l[0].props.node,d=c?.tagName;if(d==="img")return x.jsx(x.Fragment,{children:e});if(d==="code"&&((a=c?.position)==null?void 0:a.start.line)!==((o=c?.position)==null?void 0:o.end.line))return x.jsx(x.Fragment,{children:e})}return x.jsx("p",{className:t,...r,children:e})},(e,t)=>_t(e,t));_3.displayName="MarkdownParagraph";var DY={ol:Jb,li:Zk,ul:Jk,hr:e3,strong:t3,a:n3,h1:r3,h2:i3,h3:a3,h4:s3,h5:o3,h6:l3,table:u3,thead:c3,tbody:d3,tr:f3,th:h3,td:p3,blockquote:m3,code:E3,img:v3,pre:({children:e})=>e,sup:g3,sub:b3,p:_3,section:y3},g2=[],b2={allowDangerousHtml:!0},Ad=new WeakMap,IY=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,a=e.remarkRehypeOptions;if(!(n||r||a)){let p="default";return this.keyCache.set(e,p),p}let o=p=>{if(!p||p.length===0)return"";let m="";for(let b=0;b<p.length;b+=1){let y=p[b];if(b>0&&(m+=","),Array.isArray(y)){let[_,T]=y;if(typeof _=="function"){let A=Ad.get(_);A||(A=_.name,Ad.set(_,A)),m+=A}else m+=String(_);m+=":",m+=JSON.stringify(T)}else if(typeof y=="function"){let _=Ad.get(y);_||(_=y.name,Ad.set(y,_)),m+=_}else m+=String(y)}return m},l=o(n),c=o(r),d=a?JSON.stringify(a):"",f=`${c}::${l}::${d}`;return this.keyCache.set(e,f),f}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},y2=new IY,x3=e=>{let t=MY(e),n=e.children||"";return BY(t.runSync(t.parse(n),n),e)},MY=e=>{let t=y2.get(e);if(t)return t;let n=PY(e);return y2.set(e,n),n},PY=e=>{let t=e.rehypePlugins||g2,n=e.remarkPlugins||g2,r=e.remarkRehypeOptions?{...b2,...e.remarkRehypeOptions}:b2;return mG().use(pq).use(n).use(Xq,r).use(t)},BY=(e,t)=>xV(e,{Fragment:x.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0}),jY=/\[\^[^\]\s]{1,200}\](?!:)/,HY=/\[\^[^\]\s]{1,200}\]:/,FY=/<\/(\w+)>/,UY=/<(\w+)[\s>]/,T0=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
1443
|
+
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},zY=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
1444
|
+
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},S0=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},$Y=e=>{let t=jY.test(e),n=HY.test(e);if(t||n)return[e];let r=or.lex(e,{gfm:!0}),a=[],o=[];for(let l of r){let c=l.raw,d=a.length;if(o.length>0){if(a[d-1]+=c,l.type==="html"){let f=c.match(FY);if(f){let p=f[1];o.at(-1)===p&&o.pop()}}continue}if(l.type==="html"&&l.block){let f=c.match(UY);if(f){let p=f[1];c.includes(`</${p}>`)||o.push(p)}}if(c.trim()==="$$"&&d>0){let f=a[d-1],p=T0(f),m=S0(f);if(p&&m%2===1){a[d-1]=f+c;continue}}if(d>0&&zY(c)){let f=a[d-1],p=T0(f),m=S0(f),b=S0(c);if(p&&m%2===1&&!T0(c)&&b===1){a[d-1]=f+c;continue}}a.push(c)}return a},VY={raw:Cj,sanitize:[Mj,{}],harden:[s9,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},qY={gfm:[mz,{}]},GY=Object.values(VY),YY=Object.values(qY),QY={block:" ▋",circle:" ●"},WY={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},cr=w.createContext(WY),T3=w.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>x.jsx(x3,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(a=>{var o,l;return((o=e.components)==null?void 0:o[a])!==((l=t.components)==null?void 0:l[a])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});T3.displayName="Block";var XY=["github-light","github-dark"],S3=w.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:a=GY,remarkPlugins:o=YY,className:l,shikiTheme:c=XY,mermaid:d,controls:f=!0,isAnimating:p=!1,BlockComponent:m=T3,parseMarkdownIntoBlocksFn:b=$Y,caret:y,plugins:_,remend:T,linkSafety:A={enabled:!0},...C})=>{let k=w.useId(),[N,L]=w.useTransition(),O=w.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?E$(e,T):e,[e,t,n,T]),P=w.useMemo(()=>b(O),[O,b]),[V,G]=w.useState(P);w.useEffect(()=>{t==="streaming"?L(()=>{G(P)}):G(P)},[P,t]);let Z=t==="streaming"?V:P,z=w.useMemo(()=>Z.map((B,Q)=>`${k}-${Q}`),[Z.length,k]),re=w.useMemo(()=>{var B,Q;return{shikiTheme:(Q=(B=_?.code)==null?void 0:B.getThemes())!=null?Q:c,controls:f,isAnimating:p,mode:t,mermaid:d,linkSafety:A}},[c,f,p,t,d,A,_?.code]),W=w.useMemo(()=>({...DY,...r}),[r]),he=w.useMemo(()=>{let B=[];return _!=null&&_.cjk&&(B=[...B,..._.cjk.remarkPluginsBefore]),B=[...B,...o],_!=null&&_.cjk&&(B=[...B,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(B=[...B,_.math.remarkPlugin]),B},[o,_?.math,_?.cjk]),ue=w.useMemo(()=>_!=null&&_.math?[...a,_.math.rehypePlugin]:a,[a,_?.math]),se=w.useMemo(()=>y&&p?{"--streamdown-caret":`"${QY[y]}"`}:void 0,[y,p]);return t==="static"?x.jsx(Og.Provider,{value:_??null,children:x.jsx(cr.Provider,{value:re,children:x.jsx("div",{className:Le("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:x.jsx(x3,{components:W,rehypePlugins:ue,remarkPlugins:he,...C,children:e})})})}):x.jsx(Og.Provider,{value:_??null,children:x.jsx(cr.Provider,{value:re,children:x.jsxs("div",{className:Le("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",y?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:se,children:[Z.length===0&&y&&p&&x.jsx("span",{}),Z.map((B,Q)=>x.jsx(m,{components:W,content:B,index:Q,rehypePlugins:ue,remarkPlugins:he,shouldParseIncompleteMarkdown:n,...C},z[Q]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);S3.displayName="Streamdown";var KY=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:a=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let d=w.useRef(null),f=w.useRef(null),[p,m]=w.useState(l),[b,y]=w.useState({x:0,y:0}),[_,T]=w.useState(!1),[A,C]=w.useState({x:0,y:0}),[k,N]=w.useState({x:0,y:0}),L=w.useCallback(W=>{m(he=>Math.max(n,Math.min(r,he+W)))},[n,r]),O=w.useCallback(()=>{L(a)},[L,a]),P=w.useCallback(()=>{L(-a)},[L,a]),V=w.useCallback(()=>{m(l),y({x:0,y:0})},[l]),G=w.useCallback(W=>{W.preventDefault();let he=W.deltaY>0?-a:a;L(he)},[L,a]),Z=w.useCallback(W=>{if(W.button!==0||W.isPrimary===!1)return;T(!0),C({x:W.clientX,y:W.clientY}),N(b);let he=W.currentTarget;he instanceof HTMLElement&&he.setPointerCapture(W.pointerId)},[b]),z=w.useCallback(W=>{if(!_)return;W.preventDefault();let he=W.clientX-A.x,ue=W.clientY-A.y;y({x:k.x+he,y:k.y+ue})},[_,A,k]),re=w.useCallback(W=>{T(!1);let he=W.currentTarget;he instanceof HTMLElement&&he.releasePointerCapture(W.pointerId)},[]);return w.useEffect(()=>{let W=d.current;if(W)return W.addEventListener("wheel",G,{passive:!1}),()=>{W.removeEventListener("wheel",G)}},[G]),w.useEffect(()=>{let W=f.current;if(W&&_)return document.body.style.userSelect="none",W.addEventListener("pointermove",z,{passive:!1}),W.addEventListener("pointerup",re),W.addEventListener("pointercancel",re),()=>{document.body.style.userSelect="",W.removeEventListener("pointermove",z),W.removeEventListener("pointerup",re),W.removeEventListener("pointercancel",re)}},[_,z,re]),x.jsxs("div",{className:Le("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:_?"grabbing":"grab"},children:[o?x.jsxs("div",{className:Le("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[x.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:p>=r,onClick:O,title:"Zoom in",type:"button",children:x.jsx(uY,{size:16})}),x.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:p<=n,onClick:P,title:"Zoom out",type:"button",children:x.jsx(cY,{size:16})}),x.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:x.jsx(lY,{size:16})})]}):null,x.jsx("div",{className:Le("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Z,ref:f,role:"application",style:{transform:`translate(${b.x}px, ${b.y}px) scale(${p})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},C3=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:a=!0})=>{let[o,l]=w.useState(null),[c,d]=w.useState(!1),[f,p]=w.useState(""),[m,b]=w.useState(""),[y,_]=w.useState(0),{mermaid:T}=w.useContext(cr),A=Zb(),C=T?.errorComponent,{shouldRender:k,containerRef:N}=aY({immediate:r});if(w.useEffect(()=>{if(k){if(!A){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),d(!0);let O=A.getMermaid(n),P=e.split("").reduce((Z,z)=>(Z<<5)-Z+z.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(P)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:G}=await O.render(V,e);p(G),b(G)}catch(O){if(!(m||f)){let P=O instanceof Error?O.message:"Failed to render Mermaid chart";l(P)}}finally{d(!1)}})()}},[e,n,y,k,A]),!(k||f||m))return x.jsx("div",{className:Le("my-4 min-h-[200px]",t),ref:N});if(c&&!f&&!m)return x.jsx("div",{className:Le("my-4 flex justify-center p-4",t),ref:N,children:x.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[x.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),x.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!f&&!m){let O=()=>_(P=>P+1);return C?x.jsx("div",{ref:N,children:x.jsx(C,{chart:e,error:o,retry:O})}):x.jsxs("div",{className:Le("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:N,children:[x.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),x.jsxs("details",{className:"mt-2",children:[x.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),x.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let L=f||m;return x.jsx("div",{className:Le("size-full",t),"data-streamdown":"mermaid",ref:N,children:x.jsx(KY,{className:Le(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:a,zoomStep:.1,children:x.jsx("div",{"aria-label":"Mermaid chart",className:Le("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:L},role:"img"})})})};const ZY=w.memo(({projectPath:e,issueNumber:t})=>{const n=gn({queryKey:["issue-detail",e,t],queryFn:()=>nt(`/api/projects/issues/${t}?project=${encodeURIComponent(e)}`),enabled:!!(e&&t)}),r=n.data;return n.isLoading?x.jsx("div",{className:"text-sm text-base-content/70 p-4",children:"Loading..."}):r?x.jsxs("div",{className:"p-4 space-y-3",children:[x.jsxs("div",{className:"flex items-start justify-between gap-2",children:[x.jsxs("h3",{className:"font-semibold text-sm leading-tight",children:["#",r.number," ",r.title]}),x.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"btn btn-ghost btn-xs shrink-0",title:"Open in GitHub",children:"↗"})]}),x.jsxs("div",{className:"flex items-center gap-2 text-xs text-base-content/60 flex-wrap",children:[x.jsx("span",{className:`badge badge-sm ${r.state==="open"?"badge-success":"badge-neutral"}`,children:r.state}),r.author&&x.jsxs("span",{children:["@",r.author]}),x.jsx("span",{children:Du(r.createdAt)})]}),r.labels.length>0&&x.jsx("div",{className:"flex flex-wrap gap-1",children:r.labels.map(a=>x.jsx("span",{className:"badge badge-sm",style:{backgroundColor:`#${a.color}`,color:MC(a.color)},children:a.name},a.name))}),r.body&&x.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:x.jsx(S3,{children:r.body})}),r.commentsCount>0&&x.jsxs("div",{className:"text-xs text-base-content/60",children:[r.commentsCount," comment",r.commentsCount>1?"s":""]})]}):x.jsx("div",{className:"text-sm text-base-content/70 p-4",children:"Issue not found"})}),JY=w.memo(({projectPath:e,hasGit:t,hasGithub:n})=>{const[r,a]=w.useState(""),[o,l]=w.useState(null),c=Tf({queryKey:["issues",e,r],queryFn:async({pageParam:A})=>{const C=new URLSearchParams({project:e});return A&&C.set("cursor",A),r.trim()&&C.set("search",r.trim()),nt(`/api/projects/issues?${C.toString()}`)},initialPageParam:null,getNextPageParam:A=>{if(!(!A||!A.hasMore))return A.nextCursor??void 0},enabled:!!(e&&t&&n)}),d=w.useMemo(()=>c.data?c.data.pages.flatMap(A=>A.items):[],[c.data]),f=c.hasNextPage,p=c.isLoading,m=c.isFetchingNextPage,b=c.data?.pages[0]?.available??!0,y=c.data?.pages[0]?.error,_=w.useCallback(()=>{f&&!m&&c.fetchNextPage()},[f,m,c]),T=A=>x.jsx("li",{className:"w-full",children:x.jsx("button",{type:"button",className:`w-full px-2 text-left ${o===A.number?"active":""}`,title:A.title,onClick:()=>l(o===A.number?null:A.number),"data-testid":"branch-dropdown-issue","data-issue-number":A.number,children:x.jsxs("div",{className:"flex flex-col gap-1 w-full min-w-0",children:[x.jsx("span",{className:"block truncate font-medium",children:`#${A.number} ${A.title}`}),x.jsxs("div",{className:"flex items-center gap-2 text-xs text-base-content/60 flex-wrap",children:[A.author&&x.jsxs("span",{children:["@",A.author]}),x.jsx("span",{children:Du(A.updatedAt)}),A.labels.slice(0,3).map(C=>x.jsx("span",{className:"badge badge-xs",style:{backgroundColor:`#${C.color}`,color:MC(C.color)},children:C.name},C.name))]})]})})},A.number);return x.jsxs("div",{className:"mt-3 relative","data-testid":"branch-dropdown-issues-panel",children:[x.jsx("div",{className:"flex items-center gap-2","data-testid":"branch-dropdown-issue-filter-row",children:x.jsx("input",{className:"input input-bordered input-sm w-full",placeholder:"Search issues",value:r,onChange:A=>a(A.target.value),"data-testid":"branch-dropdown-issue-filter"})}),x.jsx("div",{className:"mt-3 overflow-auto max-h-[50vh]","data-testid":"branch-dropdown-issues",children:p?x.jsx("div",{className:"rounded-box text-sm text-base-content/70",children:"Loading issues..."}):b?x.jsxs(x.Fragment,{children:[x.jsx("ul",{className:"menu p-0 rounded-box w-full","data-testid":"branch-dropdown-issue-list",children:d.length?d.map(T):x.jsx("li",{className:"disabled",children:x.jsx("span",{children:"No issues"})})}),f&&x.jsx("button",{type:"button",className:"btn btn-ghost btn-sm w-full mt-2",onClick:_,disabled:m,"data-testid":"branch-dropdown-issue-load-more",children:m?"Loading...":"Load More"})]}):x.jsx("div",{className:"rounded-box text-sm text-error/80",children:y||"Failed to load issues"})}),o&&x.jsx("div",{className:"absolute left-full top-0 ml-6 w-120 h-full min-h-80 max-h-[50vh] overflow-auto rounded-box bg-base-100 shadow-lg border border-base-300","data-testid":"branch-dropdown-issue-preview",children:x.jsx(ZY,{projectPath:e,issueNumber:o})})]})}),eQ=w.memo(({projectPath:e,hasGit:t,hasGithub:n})=>{const[r,a]=w.useState(""),o=Tf({queryKey:["pull-requests",e,r],queryFn:async({pageParam:_})=>{const T=new URLSearchParams({project:e});return _&&T.set("cursor",_),r.trim()&&T.set("search",r.trim()),nt(`/api/projects/pull-requests?${T.toString()}`)},initialPageParam:null,getNextPageParam:_=>{if(!(!_||!_.hasMore))return _.nextCursor??void 0},enabled:!!(e&&t&&n)}),l=w.useMemo(()=>o.data?o.data.pages.flatMap(_=>_.items):[],[o.data]),c=o.hasNextPage,d=o.isLoading,f=o.isFetchingNextPage,p=o.data?.pages[0]?.available??!0,m=o.data?.pages[0]?.error,b=w.useCallback(()=>{c&&!f&&o.fetchNextPage()},[c,f,o]),y=_=>x.jsx("li",{className:"w-full",children:x.jsx("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",className:"w-full px-2",title:_.title,"data-testid":"branch-dropdown-pr","data-pr-number":_.number,children:x.jsxs("div",{className:"flex flex-col gap-1 w-full min-w-0",children:[x.jsx("span",{className:"block truncate font-medium",children:`#${_.number} ${_.title}`}),x.jsxs("span",{className:"text-xs text-base-content/60",children:[_.author&&x.jsxs("span",{className:"mr-2",children:["@",_.author]}),Du(_.updatedAt)]})]})})},_.number);return x.jsxs("div",{className:"mt-3",children:[x.jsx("div",{className:"flex items-center gap-2","data-testid":"branch-dropdown-pr-filter-row",children:x.jsx("input",{className:"input input-bordered input-sm w-full",placeholder:"Search pull requests",value:r,onChange:_=>a(_.target.value),"data-testid":"branch-dropdown-pr-filter"})}),x.jsx("div",{className:"mt-3 overflow-auto max-h-[50vh]","data-testid":"branch-dropdown-prs",children:d?x.jsx("div",{className:"rounded-box text-sm text-base-content/70",children:"Loading pull requests..."}):p?x.jsxs(x.Fragment,{children:[x.jsx("ul",{className:"menu p-0 rounded-box w-full","data-testid":"branch-dropdown-pr-list",children:l.length?l.map(y):x.jsx("li",{className:"disabled",children:x.jsx("span",{children:"No pull requests"})})}),c&&x.jsx("button",{type:"button",className:"btn btn-ghost btn-sm w-full mt-2",onClick:b,disabled:f,"data-testid":"branch-dropdown-pr-load-more",children:f?"Loading...":"Load More"})]}):x.jsx("div",{className:"rounded-box text-sm text-error/80",children:m||"Failed to load pull requests"})})]})}),tQ=w.memo(({hasGit:e,hasGithub:t,capabilitiesLoading:n,onDropdownToggle:r})=>{const[a,o]=w.useState(!1),{projectPath:l,branchTab:c,setBranchTab:d}=as(vi(_=>({projectPath:_.projectPath,branchTab:_.branchTab,setBranchTab:_.setBranchTab}))),{currentBranch:f,branchesLoading:p}=PC(l,e),m=_=>{_&&(!l||!e)||(o(_),r?.(_))},b=_=>{d(_)},y=()=>{o(!1)};return x.jsxs(gb,{open:a,onOpenChange:m,children:[x.jsx(bb,{asChild:!0,children:x.jsx("button",{type:"button",tabIndex:0,className:"btn btn-ghost justify-between",disabled:!l||n||!e,"data-testid":"branch-dropdown-trigger",children:x.jsxs("div",{className:"flex flex-col items-start",children:[x.jsx("span",{className:"text-xs text-gray-400",children:"Current branch"}),x.jsx("span",{className:"truncate",children:l?n||p?"Loading...":e?f||"—":"No git repository":"No project"})]})})}),x.jsx(yb,{align:"start",className:"w-fit rounded-box bg-base-100 p-3 shadow","data-testid":"branch-dropdown-content",children:x.jsx("div",{className:"flex gap-3",children:x.jsxs("div",{className:"w-96",children:[x.jsxs("div",{className:"tabs","data-testid":"branch-dropdown-tabs",children:[x.jsx("button",{type:"button",className:`tab ${c==="branches"?"tab-active font-semibold":""}`,onClick:()=>b("branches"),"data-testid":"branch-dropdown-tab-branches",children:"Branches"}),x.jsx("button",{type:"button",className:`tab ${c==="prs"?"tab-active font-semibold":""}`,onClick:()=>b("prs"),disabled:!t,"data-testid":"branch-dropdown-tab-prs",children:"Pull Requests"}),x.jsx("button",{type:"button",className:`tab ${c==="issues"?"tab-active font-semibold":""}`,onClick:()=>b("issues"),disabled:!t,"data-testid":"branch-dropdown-tab-issues",children:"Issues"})]}),c==="branches"&&x.jsx(JP,{projectPath:l,hasGit:e,onClose:y}),c==="prs"&&x.jsx(eQ,{projectPath:l,hasGit:e,hasGithub:t}),c==="issues"&&x.jsx(JY,{projectPath:l,hasGit:e,hasGithub:t})]})})})]})}),w3=5,nQ=()=>{try{const e=localStorage.getItem(bt.recentProjects);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)){const n=t.filter(r=>typeof r=="string");return Array.from(new Set(n)).slice(0,w3)}}catch{return[]}return[]},rQ=e=>{const n=e.replace(/[/\\]+$/,"").split(/[/\\]/);return n[n.length-1]||e},iQ=({onDropdownToggle:e})=>{const[t,n]=w.useState(!1),[r,a]=w.useState(""),o=r.trim().toLowerCase(),[l,c]=w.useState(()=>nQ()),{projectPath:d,projectOpenError:f,setProjectPath:p,setProjectOpenError:m}=as(vi(B=>({projectPath:B.projectPath,projectOpenError:B.projectOpenError,setProjectPath:B.setProjectPath,setProjectOpenError:B.setProjectOpenError}))),b=zd({mutationFn:B=>nt("/api/projects/open",{method:"POST",body:JSON.stringify({path:B})}),onSuccess:B=>{p(B.rootPath),m("")},onError:B=>{m(DC(B))}}),y=gn({queryKey:["project-root-default"],queryFn:()=>nt("/api/projects/browse")}),[_,T]=w.useState(()=>{try{const B=localStorage.getItem(bt.projectRoots);if(!B)return[];const Q=JSON.parse(B);if(Array.isArray(Q))return Q.filter(X=>typeof X=="string")}catch{return[]}return[]}),A=w.useMemo(()=>{const B=_.map(Q=>Q.trim()).filter(Boolean);return Array.from(new Set(B))},[_]),C=w.useMemo(()=>A.length?A:y.data?.path?[y.data.path]:Mr,[y.data?.path,A]),N=gn({queryKey:["project-root-listings",C],queryFn:async()=>await Promise.all(C.map(async Q=>{try{const X=await nt(`/api/projects/browse?path=${encodeURIComponent(Q)}`);return{inputPath:Q,rootPath:X.path,entries:X.entries}}catch(X){const Ee=br(X);return{inputPath:Q,rootPath:Q,entries:Mr,error:Ee||"invalid_path"}}})),enabled:C.length>0}).data??(A.length===0&&y.data?[{inputPath:y.data.path,rootPath:y.data.path,entries:y.data.entries}]:Mr),L=w.useMemo(()=>N.flatMap(B=>B.entries),[N]),O=w.useMemo(()=>N.map(B=>o?{...B,filteredEntries:B.entries.filter(Q=>`${Q.name} ${Q.path}`.toLowerCase().includes(o))}:{...B,filteredEntries:B.entries}),[o,N]),P=w.useMemo(()=>o?O.filter(B=>B.error||B.filteredEntries.length>0):O,[O,o]),V=w.useMemo(()=>N.length?N.length===1?N[0]?.rootPath:`${N.length} roots`:"",[N]),G=!!d&&!L.some(B=>B.path===d),Z=w.useMemo(()=>!G||!d?Mr:[{name:d,path:d}],[d,G]),z=w.useMemo(()=>{const B=l.filter(Q=>!G||Q!==d).map(Q=>({name:rQ(Q),path:Q}));return o?B.filter(Q=>`${Q.name} ${Q.path}`.toLowerCase().includes(o)):B},[o,d,G,l]);w.useEffect(()=>{!y.data?.path||_.some(Q=>Q.trim())||T([y.data.path])},[y.data?.path,_]),w.useEffect(()=>{if(A.length){localStorage.setItem(bt.projectRoots,JSON.stringify(A));return}localStorage.removeItem(bt.projectRoots)},[A]),w.useEffect(()=>{d&&c(B=>{const X=[d,...B.filter(Ee=>Ee!==d)].slice(0,w3);return localStorage.setItem(bt.recentProjects,JSON.stringify(X)),X})},[d]);const re=B=>{n(B),e?.(B)},W=B=>{B&&(f&&m(""),b.mutate(B))},he=B=>{B!==d&&(W(B),n(!1))},ue=B=>x.jsx("li",{className:"menu-title text-xs px-1","data-testid":"project-dropdown-group",children:x.jsx("span",{children:B})}),se=(B,Q="")=>B.map(X=>x.jsx("li",{children:x.jsx("button",{type:"button",className:"px-1",onClick:()=>he(X.path),"data-testid":"project-dropdown-item","data-path":X.path,children:X.name})},`${Q}${X.path}`));return x.jsxs(gb,{open:t,onOpenChange:re,children:[x.jsx(bb,{asChild:!0,children:x.jsx("button",{tabIndex:0,className:"btn btn-ghost justify-between","data-testid":"project-dropdown-trigger",children:x.jsxs("div",{className:"flex flex-col items-start",children:[x.jsx("span",{className:"text-xs text-gray-400",children:"Current project"}),x.jsx("span",{className:"truncate",children:d||(V?`Select a project (${V})`:"Select a project")})]})})}),x.jsxs(yb,{align:"start",className:"rounded-box bg-base-100 p-2 shadow w-full","data-testid":"project-dropdown-content",children:[x.jsx("input",{className:"input input-ghost input-xs px-1",placeholder:"Search projects",value:r,onChange:B=>a(B.target.value),"data-testid":"project-dropdown-filter"}),x.jsxs("ul",{className:"menu mt-2 p-0 max-h-96 flex-nowrap overflow-auto w-full","data-testid":"project-dropdown-list",children:[Z.length?se(Z,"missing-"):null,z.length?x.jsxs(w.Fragment,{children:[ue("Recent"),se(z,"recent-")]}):null,P.length?P.map(B=>x.jsxs(w.Fragment,{children:[ue(B.rootPath),B.filteredEntries.length?se(B.filteredEntries):x.jsx("li",{className:"disabled",children:x.jsx("span",{children:B.error?B.error==="invalid_path"?"Invalid path":B.error:o?"No matches":"No projects found"})})]},B.inputPath)):z.length?null:x.jsx("li",{className:"disabled",children:x.jsx("span",{children:L.length?"No matches":"No projects found"})})]})]})]})},E2='"Space Mono", monospace',v2=14,xf="diffact",_2=!1,x2="codex",A3=()=>{try{return localStorage.getItem(bt.fontFamily)||E2}catch{return E2}},k3=()=>{try{const e=localStorage.getItem(bt.fontSize);return e?parseInt(e,10):v2}catch{return v2}},N3=(e,t)=>{document.documentElement.style.setProperty("--font-mono",e),document.documentElement.style.setProperty("--font-mono-size",`${t}px`)},R3=()=>{try{return localStorage.getItem(bt.theme)||xf}catch{return xf}},L3=()=>{try{const e=localStorage.getItem(bt.darkMode);return e?e==="true":_2}catch{return _2}},O3=(e,t)=>{const n=e.trim()||xf,r=t?`${n}-dark`:n;document.documentElement.dataset.theme=r},aQ=()=>{try{const e=localStorage.getItem(bt.cliProvider);return e==="claude"||e==="opencode"?e:x2}catch{return x2}},sQ=e=>{localStorage.setItem(bt.cliProvider,e)},oQ=e=>{const t=e.trim()||xf;localStorage.setItem(bt.theme,t)},lQ=e=>{localStorage.setItem(bt.darkMode,e?"true":"false")};typeof document<"u"&&(N3(A3(),k3()),O3(R3(),L3()));const uQ=[{label:"Space Mono",value:'"Space Mono", monospace'},{label:"JetBrains Mono",value:'"JetBrains Mono", monospace'},{label:"Fira Code",value:'"Fira Code", monospace'},{label:"SF Mono",value:'"SF Mono", monospace'},{label:"Menlo",value:"Menlo, monospace"},{label:"Monaco",value:"Monaco, monospace"},{label:"Consolas",value:"Consolas, monospace"},{label:"System",value:"ui-monospace, monospace"}],cQ=[12,13,14,15,16,18],dQ=[{label:"Diffact",value:"diffact"}],fQ="eleven_v3",C0=[{value:"eleven_v3",label:"Eleven v3 (default)"},{value:"eleven_multilingual_v2",label:"Eleven Multilingual v2"},{value:"eleven_turbo_v2_5",label:"Eleven Turbo v2.5"},{value:"eleven_flash_v2_5",label:"Eleven Flash v2.5"}],hQ=[{id:"codex",label:"Codex CLI",available:!0},{id:"claude",label:"Claude Code",available:!0},{id:"opencode",label:"OpenCode",available:!0}],pQ=({open:e,onOpenChange:t})=>{const n=w.useRef(null),[r,a]=w.useState(A3),[o,l]=w.useState(k3),[c,d]=w.useState("general"),[f,p]=w.useState(R3),[m,b]=w.useState(L3),[y,_]=w.useState(aQ),[T,A]=w.useState(!1),[C,k]=w.useState(""),[N,L]=w.useState(""),[O,P]=w.useState("gpt-5.2"),[V,G]=w.useState(""),[Z,z]=w.useState(""),[re,W]=w.useState(!1),[he,ue]=w.useState(""),[se,B]=w.useState(!1),[Q,X]=w.useState(""),[Ee,H]=w.useState(!1),[$,ae]=w.useState(""),[D,fe]=w.useState(!1),[we,Se]=w.useState(""),[ve,je]=w.useState(""),[ze,yt]=w.useState(!1),[Xt,fn]=w.useState(!1),[dr,Gn]=w.useState(!1),[Ci,Vr]=w.useState(!1),hn=gn({queryKey:["project-root-default"],queryFn:()=>nt("/api/projects/browse")}),Kt=gn({queryKey:["telegram-status"],queryFn:()=>nt("/api/telegram/status")}),Ln=gn({queryKey:["cli-providers"],queryFn:()=>nt("/api/cli/providers")}),En=gn({queryKey:["embedded-config"],queryFn:()=>nt("/api/embedded/config")}),[vn,qr]=w.useState(()=>{try{const me=localStorage.getItem(bt.projectRoots);if(!me)return[];const He=JSON.parse(me);if(Array.isArray(He))return He.filter(Ct=>typeof Ct=="string")}catch{return[]}return[]}),fr=w.useMemo(()=>{const me=vn.map(He=>He.trim()).filter(Boolean);return Array.from(new Set(me))},[vn]),Pt=w.useMemo(()=>fr.length?fr:hn.data?.path?[hn.data.path]:Mr,[hn.data?.path,fr]),le=gn({queryKey:["project-root-listings",Pt],queryFn:async()=>await Promise.all(Pt.map(async He=>{try{const Ct=await nt(`/api/projects/browse?path=${encodeURIComponent(He)}`);return{inputPath:He,rootPath:Ct.path,entries:Ct.entries}}catch(Ct){const wi=br(Ct);return{inputPath:He,rootPath:He,entries:Mr,error:wi||"invalid_path"}}})),enabled:Pt.length>0}).data??(fr.length===0&&hn.data?[{inputPath:hn.data.path,rootPath:hn.data.path,entries:hn.data.entries}]:Mr),ye=w.useMemo(()=>{const me=new Map;for(const He of le)He.error&&me.set(He.inputPath,He.error);return me},[le]),Ne=Ln.data?.providers??hQ,Me=Ln.data?.effective??null,Ke=Me?Ne.find(me=>me.id===Me)?.label||Me:null,xt=Kt.data,hr=xt?.tokenSuffix?`********${xt.tokenSuffix}`:"",Zt=xt?.elevenLabsApiKeySuffix?`********${xt.elevenLabsApiKeySuffix}`:"",Tt=xt?.elevenLabsVoiceIdSuffix?`********${xt.elevenLabsVoiceIdSuffix}`:"",St=xt?.elevenLabsModelId||fQ,rt=se||he?he:hr,Sr=Ee||Q?Q:Zt,On=D||$?$:Tt,Vo=we||St,us=w.useMemo(()=>C0.some(me=>me.value===St)?C0:[...C0,{value:St,label:`Custom (${St})`}],[St]),cs=Vo!==St;w.useEffect(()=>{!hn.data?.path||vn.some(He=>He.trim())||qr([hn.data.path])},[hn.data?.path,vn]),w.useEffect(()=>{if(fr.length){localStorage.setItem(bt.projectRoots,JSON.stringify(fr));return}localStorage.removeItem(bt.projectRoots)},[fr]),w.useEffect(()=>{localStorage.setItem(bt.fontFamily,r),localStorage.setItem(bt.fontSize,String(o)),N3(r,o)},[r,o]),w.useEffect(()=>{oQ(f),lQ(m),O3(f,m)},[m,f]),w.useEffect(()=>{sQ(y)},[y]),w.useEffect(()=>{const me=Ln.data?.preferred;(me==="codex"||me==="claude"||me==="opencode")&&me!==y&&_(me)},[Ln.data?.preferred,y]),w.useEffect(()=>{En.data&&(L(En.data.baseUrl),P(En.data.model),G(En.data.apiKey))},[En.data]);const ds=async me=>{_(me),A(!0),k("");try{await nt("/api/cli/providers",{method:"POST",body:JSON.stringify({preferred:me})}),await Ln.refetch()}catch(He){const Ct=br(He);k(Ct||"Failed to update CLI provider.")}finally{A(!1)}},Gr=async()=>{W(!0),z("");try{await nt("/api/embedded/config",{method:"POST",body:JSON.stringify({baseUrl:N,model:O,apiKey:V})}),await En.refetch()}catch(me){const He=br(me);z(He||"Failed to save embedded agent config.")}finally{W(!1)}},fs=async me=>{yt(!0),je("");try{await nt("/api/telegram/token",{method:"POST",body:JSON.stringify({token:me})}),ue(""),B(!1),await Kt.refetch()}catch(He){const Ct=br(He);je(Ct||"Failed to save token.")}finally{yt(!1)}},ya=async me=>{fn(!0),je("");try{await nt("/api/telegram/elevenlabs",{method:"POST",body:JSON.stringify({apiKey:me})}),X(""),H(!1),await Kt.refetch()}catch(He){const Ct=br(He);je(Ct||"Failed to save ElevenLabs API key.")}finally{fn(!1)}},rh=async me=>{Gn(!0),je("");try{await nt("/api/telegram/elevenlabs",{method:"POST",body:JSON.stringify({voiceId:me})}),ae(""),fe(!1),await Kt.refetch()}catch(He){const Ct=br(He);je(Ct||"Failed to save ElevenLabs voice id.")}finally{Gn(!1)}},Vu=async me=>{Vr(!0),je("");try{await nt("/api/telegram/elevenlabs",{method:"POST",body:JSON.stringify({modelId:me})}),Se(""),await Kt.refetch()}catch(He){const Ct=br(He);je(Ct||"Failed to save ElevenLabs model id.")}finally{Vr(!1)}};return w.useEffect(()=>{const me=n.current;if(me){if(e&&!me.open){me.showModal();return}!e&&me.open&&me.close()}},[e]),x.jsxs("dialog",{ref:n,className:"modal",onClose:()=>t(!1),"data-testid":"settings-modal",children:[x.jsxs("div",{className:"modal-box w-150 max-w-[90vw] h-120 max-h-[80vh] flex flex-col","data-testid":"settings-dropdown-content",children:[x.jsxs("div",{className:"flex items-center justify-between","data-testid":"settings-modal-header",children:[x.jsx("h2",{className:"text-sm font-semibold",children:"Settings"}),x.jsx("button",{type:"button",className:"btn btn-ghost btn-xs",onClick:()=>n.current?.close(),"data-testid":"settings-modal-close",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 6 6 18"}),x.jsx("path",{d:"m6 6 12 12"})]})})]}),x.jsxs("div",{className:"mt-4 flex gap-4 flex-1 min-h-0","data-testid":"settings-modal-body",children:[x.jsx("div",{className:"flex w-32 shrink-0 flex-col gap-1","data-testid":"settings-modal-nav",children:[{id:"general",label:"General"},{id:"appearance",label:"Appearance"},{id:"embedded",label:"Embedded"},{id:"cli",label:"CLI Agent"},{id:"telegram",label:"Telegram"}].map(me=>x.jsx("button",{type:"button",className:`btn btn-ghost btn-sm justify-start ${c===me.id?"btn-active":""}`,onClick:()=>d(me.id),"data-testid":`settings-modal-nav-${me.id}`,children:me.label},me.id))}),x.jsxs("div",{className:"min-w-0 flex-1 overflow-y-auto","data-testid":"settings-modal-content",children:[c==="general"&&x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-section-general",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Project Roots"}),x.jsxs("div",{className:"space-y-2","data-testid":"settings-dropdown-project-roots",children:[vn.length?vn.map((me,He)=>{const Ct=me.trim(),wi=Ct?ye.get(Ct):"";return x.jsxs("div",{className:"flex items-start gap-2",children:[x.jsxs("div",{className:"flex-1",children:[x.jsx("input",{className:"input input-sm w-full font-mono text-xs bg-base-100",placeholder:"/path/to/projects",value:me,onChange:hs=>{const ps=[...vn];ps[He]=hs.target.value,qr(ps)},"data-testid":"settings-dropdown-root-input","data-index":He}),wi?x.jsx("div",{className:"mt-1 text-xs text-error",children:wi==="invalid_path"?"Invalid path":wi}):null]}),vn.length>1?x.jsx("button",{type:"button",className:"btn btn-ghost btn-xs text-base-content/40 hover:text-error",onClick:()=>{qr(hs=>hs.filter((ps,qo)=>qo!==He))},"data-testid":"settings-dropdown-remove-root","data-index":He,children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 6 6 18"}),x.jsx("path",{d:"m6 6 12 12"})]})}):null]},He)}):x.jsx("input",{className:"input input-sm w-full font-mono text-xs bg-base-100",placeholder:"/path/to/projects",value:"",onChange:me=>qr([me.target.value]),"data-testid":"settings-dropdown-root-input","data-index":0}),x.jsxs("button",{type:"button",className:"btn btn-ghost btn-xs text-base-content/60 gap-1",onClick:()=>qr(me=>[...me,""]),"data-testid":"settings-dropdown-add-root",children:[x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M5 12h14"}),x.jsx("path",{d:"M12 5v14"})]}),"Add path"]})]})]}),c==="appearance"&&x.jsxs("div",{className:"space-y-4","data-testid":"settings-section-appearance",children:[x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-appearance-font",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Font"}),x.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Family"})}),x.jsx("select",{className:"select select-sm bg-base-100",value:r,onChange:me=>a(me.currentTarget.value),"data-testid":"settings-appearance-font-family",children:uQ.map(me=>x.jsx("option",{value:me.value,children:me.label},me.value))})]}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Size"})}),x.jsx("select",{className:"select select-sm bg-base-100",value:o,onChange:me=>l(Number(me.currentTarget.value)),"data-testid":"settings-appearance-font-size",children:cQ.map(me=>x.jsxs("option",{value:me,children:[me,"px"]},me))})]})]})]}),x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-appearance-theme",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Theme"}),x.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Base"})}),x.jsx("select",{className:"select select-sm bg-base-100",value:f,onChange:me=>p(me.currentTarget.value),"data-testid":"settings-appearance-theme-select",children:dQ.map(me=>x.jsx("option",{value:me.value,children:me.label},me.value))})]}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Mode"})}),x.jsxs("div",{className:"flex h-8 items-center justify-between rounded-lg bg-base-100 px-3 text-sm","data-testid":"settings-appearance-dark-mode",children:[x.jsx("span",{children:"Dark"}),x.jsx("input",{type:"checkbox",className:"toggle toggle-sm",checked:m,onChange:me=>b(me.currentTarget.checked),"aria-label":"Dark mode"})]})]})]})]})]}),c==="embedded"&&x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-section-embedded",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Embedded Agent"}),x.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[x.jsxs("label",{className:"form-control w-full sm:col-span-2",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Base URL"})}),x.jsx("input",{className:"input input-sm w-full font-mono text-xs bg-base-100",value:N,onChange:me=>L(me.currentTarget.value),placeholder:"https://api.openai.com/v1","data-testid":"settings-embedded-base-url"})]}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Model"})}),x.jsx("input",{className:"input input-sm w-full font-mono text-xs bg-base-100",value:O,onChange:me=>P(me.currentTarget.value),placeholder:"gpt-5.2","data-testid":"settings-embedded-model"})]}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"API Key"})}),x.jsx("input",{type:"password",className:"input input-sm w-full font-mono text-xs bg-base-100",value:V,onChange:me=>G(me.currentTarget.value),placeholder:"sk-...","data-testid":"settings-embedded-api-key"})]})]}),x.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:x.jsx("button",{type:"button",className:"btn btn-sm",disabled:re,onClick:()=>Gr(),"data-testid":"settings-embedded-save",children:"Save config"})}),Z?x.jsx("div",{className:"mt-2 text-xs text-error",children:Z}):null,x.jsx("div",{className:"mt-2 text-xs text-base-content/60","data-testid":"settings-embedded-status",children:En.isLoading?"Loading config...":V.trim()&&O.trim()?"Status: configured":"Status: missing model or key"})]}),c==="cli"&&x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-section-cli",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"CLI Agent"}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Preferred provider"})}),x.jsx("select",{className:"select select-sm bg-base-100",value:y,onChange:me=>ds(me.currentTarget.value),disabled:T,"data-testid":"settings-cli-provider-select",children:Ne.map(me=>x.jsxs("option",{value:me.id,children:[me.label,me.available?"":" (not found)"]},me.id))})]}),C?x.jsx("div",{className:"mt-2 text-xs text-error",children:C}):null,x.jsx("div",{className:"mt-2 text-xs text-base-content/60","data-testid":"settings-cli-provider-status",children:Ln.isLoading?"Loading provider status...":Ke?`Effective provider: ${Ke}`:"No CLI provider available."})]}),c==="telegram"&&x.jsxs("div",{className:"space-y-4","data-testid":"settings-section-telegram",children:[x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-integrations-telegram",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Telegram Bot"}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Bot Token"})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("input",{type:"password",className:"input input-sm w-full font-mono text-xs bg-base-100",value:rt,onFocus:()=>B(!0),onBlur:()=>{he.trim()||B(!1)},onChange:me=>ue(me.currentTarget.value),placeholder:"123456:ABC-DEF...","data-testid":"settings-telegram-token"}),x.jsx("button",{type:"button",className:"btn btn-sm shrink-0",disabled:ze||!he.trim(),onClick:()=>fs(he.trim()),"data-testid":"settings-telegram-save",children:"Save"})]})]}),ve?x.jsx("div",{className:"text-xs text-error",children:ve}):null,x.jsx("div",{className:"text-xs text-base-content/60","data-testid":"settings-telegram-status",children:Kt.isLoading?"Loading status...":Kt.data?Kt.data.running?"Status: running":Kt.data.hasToken?"Status: stopped":"Status: disabled":"Status: unknown"})]}),x.jsxs("fieldset",{className:"fieldset bg-base-200/50 rounded-lg p-4","data-testid":"settings-integrations-telegram-voice",children:[x.jsx("legend",{className:"fieldset-legend text-xs font-medium px-1",children:"Telegram Voice"}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"ElevenLabs API Key"})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("input",{type:"password",className:"input input-sm w-full font-mono text-xs bg-base-100",value:Sr,onFocus:()=>H(!0),onBlur:()=>{Q.trim()||H(!1)},onChange:me=>X(me.currentTarget.value),placeholder:"sk_...","data-testid":"settings-telegram-elevenlabs-api-key"}),x.jsx("button",{type:"button",className:"btn btn-sm shrink-0",disabled:Xt||!Q.trim(),onClick:()=>ya(Q.trim()),"data-testid":"settings-telegram-elevenlabs-save",children:"Save"})]})]}),x.jsxs("label",{className:"form-control mt-3 w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"ElevenLabs Voice ID"})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("input",{type:"password",className:"input input-sm w-full font-mono text-xs bg-base-100",value:On,onFocus:()=>fe(!0),onBlur:()=>{$.trim()||fe(!1)},onChange:me=>ae(me.currentTarget.value),placeholder:"21m00Tcm4TlvDq8ikWAM","data-testid":"settings-telegram-elevenlabs-voice-id"}),x.jsx("button",{type:"button",className:"btn btn-sm shrink-0",disabled:dr||!$.trim(),onClick:()=>rh($.trim()),"data-testid":"settings-telegram-elevenlabs-voice-id-save",children:"Save"})]})]}),x.jsxs("label",{className:"form-control mt-3 w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"ElevenLabs Model ID"})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("select",{className:"select select-sm w-full bg-base-100 font-mono text-xs",value:Vo,onChange:me=>Se(me.currentTarget.value),"data-testid":"settings-telegram-elevenlabs-model-id",children:us.map(me=>x.jsx("option",{value:me.value,children:me.label},me.value))}),x.jsx("button",{type:"button",className:"btn btn-sm shrink-0",disabled:Ci||!cs,onClick:()=>Vu(Vo),"data-testid":"settings-telegram-elevenlabs-model-id-save",children:"Save"})]})]}),ve?x.jsx("div",{className:"text-xs text-error",children:ve}):null,x.jsx("div",{className:"text-xs text-base-content/60","data-testid":"settings-telegram-elevenlabs-status",children:Kt.isLoading?"Voice: loading...":Kt.data?.hasElevenLabsApiKey?Kt.data?.hasElevenLabsVoiceId?"Voice: enabled":"Voice: enabled (voice id auto-discovery)":"Voice: disabled (missing ElevenLabs key)"})]})]})]})]})]}),x.jsx("form",{method:"dialog",className:"modal-backdrop",children:x.jsx("button",{type:"submit",children:"close"})})]})},mQ=()=>{const[e,t]=w.useState(!1);return x.jsxs("div",{className:"flex items-center","data-testid":"settings-button",children:[x.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>t(!0),children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:[x.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),x.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),x.jsx(pQ,{open:e,onOpenChange:t})]})},gQ=w.memo(({hasGit:e,hasGithub:t,capabilitiesLoading:n})=>x.jsx("header",{className:"border-b border-base-300 bg-base-100","data-testid":"app-header",children:x.jsx("div",{className:"flex flex-col gap-3 px-4 py-3",children:x.jsxs("div",{className:"flex flex-wrap items-center gap-3","data-testid":"app-header-content",children:[x.jsxs("div",{className:"text-3xl font-semibold","data-testid":"app-logo",children:["Diff",x.jsx("span",{className:"text-primary",children:"act"})]}),x.jsxs("div",{className:"flex flex-1 flex-nowrap gap-2","data-testid":"app-header-controls",children:[x.jsx(iQ,{}),x.jsx(tQ,{hasGit:e,hasGithub:t,capabilitiesLoading:n})]}),x.jsx(mQ,{})]})})})),bQ=({projectPath:e,isActive:t,selectedFilePath:n,onSelectedFilePathChange:r})=>{const[a,o]=w.useState({}),l=gn({queryKey:["git-diff",e],queryFn:()=>Ex(`/api/projects/diff?project=${encodeURIComponent(e)}`),enabled:!!(e&&t)}),c=gn({queryKey:["git-diff-staged",e],queryFn:()=>Ex(`/api/projects/diff?project=${encodeURIComponent(e)}&arg=--cached`),enabled:!!(e&&t)}),d=w.useMemo(()=>lg(l.data),[l.data]),f=w.useMemo(()=>lg(c.data),[c.data]),p=w.useMemo(()=>new Set(f.map(k=>k.path)),[f]),m=w.useMemo(()=>{const k=new Set;for(const N of f)k.add(N.path);for(const N of d)k.add(N.path);return k},[f,d]),b=w.useMemo(()=>og(f,d).map(N=>({...N,staged:N.path in a?a[N.path]:p.has(N.path)})),[f,a,p,d]),y=w.useMemo(()=>n?b.find(k=>k.path===n)||null:b[0]||null,[b,n]),T=w.useMemo(()=>y?y.fileDiff?y.fileDiff:IC(y.path,y.patch):null,[y])||null,A=w.useCallback(async(k,N)=>{if(!e||!k)return;const L=a[k];o(O=>({...O,[k]:N}));try{await nt(`/api/projects/stage?project=${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({path:k,staged:N})})}catch(O){console.error("Failed to update staged state",O),o(P=>{if(!(k in P)||P[k]!==N)return P;if(L===void 0){const V={...P};return delete V[k],V}return{...P,[k]:L}})}},[e,a]),C=w.useCallback(async k=>{if(!e||b.length===0)return;const N=Array.from(new Set(b.map(O=>O.path))).filter(Boolean);if(N.length===0)return;const L=new Map(N.map(O=>[O,a[O]]));o(O=>{const P={...O};for(const V of N)P[V]=k;return P});try{await nt(`/api/projects/stage?project=${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({paths:N,staged:k})})}catch(O){console.error("Failed to update staged state",O),o(P=>{let V=!1;const G={...P};for(const Z of N){if(!(Z in P)||P[Z]!==k)continue;const z=L.get(Z);if(z===void 0){delete G[Z],V=!0;continue}G[Z]=z,V=!0}return V?G:P})}},[b,e,a]);return w.useEffect(()=>{o(k=>{let N=!1;const L={...k};for(const[O,P]of Object.entries(k))(!m.has(O)||p.has(O)===P)&&(delete L[O],N=!0);return N?L:k})},[m,p]),w.useEffect(()=>{if(!b.length){r("");return}if(!n){r(b[0]?.path||"");return}b.find(N=>N.path===n)||r(b[0]?.path||"")},[b,r,n]),{changes:b,selectedChange:y,selectedFileDiff:T,changesLoading:l.isLoading||c.isLoading,diffError:l.error||c.error,toggleStage:A,toggleStageAll:C}},yQ=({projectPath:e,filePath:t,isActive:n})=>{const r=gn({queryKey:["file-content",e,t],queryFn:()=>nt(`/api/projects/file?project=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}`),enabled:!!(e&&t&&n)});return{file:r.data??null,isLoading:r.isLoading,error:r.error}},EQ=e=>{const t=[],n=r=>{for(const a of r){if(a.type==="file"){t.push({name:a.name,path:a.path});continue}a.children?.length&&n(a.children)}};return n(e),t},vQ=({projectPath:e,isActive:t,selectedFilePath:n,onSelectedFilePathChange:r})=>{const a=gn({queryKey:["file-tree",e],queryFn:()=>nt(`/api/projects/tree?project=${encodeURIComponent(e)}`),enabled:!!(e&&t)}),o=a.data?.entries??Mr,l=w.useMemo(()=>EQ(o),[o]),c=a.data?.available??!0;return w.useEffect(()=>{if(!t)return;if(!l.length){r("");return}if(!n){r(l[0]?.path||"");return}l.some(f=>f.path===n)||r(l[0]?.path||"")},[l,t,r,n]),{entries:o,flatFiles:l,isAvailable:c,isLoading:a.isLoading}},_Q=({projectPath:e,selectedCommitSha:t,onSelectedCommitShaChange:n,selectedHistoryFilePath:r,onSelectedHistoryFilePathChange:a,hasGit:o,isActive:l,pageSize:c})=>{const{currentBranch:d}=PC(e,o),[f,p]=w.useState([]),[m,b]=w.useState(!1),y=Tf({queryKey:["git-history",e,d||""],queryFn:({pageParam:L=0})=>nt(`/api/projects/history?project=${encodeURIComponent(e)}&skip=${L}&limit=${c}`),getNextPageParam:L=>{if(!(!L||!L.hasMore))return L.nextSkip},initialPageParam:0,enabled:!!(e&&o&&l)}),_=w.useMemo(()=>y.data?.pages.flatMap(L=>L.items)??[],[y.data]),T=w.useMemo(()=>_.find(L=>L.sha===t)||null,[_,t]);w.useEffect(()=>{if(!e||!o||!t){p([]);return}if(!l)return;let L=!1;const O=new AbortController;return p([]),(async()=>{try{const V=await nt(`/api/projects/commits/${encodeURIComponent(t)}/files?project=${encodeURIComponent(e)}`,{signal:O.signal});if(L)return;V&&V.length&&p(G=>og(G,V))}catch(V){if(V instanceof DOMException&&V.name==="AbortError")return;console.error("Failed to load commit files",V)}})(),()=>{L=!0,O.abort()}},[o,l,e,t]),w.useEffect(()=>{if(!e||!o||!t){b(!1);return}if(!l){b(!1);return}let L=!1;const O=new AbortController;b(!0);const P=Z=>{if(!Z.trim())return;const z=lg(Z);z.length&&p(re=>og(re,z))},V=Z=>{Z.trim()&&P(Z.endsWith(`
|
|
1445
|
+
`)?Z:`${Z}
|
|
1446
|
+
`)};return(async()=>{try{const Z=await fetch(`/api/projects/commits/${encodeURIComponent(t)}/diff?project=${encodeURIComponent(e)}`,{signal:O.signal});if(!Z.ok){const ue=await Z.text();throw new Error(ue||Z.statusText)}const z=Z.body?.getReader();if(!z){const ue=await Z.text();P(ue);return}const re=new TextDecoder;let W="",he="";for(;;){const{value:ue,done:se}=await z.read();if(se)break;W+=re.decode(ue,{stream:!0});let B=W.indexOf(`
|
|
1447
|
+
`);for(;B!==-1;){const Q=W.slice(0,B);W=W.slice(B+1),Q.startsWith("diff --")?(he&&V(he),he=`${Q}
|
|
1448
|
+
`):he&&(he+=`${Q}
|
|
1449
|
+
`),B=W.indexOf(`
|
|
1450
|
+
`)}}W+=re.decode(),W&&(he?he+=W:he=W),he&&V(he)}catch(Z){if(Z instanceof DOMException&&Z.name==="AbortError")return;console.error("Failed to load commit diff",Z)}finally{L||b(!1)}})(),()=>{L=!0,O.abort()}},[o,l,e,t]);const A=w.useMemo(()=>r?f.find(L=>L.path===r)||null:f[0]||null,[f,r]),k=w.useMemo(()=>A?A.fileDiff?A.fileDiff:IC(A.path,A.patch):null,[A])||null;w.useEffect(()=>{if(!l)return;if(!_.length){n("");return}_.some(O=>O.sha===t)||n(_[0]?.sha||"")},[_,l,n,t]),w.useEffect(()=>{if(!l)return;if(!f.length){a("");return}if(!r){a(f[0]?.path||"");return}f.some(O=>O.path===r)||a(f[0]?.path||"")},[f,l,a,r]);const N=w.useCallback(()=>{!y.hasNextPage||y.isFetchingNextPage||y.fetchNextPage()},[y.fetchNextPage,y.hasNextPage,y.isFetchingNextPage]);return{historyCommits:_,selectedCommit:T,historyChanges:f,selectedHistoryChange:A,selectedHistoryFileDiff:k,commitDiffLoading:m,historyLoading:y.isLoading,historyLoadingMore:y.isFetchingNextPage,hasMoreHistory:!!y.hasNextPage,loadMoreHistory:N}};function lo(e,t,n){let r=n.initialDeps??[],a,o=!0;function l(){var c,d,f;let p;n.key&&((c=n.debug)!=null&&c.call(n))&&(p=Date.now());const m=e();if(!(m.length!==r.length||m.some((_,T)=>r[T]!==_)))return a;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),a=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const _=Math.round((Date.now()-p)*100)/100,T=Math.round((Date.now()-y)*100)/100,A=T/16,C=(k,N)=>{for(k=String(k);k.length<N;)k=" "+k;return k};console.info(`%c⏱ ${C(T,5)} /${C(_,5)} ms`,`
|
|
1451
|
+
font-size: .6rem;
|
|
1452
|
+
font-weight: bold;
|
|
1453
|
+
color: hsl(${Math.max(0,Math.min(120-120*A,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(a),o=!1,a}return l.updateDeps=c=>{r=c},l}function T2(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const xQ=(e,t)=>Math.abs(e-t)<1.01,TQ=(e,t,n)=>{let r;return function(...a){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,a),n)}},S2=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},SQ=e=>e,CQ=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let a=t;a<=n;a++)r.push(a);return r},wQ=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const a=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(a(S2(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const f=d.borderBoxSize[0];if(f){a({width:f.inlineSize,height:f.blockSize});return}}a(S2(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},C2={passive:!0},w2=typeof window>"u"?!0:"onscrollend"in window,AQ=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let a=0;const o=e.options.useScrollendEvent&&w2?()=>{}:TQ(r,()=>{t(a,!1)},e.options.isScrollingResetDelay),l=p=>()=>{const{horizontal:m,isRtl:b}=e.options;a=m?n.scrollLeft*(b&&-1||1):n.scrollTop,o(),t(a,p)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,C2);const f=e.options.useScrollendEvent&&w2;return f&&n.addEventListener("scrollend",d,C2),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",d)}},kQ=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},NQ=(e,{adjustments:t=0,behavior:n},r)=>{var a,o;const l=e+t;(o=(a=r.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class RQ{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const l=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var a;(a=r())==null||a.disconnect(),n=null},observe:a=>{var o;return(o=r())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=r())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,a])=>{typeof a>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:SQ,rangeExtractor:CQ,onChange:()=>{},measureElement:kQ,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,a;(a=(r=this.options).onChange)==null||a.call(r,this,n)},this.maybeNotify=lo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const a=new Map,o=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(a.has(c.lane))continue;const d=o.get(c.lane);if(d==null||c.end>d.end?o.set(c.lane,c):c.end<d.end&&a.set(c.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=lo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,a,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:a,getItemKey:o,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=lo(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:a,getItemKey:o,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const p=this.measurementsCache.slice(0,f),m=new Array(c).fill(void 0);for(let b=0;b<f;b++){const y=p[b];y&&(m[y.lane]=b)}for(let b=f;b<n;b++){const y=o(b),_=this.laneAssignments.get(b);let T,A;if(_!==void 0&&this.options.lanes>1){T=_;const L=m[T],O=L!==void 0?p[L]:void 0;A=O?O.end+this.options.gap:r+a}else{const L=this.options.lanes===1?p[b-1]:this.getFurthestMeasurement(p,b);A=L?L.end+this.options.gap:r+a,T=L?L.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,T)}const C=d.get(y),k=typeof C=="number"?C:this.options.estimateSize(b),N=A+k;p[b]={index:b,start:A,size:k,end:N,key:y,lane:T},m[T]=b}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=lo(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,a,o)=>this.range=n.length>0&&r>0?LQ({measurements:n,outerSize:r,scrollOffset:a,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=lo(()=>{let n=null,r=null;const a=this.calculateRange();return a&&(n=a.startIndex,r=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,a,o,l)=>o===null||l===null?[]:n({startIndex:o,endIndex:l,overscan:r,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,a=n.getAttribute(r);return a?parseInt(a,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const a=this.indexFromElement(n),o=this.measurementsCache[a];if(!o)return;const l=o.key,c=this.elementsCache.get(l);c!==n&&(c&&this.observer.unobserve(c),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(a,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const a=this.measurementsCache[n];if(!a)return;const o=this.itemSizeCache.get(a.key)??a.size,l=r-o;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,l,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,a)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(a))});return}this._measureElement(n,void 0)},this.getVirtualItems=lo(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const a=[];for(let o=0,l=n.length;o<l;o++){const c=n[o],d=r[c];a.push(d)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return T2(r[D3(0,r.length-1,a=>T2(r[a]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,a=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+o?"end":"start"),r==="center"?n+=(a-o)/2:r==="end"&&(n-=o);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.measurementsCache[n];if(!a)return;const o=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(a.end>=l+o-this.options.scrollPaddingEnd)r="end";else if(a.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,a.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:a})},this.scrollToIndex=(n,{align:r="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const l=10,c=f=>{if(!this.targetWindow)return;const p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}const[m,b]=p;this._scrollToOffset(m,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{const y=()=>{if(this.currentScrollToIndex!==n)return;const _=this.getScrollOffset(),T=this.getOffsetForIndex(n,b);if(!T){console.warn("Failed to get offset for index:",n);return}xQ(T[0],_)||d(b)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(y):y()})},d=f=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<l?this.targetWindow.requestAnimationFrame(()=>c(f)):console.warn(`Failed to scroll to index ${n} after ${l} attempts.`))};c(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let a;if(r.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&o.some(c=>c===null);){const c=r[l];o[c.lane]===null&&(o[c.lane]=c.end),l--}a=Math.max(...o.filter(c=>c!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:a})=>{this.options.scrollToFn(n,{behavior:a,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const D3=(e,t,n,r)=>{for(;e<=t;){const a=(e+t)/2|0,o=n(a);if(o<r)e=a+1;else if(o>r)t=a-1;else return a}return e>0?e-1:0};function LQ({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const a=e.length-1,o=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:a};let l=D3(0,a,o,n),c=l;if(r===1)for(;c<a&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<a&&d.some(p=>p<n+t);){const p=e[c];d[p.lane]=p.end,c++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(p=>p>=n);){const p=e[l];f[p.lane]=p.start,l--}l=Math.max(0,l-l%r),c=Math.min(a,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const A2=typeof document<"u"?w.useLayoutEffect:w.useEffect;function OQ({useFlushSync:e=!0,...t}){const n=w.useReducer(()=>({}),{})[1],r={...t,onChange:(o,l)=>{var c;e&&l?If.flushSync(n):n(),(c=t.onChange)==null||c.call(t,o,l)}},[a]=w.useState(()=>new RQ(r));return a.setOptions(r),A2(()=>a._didMount(),[]),A2(()=>a._willUpdate()),a}function I3(e){return OQ({observeElementRect:wQ,observeElementOffset:AQ,scrollToFn:NQ,...e})}const M3=(e,t=200)=>{const[n,r]=w.useState(!1);return w.useEffect(()=>{if(!e){r(!1);return}const a=window.setTimeout(()=>{r(!0)},t);return()=>{window.clearTimeout(a)}},[t,e]),n},w0=({path:e})=>{const{prefix:t,name:n}=j4(e);return x.jsxs("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden","data-testid":"path-label",children:[x.jsx("span",{className:"min-w-0 shrink truncate text-sm text-base-content/50","data-testid":"path-label-prefix",children:t}),x.jsx("span",{className:"shrink-0 text-sm font-medium text-base-content","data-testid":"path-label-name",children:n})]})},nh=({path:e,previousPath:t})=>t&&t!==e?x.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden","data-testid":"path-label",children:[x.jsx(w0,{path:t}),x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4 lucide lucide-move-right-icon lucide-move-right",children:[x.jsx("path",{d:"M18 8L22 12L18 16"}),x.jsx("path",{d:"M2 12H22"})]}),x.jsx(w0,{path:e})]}):x.jsx(w0,{path:e}),DQ=e=>{const t=(e||"modified").toLowerCase();return t==="added"||t==="new"?x.jsx("span",{className:"badge badge-success badge-sm h-2 w-2 rounded-full p-0"}):t==="deleted"||t==="removed"?x.jsx("span",{className:"badge badge-error badge-sm h-2 w-2 rounded-full p-0"}):t==="renamed"?x.jsx("span",{className:"badge badge-info badge-sm h-2 w-2 rounded-full p-0"}):x.jsx("span",{className:"badge badge-warning badge-sm h-2 w-2 rounded-full p-0"})},P3=({changes:e,selectedFilePath:t,onFileSelect:n,onToggleStage:r,onToggleAll:a,isLoading:o=!1,scrollRef:l})=>{const c=!!a,d=w.useMemo(()=>e.filter(_=>_.staged).length,[e]),f=d>0&&d===e.length,p=d>0&&d<e.length,m=w.useRef(null),b=I3({count:e.length+(c?1:0),getScrollElement:()=>l?.current??null,estimateSize:()=>40,overscan:8}),y=M3(o,200);return w.useEffect(()=>{m.current&&(m.current.indeterminate=p)},[p]),o&&e.length===0?y?x.jsx("div",{className:"min-h-0 flex-1","data-testid":"changes-list",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60","data-testid":"changes-list-loading",children:"Loading changed files..."})}):x.jsx("div",{className:"min-h-0 flex-1","data-testid":"changes-list"}):e.length===0?x.jsx("div",{className:"min-h-0 flex-1","data-testid":"changes-list",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60","data-testid":"changes-list-empty",children:"Waiting for changed files."})}):x.jsx("div",{className:"min-h-0 flex-1","data-testid":"changes-list",children:x.jsx("div",{className:"w-full relative",style:{height:`${b.getTotalSize()}px`},"data-testid":"changes-list-virtualizer",children:b.getVirtualItems().map(_=>{if(c&&_.index===0)return x.jsx("div",{className:"absolute left-0 top-0 w-full",style:{height:`${_.size}px`,transform:`translateY(${_.start}px)`},children:x.jsxs("button",{type:"button",className:"flex min-w-0 items-center gap-2 h-full w-full text-left px-2 hover:bg-base-200",onClick:()=>a?.(!f),"data-testid":"changes-list-select-all",children:[x.jsx("input",{ref:m,type:"checkbox",className:"checkbox checkbox-xs",checked:f,onClick:C=>C.stopPropagation(),onChange:C=>a?.(C.currentTarget.checked),"aria-label":"Toggle all changes","data-testid":"changes-list-select-all-checkbox"}),x.jsx("span",{className:"truncate text-sm",children:`${e.length} changed files`})]})},"changes-select-all");const T=c?_.index-1:_.index,A=e[T];return A?x.jsx("div",{className:"absolute left-0 top-0 w-full",style:{height:`${_.size}px`,transform:`translateY(${_.start}px)`},children:x.jsxs("div",{className:`flex min-w-0 items-center gap-3 cursor-pointer px-2 py-2 h-full ${t===A.path?"bg-base-300":"hover:bg-base-200"}`,onClick:()=>n(A.path),title:A.path,"data-testid":"changes-list-item","data-path":A.path,children:[x.jsx("input",{type:"checkbox",className:"checkbox checkbox-xs",checked:!!A.staged,disabled:!r,onClick:C=>C.stopPropagation(),onChange:C=>r?.(A.path,C.currentTarget.checked),"aria-label":"Staged change","data-testid":"changes-list-item-checkbox","data-path":A.path}),x.jsx(nh,{path:A.path,previousPath:A.previousPath}),x.jsx("span",{className:"ml-auto flex flex-none items-center",children:DQ(A.status)})]})},A.path):null})})})},IQ=({children:e,className:t,style:n,dataTestId:r})=>{const a=["menu rounded-box w-full"];return t&&a.push(t),x.jsx("ul",{className:a.join(" "),style:n,"data-testid":r||"file-tree",children:e})},MQ=({className:e})=>x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:`${e} h-4 w-4`,children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),PQ=({className:e,open:t})=>t?x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:`${e} h-4 w-4`,children:x.jsx("path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"})}):x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:`${e} h-4 w-4`,children:x.jsx("path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})}),BQ=({entries:e,selectedFilePath:t,onFileSelect:n,isLoading:r,isAvailable:a,scrollRef:o})=>{const[l,c]=w.useState({}),d=w.useMemo(()=>{const m=[],b=(y,_)=>{for(const T of y){const A=T.type==="folder",C=!!T.children?.length;m.push({path:T.path,name:T.name,depth:_,type:T.type,hasChildren:C}),A&&C&&l[T.path]&&b(T.children||[],_+1)}};return b(e,0),m},[e,l]),f=I3({count:d.length,getScrollElement:()=>o?.current??null,estimateSize:()=>40,overscan:8}),p=m=>{c(b=>({...b,[m]:!b[m]}))};return r&&e.length===0?x.jsx("div",{className:"min-h-0 flex-1",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60",children:"Loading files..."})}):a?e.length?x.jsx(IQ,{className:"bg-base-100 max-w-none rounded-none relative",style:{height:`${f.getTotalSize()}px`},dataTestId:"file-tree-panel",children:f.getVirtualItems().map(m=>{const b=d[m.index];if(!b)return null;const y=b.type==="file"&&b.path===t,_=b.type==="folder"&&l[b.path],T=["flex min-w-0 items-center gap-2 h-full w-full text-left",y?"active":""].filter(Boolean).join(" ");return x.jsx("li",{className:"absolute left-0 top-0 w-full",style:{height:`${m.size}px`,transform:`translateY(${m.start}px)`},"data-testid":"file-tree-panel-row","data-path":b.path,children:x.jsx("button",{type:"button",className:T,onClick:()=>b.type==="folder"?b.hasChildren?p(b.path):void 0:n(b.path),title:b.path,"aria-expanded":b.type==="folder"?_:void 0,"data-testid":b.type==="folder"?"file-tree-panel-folder":"file-tree-panel-file","data-path":b.path,children:x.jsxs("span",{className:"flex min-w-0 items-center gap-2",style:{paddingLeft:`${b.depth*16}px`},children:[b.type==="folder"?x.jsx(PQ,{className:"shrink-0",open:_}):x.jsx(MQ,{className:"shrink-0"}),x.jsx("span",{className:"truncate",children:b.name})]})})},b.path)})}):x.jsx("div",{className:"min-h-0 flex-1",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60",children:"No files found."})}):x.jsx("div",{className:"min-h-0 flex-1",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60",children:"File tree requires a git repository."})})},jQ=({commits:e,selectedCommit:t,onCommitSelect:n,onLoadMore:r,hasMore:a,isLoading:o,isLoadingMore:l,hasGit:c})=>{const d=M3(o,200);return c?o&&e.length===0?d?x.jsx("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"history-list",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60","data-testid":"history-list-loading",children:"Loading commit history..."})}):x.jsx("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"history-list"}):e.length===0?x.jsx("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"history-list",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60","data-testid":"history-list-empty",children:"No commit history found."})}):x.jsxs("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"history-list",children:[x.jsx("ul",{className:"w-full","data-testid":"history-list-items",children:e.map(f=>x.jsx("li",{children:x.jsxs("button",{type:"button",className:`flex w-full flex-col items-start gap-1 p-2 cursor-pointer ${t===f.sha?"bg-base-300":"hover:bg-base-200"}`,onClick:()=>n(f.sha),"data-testid":"history-list-item","data-sha":f.sha,children:[x.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:x.jsx("span",{className:"truncate font-medium text-sm",children:f.subject||"(no message)"})}),x.jsxs("span",{className:"text-xs text-base-content/60",children:[f.authorName||"Unknown"," -"," ",Du(f.authoredAt)]})]})},f.sha))}),l?x.jsx("div",{className:"px-4 py-2 text-xs text-base-content/60","data-testid":"history-list-loading-more",children:"Loading more..."}):null]}):x.jsx("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"history-list",children:x.jsx("div",{className:"text-sm text-center mt-8 text-base-content/60","data-testid":"history-list-unavailable",children:"Git history requires a repository."})})},HQ=w.memo(({fileTreeEntries:e,fileTreeLoading:t,fileTreeAvailable:n,changes:r,changesLoading:a,onToggleStage:o,onToggleStageAll:l,historyCommits:c,onLoadMoreHistory:d,hasMoreHistory:f,historyLoading:p,historyLoadingMore:m,hasGit:b,onResizeStart:y})=>{const _=w.useRef(null),{sidebarTab:T,setSidebarTab:A}=as(vi(Z=>({sidebarTab:Z.sidebarTab,setSidebarTab:Z.setSidebarTab}))),{selectedTreeFilePath:C,selectedFilePath:k,selectedCommitSha:N,setSelectedTreeFilePath:L,setSelectedFilePath:O,setSelectedCommitSha:P}=Iu(vi(Z=>({selectedTreeFilePath:Z.selectedTreeFilePath,selectedFilePath:Z.selectedFilePath,selectedCommitSha:Z.selectedCommitSha,setSelectedTreeFilePath:Z.setSelectedTreeFilePath,setSelectedFilePath:Z.setSelectedFilePath,setSelectedCommitSha:Z.setSelectedCommitSha}))),V=24,G=Z=>{if(T!=="history"||!f||p||m)return;const z=Z.currentTarget;z.scrollTop+z.clientHeight<z.scrollHeight-V||d()};return x.jsxs("aside",{className:"relative flex min-h-0 flex-col overflow-hidden border-r border-base-300 bg-base-100","data-testid":"app-sidebar",children:[x.jsx("div",{className:"border-b border-base-300 px-3 py-2",children:x.jsx("div",{className:"tabs tabs-sm","data-testid":"app-sidebar-tabs",children:["files","changes","history"].map(Z=>x.jsx("button",{className:`tab flex-1 ${T===Z?"tab-active font-semibold":""}`,onClick:()=>A(Z),"data-testid":`app-sidebar-tab-${Z}`,children:Z.charAt(0).toUpperCase()+Z.slice(1)},Z))})}),x.jsx("div",{className:"min-h-0 flex-1 overflow-x-hidden overflow-y-auto",onScroll:G,ref:_,"data-testid":"app-sidebar-scroll",children:T==="files"?x.jsx(BQ,{entries:e,selectedFilePath:C,onFileSelect:L,isLoading:t,isAvailable:n,scrollRef:_}):T==="changes"?x.jsx(P3,{changes:r,selectedFilePath:k,onFileSelect:O,onToggleStage:o,onToggleAll:l,isLoading:a,scrollRef:_}):x.jsx(jQ,{commits:c,selectedCommit:N,onCommitSelect:P,onLoadMore:d,hasMore:f,isLoading:p,isLoadingMore:m,hasGit:b})}),x.jsx("div",{className:"absolute right-0 top-0 h-full w-2 cursor-col-resize bg-transparent hover:bg-base-300/40",onPointerDown:y,"data-testid":"app-sidebar-resize-handle"})]})}),B3={position:"absolute",top:0,bottom:0,textAlign:"center"};function FQ({file:e,renderHeaderMetadata:t,renderAnnotation:n,lineAnnotations:r,renderHoverUtility:a,getHoveredLine:o}){const l=t?.(e);return x.jsxs(x.Fragment,{children:[l!=null&&x.jsx("div",{slot:ku,children:l}),n!=null&&r?.map((c,d)=>x.jsx("div",{slot:Za(c),children:n(c)},d)),a!=null&&x.jsx("div",{slot:"hover-slot",style:B3,children:a(o)})]})}function j3(e,t){return typeof window>"u"&&t!=null?x.jsxs(x.Fragment,{children:[x.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):x.jsx(x.Fragment,{children:e})}var Jl={exports:{}},UQ=Jl.exports,k2;function zQ(){return k2||(k2=1,(function(e,t){(function(n,r){r(t)})(UQ,function(n){const r=Symbol("newer"),a=Symbol("older");class o{constructor(m,b){typeof m!="number"&&(b=m,m=0),this.size=0,this.limit=m,this.oldest=this.newest=void 0,this._keymap=new Map,b&&(this.assign(b),m<1&&(this.limit=this.size))}_markEntryAsUsed(m){m!==this.newest&&(m[r]&&(m===this.oldest&&(this.oldest=m[r]),m[r][a]=m[a]),m[a]&&(m[a][r]=m[r]),m[r]=void 0,m[a]=this.newest,this.newest&&(this.newest[r]=m),this.newest=m)}assign(m){let b,y=this.limit||Number.MAX_VALUE;this._keymap.clear();let _=m[Symbol.iterator]();for(let T=_.next();!T.done;T=_.next()){let A=new l(T.value[0],T.value[1]);if(this._keymap.set(A.key,A),b?(b[r]=A,A[a]=b):this.oldest=A,b=A,y--==0)throw new Error("overflow")}this.newest=b,this.size=this._keymap.size}get(m){var b=this._keymap.get(m);return b?(this._markEntryAsUsed(b),b.value):void 0}set(m,b){var y=this._keymap.get(m);return y?(y.value=b,this._markEntryAsUsed(y),this):(this._keymap.set(m,y=new l(m,b)),this.newest?(this.newest[r]=y,y[a]=this.newest):this.oldest=y,this.newest=y,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var m=this.oldest;if(m)return this.oldest[r]?(this.oldest=this.oldest[r],this.oldest[a]=void 0):(this.oldest=void 0,this.newest=void 0),m[r]=m[a]=void 0,this._keymap.delete(m.key),--this.size,[m.key,m.value]}find(m){let b=this._keymap.get(m);return b?b.value:void 0}has(m){return this._keymap.has(m)}delete(m){var b=this._keymap.get(m);return b?(this._keymap.delete(b.key),b[r]&&b[a]?(b[a][r]=b[r],b[r][a]=b[a]):b[r]?(b[r][a]=void 0,this.oldest=b[r]):b[a]?(b[a][r]=void 0,this.newest=b[a]):this.oldest=this.newest=void 0,this.size--,b.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new d(this.oldest)}values(){return new f(this.oldest)}entries(){return this}[Symbol.iterator](){return new c(this.oldest)}forEach(m,b){typeof b!="object"&&(b=this);let y=this.oldest;for(;y;)m.call(b,y.value,y.key,this),y=y[r]}toJSON(){for(var m=new Array(this.size),b=0,y=this.oldest;y;)m[b++]={key:y.key,value:y.value},y=y[r];return m}toString(){for(var m="",b=this.oldest;b;)m+=String(b.key)+":"+b.value,b=b[r],b&&(m+=" < ");return m}}n.LRUMap=o;function l(p,m){this.key=p,this.value=m,this[r]=void 0,this[a]=void 0}function c(p){this.entry=p}c.prototype[Symbol.iterator]=function(){return this},c.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:[p.key,p.value]}):{done:!0,value:void 0}};function d(p){this.entry=p}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:p.key}):{done:!0,value:void 0}};function f(p){this.entry=p}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:p.value}):{done:!0,value:void 0}}})})(Jl,Jl.exports)),Jl.exports}var $Q=zQ();const N2=Au($Q),R2=Symbol("IGNORE_RESPONSE");var VQ=class{highlighter;renderOptions;initialized=!1;workers=[];taskQueue=[];pendingTasks=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;instanceRequestMap=new Map;fileCache;diffCache;constructor(e,{langs:t,theme:n=Wt,lineDiffType:r="word-alt",tokenizeMaxLineLength:a=1e3}){this.options=e,this.renderOptions={theme:n,lineDiffType:r,tokenizeMaxLineLength:a},this.fileCache=new N2.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new N2.LRUMap(e.totalASTLRUCacheSize??100),this.initialize(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){return this.fileCache.delete(e)!==void 0}evictDiffFromCache(e){return this.diffCache.delete(e)!==void 0}async setRenderOptions({theme:e=Wt,lineDiffType:t="word-alt",tokenizeMaxLineLength:n=1e3}){const r={theme:e,lineDiffType:t,tokenizeMaxLineLength:n};this.isInitialized()||await this.initialize();const a=Df(r.theme,this.renderOptions.theme);if(a&&r.lineDiffType===this.renderOptions.lineDiffType&&r.tokenizeMaxLineLength===this.renderOptions.tokenizeMaxLineLength)return;const o=_u(e);let l=[];if(a||(rg(o)?l=bx(o):l=await yx(o)),this.highlighter!=null)ng(l,this.highlighter),await this.setRenderOptionsOnWorkers(r,l);else{const[c]=await Promise.all([sf({themes:o,langs:["text"]}),this.setRenderOptionsOnWorkers(r,l)]);this.highlighter=c}this.renderOptions=r,this.diffCache.clear(),this.fileCache.clear();for(const c of this.themeSubscribers)c.rerender()}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t}=this.renderOptions;return{theme:t,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((a,o)=>{const l=this.generateRequestId(),c={type:"set-render-options",id:l,request:{type:"set-render-options",id:l,renderOptions:e,resolvedThemes:t},resolve:a,reject:o,requestStart:Date.now()};this.pendingTasks.set(l,c),r.worker.postMessage(c.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),()=>{this.unsubscribeToThemeChanges(e)}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e)}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1)this.initialized=new Promise((t,n)=>{(async()=>{try{const r=_u(this.renderOptions.theme);let a=[];rg(r)?a=bx(r):a=await yx(r);let o=[];mx(e)?o=px(e):o=await gx(e);const[l]=await Promise.all([sf({themes:r,langs:["text",...e]}),this.initializeWorkers(a,o)]);if(this.initialized===!1){this.terminateWorkers(),n();return}this.highlighter=l,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),t()}catch(r){this.initialized=!1,this.workersFailed=!0,n(r)}})()});else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[];this.workers.length>0&&this.terminateWorkers();for(let r=0;r<(this.options.poolSize??8);r++){const a=this.options.workerFactory(),o={worker:a,busy:!1,initialized:!1,langs:new Set(["text",...t.map(({name:l})=>l)])};a.addEventListener("message",l=>{this.handleWorkerMessage(o,l.data)}),a.addEventListener("error",l=>console.error("Worker error:",l,o)),this.workers.push(o),n.push(new Promise((l,c)=>{const d=this.generateRequestId(),f={type:"initialize",id:d,request:{type:"initialize",id:d,renderOptions:this.renderOptions,resolvedThemes:e,resolvedLanguages:t},resolve(){o.initialized=!0,l()},reject:c,requestStart:Date.now()};this.pendingTasks.set(d,f),this.executeTask(o,f)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.taskQueue.length===0))for(;this.taskQueue.length>0;){const e=this.taskQueue[0],t=L2(e),n=this.getAvailableWorker(t);if(n==null)break;this.taskQueue.shift(),this.resolveLanguagesAndExecuteTask(n,e,t)}};highlightFileAST(e,t){this.submitTask(e,{type:"file",file:t})}getPlainFileAST(e){if(this.highlighter==null){this.initialize();return}return _C(e,this.highlighter,this.renderOptions,!0)}highlightDiffAST(e,t){this.submitTask(e,{type:"diff",diff:t})}getPlainDiffAST(e){return this.highlighter!=null?LC(e,this.highlighter,this.renderOptions,!0):void 0}terminate(){this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.instanceRequestMap.clear(),this.taskQueue.length=0,this.pendingTasks.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{totalWorkers:this.workers.length,busyWorkers:this.workers.filter(e=>e.busy).length,queuedTasks:this.taskQueue.length,pendingTasks:this.pendingTasks.size}}submitTask(e,t){this.initialized===!1&&this.initialize();const n=this.generateRequestId(),r=Date.now(),a=(()=>{switch(t.type){case"file":return{type:"file",id:n,request:{...t,id:n},instance:e,requestStart:r};case"diff":return{type:"diff",id:n,request:{...t,id:n},instance:e,requestStart:r}}})();this.instanceRequestMap.set(e,n),this.taskQueue.push(a),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){if(t.type==="file"||t.type==="diff"){const r=n.filter(a=>!e.langs.has(a));r.length>0&&(mx(r)?t.request.resolvedLanguages=px(r):t.request.resolvedLanguages=await gx(r))}this.executeTask(e,t)}handleWorkerMessage(e,t){const n=this.pendingTasks.get(t.id);try{if(n==null)throw new Error("handleWorkerMessage: Received response for unknown task");if(t.type==="error"){const r=new Error(t.error);throw t.stack&&(r.stack=t.stack),"reject"in n?n.reject(r):n.instance.onHighlightError(r),r}else{if("instance"in n&&this.instanceRequestMap.get(n.instance)!==t.id)throw R2;switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:a}=t,{instance:o,request:l}=n;l.file.cacheKey!=null&&this.fileCache.set(l.file.cacheKey,{result:r,options:a}),o.onHighlightSuccess(l.file,r,a);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:a}=t,{instance:o,request:l}=n;l.diff.cacheKey!=null&&this.diffCache.set(l.diff.cacheKey,{result:r,options:a}),o.onHighlightSuccess(l.diff,r,a);break}}}}catch(r){r!==R2&&console.error(r,n,t)}n!=null&&"instance"in n&&this.instanceRequestMap.get(n.instance)===t.id&&this.instanceRequestMap.delete(n.instance),this.pendingTasks.delete(t.id),e.busy=!1,this.taskQueue.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue))}executeTask(e,t){e.busy=!0,this.pendingTasks.set(t.id,t);for(const n of L2(t))e.langs.add(n);e.worker.postMessage(t.request)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.busy||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(const a of e)if(!n.langs.has(a)){r=!1;break}if(r)break}return t}generateRequestId(){return`req_${++this.nextRequestId}`}};function L2(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??Br(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??Br(e.request.diff.name)),t.add(e.request.diff.lang??Br(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}let Ga;function qQ({poolOptions:e,highlighterOptions:t}){return Ga==null&&(Ga=new VQ(e,t),Ga.initialize()),Ga}function GQ(){Ga!=null&&(Ga.terminate(),Ga=void 0)}const e1=w.createContext(void 0);let A0=0;function YQ({children:e,poolOptions:t,highlighterOptions:n}){const[r]=w.useState(()=>{if(!(typeof window>"u"))return qQ({poolOptions:t,highlighterOptions:n})});return w.useInsertionEffect(()=>(A0++,()=>{A0--}),[]),w.useEffect(()=>()=>{A0===0&&GQ()},[]),x.jsx(e1.Provider,{value:r,children:e})}function H3(e){const t=w.useRef(e);return w.useInsertionEffect(()=>{t.current=e}),w.useCallback((...n)=>t.current(...n),[])}const QQ=typeof window>"u"?w.useEffect:w.useLayoutEffect;function WQ({file:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:a}){const o=w.useContext(e1),l=w.useRef(null),c=H3(d=>{if(d!=null){if(l.current!=null)throw new Error("File: An instance should not already exist when a node is created");l.current=new h4(t,o,!0),l.current.hydrate({file:e,fileContainer:d,lineAnnotations:n,prerenderedHTML:a})}else{if(l.current==null)throw new Error("File: A File instance should exist when unmounting");l.current.cleanUp(),l.current=null}});return QQ(()=>{if(l.current==null)return;const d=!OC(l.current.options,t);l.current.setOptions(t),l.current.render({file:e,lineAnnotations:n,forceRender:d}),r!==void 0&&l.current.setSelectedLines(r)}),{ref:c,getHoveredLine:w.useCallback(()=>l.current?.getHoveredLine(),[])}}function XQ({file:e,lineAnnotations:t,selectedLines:n,options:r,className:a,style:o,renderAnnotation:l,renderHeaderMetadata:c,prerenderedHTML:d,renderHoverUtility:f}){const{ref:p,getHoveredLine:m}=WQ({file:e,options:r,lineAnnotations:t,selectedLines:n,prerenderedHTML:d});return x.jsx(_o,{ref:p,className:a,style:o,children:j3(FQ({file:e,renderAnnotation:l,renderHeaderMetadata:c,renderHoverUtility:f,lineAnnotations:t,getHoveredLine:m}),d)})}function KQ({fileDiff:e,oldFile:t,newFile:n,renderHeaderMetadata:r,renderAnnotation:a,renderHoverUtility:o,lineAnnotations:l,getHoveredLine:c}){const d=r?.({fileDiff:e,oldFile:t,newFile:n});return x.jsxs(x.Fragment,{children:[d!=null&&x.jsx("div",{slot:ku,children:d}),a!=null&&l?.map((f,p)=>x.jsx("div",{slot:Za(f),children:a(f)},p)),o!=null&&x.jsx("div",{slot:"hover-slot",style:B3,children:o(c)})]})}const ZQ=typeof window>"u"?w.useEffect:w.useLayoutEffect;function JQ({oldFile:e,newFile:t,fileDiff:n,options:r,lineAnnotations:a,selectedLines:o,prerenderedHTML:l}){const c=w.useContext(e1),d=w.useRef(null),f=H3(p=>{if(p!=null){if(d.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");d.current=new P4(r,c,!0),d.current.hydrate({fileDiff:n,oldFile:e,newFile:t,fileContainer:p,lineAnnotations:a,prerenderedHTML:l})}else{if(d.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");d.current.cleanUp(),d.current=null}});return ZQ(()=>{if(d.current==null)return;const p=d.current,m=!OC(p.options,r);p.setOptions(r),p.render({forceRender:m,fileDiff:n,oldFile:e,newFile:t,lineAnnotations:a}),o!==void 0&&p.setSelectedLines(o)}),{ref:f,getHoveredLine:w.useCallback(()=>d.current?.getHoveredLine(),[])}}function eW({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,className:a,style:o,prerenderedHTML:l,renderAnnotation:c,renderHeaderMetadata:d,renderHoverUtility:f}){const{ref:p,getHoveredLine:m}=JQ({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:l});return x.jsx(_o,{ref:p,className:a,style:o,children:j3(KQ({fileDiff:e,renderHeaderMetadata:d,renderAnnotation:c,lineAnnotations:n,renderHoverUtility:f,getHoveredLine:m}),l)})}function tW(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const[r,a]=w.useState(()=>n?window.matchMedia(e).matches:t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),l=c=>{a(c?.matches??o.matches)};return l(),o.addEventListener("change",l),()=>{o.removeEventListener("change",l)}},[e]),r}const nW=()=>typeof document>"u"?"light":(document.documentElement.dataset.theme||"").toLowerCase().includes("dark")?"dark":"light",rW=e=>{if(typeof document>"u")return()=>{};const t=new MutationObserver(()=>e());return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()},F3=()=>w.useSyncExternalStore(rW,nW,()=>"light"),iW=`
|
|
1454
|
+
:host {
|
|
1455
|
+
--diffs-gap-fallback: 0px;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
[data-column-number] {
|
|
1459
|
+
z-index: 0;
|
|
1460
|
+
}
|
|
1461
|
+
`,U3=({fileDiff:e})=>{const t=tW("(max-width: 1024px)"),n=F3();return e?x.jsx("div",{className:"min-h-0 flex-1 overflow-auto bg-base-100","data-testid":"diff-preview",children:x.jsx(eW,{fileDiff:e,options:{diffStyle:t?"unified":"split",diffIndicators:"bars",disableFileHeader:!0,overflow:"wrap",themeType:n,unsafeCSS:iW}})}):x.jsx("div",{className:"flex min-h-60 flex-1 items-center justify-center bg-base-100 px-6 text-center text-sm text-base-content/60","data-testid":"diff-preview-empty",children:"Waiting for diff content."})},z3=({change:e})=>{const t=$4(e),n=e.status||"modified";return t&&(t.additions>0||t.deletions>0)?x.jsxs("div",{className:"flex items-center gap-2 text-sm","data-testid":"diff-stats",children:[t.additions>0?x.jsxs("span",{className:"text-success",children:["+",t.additions]}):null,t.deletions>0?x.jsxs("span",{className:"text-error",children:["-",t.deletions]}):null]}):x.jsx("div",{className:"badge badge-outline","data-testid":"diff-stats",children:n})},aW="vscode",sW=()=>{try{const e=localStorage.getItem(bt.preferredEditor);if(e&&["vscode","cursor","zed"].includes(e))return e}catch{}return null},oW=e=>{try{localStorage.setItem(bt.preferredEditor,e)}catch{}},$3=({target:e,className:t})=>{const{projectPath:n}=as(vi(_=>({projectPath:_.projectPath}))),[r,a]=w.useState(!1),o=gn({queryKey:["editors"],queryFn:()=>nt("/api/editors"),staleTime:6e4}),l=zd({mutationFn:async _=>nt("/api/editors/open",{method:"POST",body:JSON.stringify({editor:_,project:n,target:e})})}),d=(o.data?.editors??[]).filter(_=>_.available),f=w.useCallback(()=>{const _=sW();if(_){const T=d.find(A=>A.id===_);if(T)return T}return d.find(T=>T.id===aW)??d[0]??null},[d])(),p=d.filter(_=>_.id!==f?.id),m=_=>{n&&(oW(_.id),l.mutate(_.id),a(!1))};if(!n||d.length===0)return null;const b=l.isPending,y=p.length>0;return x.jsxs("div",{className:`join ${t??""}`,"data-testid":"open-in-editor-button",children:[x.jsx("button",{type:"button",className:"btn btn-ghost btn-xs join-item gap-1",onClick:()=>f&&m(f),disabled:!f||b,title:`Open in ${f?.name??"Editor"}`,"data-testid":"open-in-editor-primary",children:b?x.jsx("span",{className:"loading loading-spinner loading-xs"}):x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[x.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x.jsx("polyline",{points:"15 3 21 3 21 9"}),x.jsx("line",{x1:"10",x2:"21",y1:"14",y2:"3"})]})}),y&&x.jsxs(gb,{open:r,onOpenChange:a,children:[x.jsx(bb,{asChild:!0,children:x.jsx("button",{type:"button",className:"btn btn-ghost btn-xs join-item px-0.5","data-testid":"open-in-editor-more",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:x.jsx("path",{d:"m6 9 6 6 6-6"})})})}),x.jsx(yb,{align:"start",className:"w-auto rounded-box bg-base-100 p-0! shadow-lg","data-testid":"open-in-editor-menu",children:x.jsx("ul",{className:"menu menu-sm","data-testid":"open-in-editor-list",children:d.map(_=>x.jsx("li",{onClick:()=>m(_),"data-testid":"open-in-editor-item","data-editor-id":_.id,children:x.jsx("a",{className:"whitespace-nowrap",children:_.name})},_.id))})})]})]})},sa=({children:e,className:t})=>{const n="flex min-h-60 flex-1 items-center justify-center bg-base-100 px-6 text-center text-sm text-base-content/60",r=t?`${n} ${t}`:n;return x.jsx("div",{className:r,"data-testid":"placeholder",children:e})},lW=w.memo(({selectedChange:e,selectedFileDiff:t})=>x.jsxs("section",{className:"flex min-h-0 flex-col overflow-hidden bg-base-100","data-testid":"changes-panel",children:[x.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-base-300 px-4 py-2","data-testid":"changes-panel-header",children:[x.jsx("div",{className:"min-h-8 flex items-center gap-1 text-sm text-base-content/60",children:e?x.jsxs(x.Fragment,{children:[x.jsx(nh,{path:e.path,previousPath:e.previousPath}),x.jsx($3,{target:{type:"diff",filePath:e.path}})]}):x.jsx("span",{className:"text-sm text-base-content/50",children:"Select a file to review"})}),e?x.jsx(z3,{change:e}):null]}),x.jsx("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"changes-panel-body",children:e?x.jsx(U3,{fileDiff:t}):x.jsx(sa,{children:"Pick a changed file to load its diff preview."})})]})),O2=500,uW=w.memo(({projectPath:e,file:t,isLoading:n,isAvailable:r,previewType:a})=>{const o=F3(),l=Iu(A=>A.selectedTreeFilePath),c=t?{name:t.path,contents:t.contents}:null,d=e&&l?`/api/projects/file/raw?project=${encodeURIComponent(e)}&path=${encodeURIComponent(l)}`:"",f=w.useMemo(()=>c?.contents.split(`
|
|
1462
|
+
`)||[],[c]),p=Math.ceil(f.length/O2),[m,b]=w.useState(1),y=w.useRef(null);w.useEffect(()=>{b(1)},[c?.contents]),w.useEffect(()=>{const A=y.current;if(!A||m>=p)return;const C=new IntersectionObserver(([k])=>{k?.isIntersecting&&b(N=>Math.min(N+1,p))},{rootMargin:"200px"});return C.observe(A),()=>C.disconnect()},[m,p]);const _=w.useMemo(()=>f.slice(0,m*O2).join(`
|
|
1463
|
+
`),[f,m]),T=w.useMemo(()=>({...c,contents:_}),[c,_]);return x.jsxs("section",{className:"flex min-h-0 flex-col overflow-hidden bg-base-100","data-testid":"files-panel",children:[x.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-base-300 px-4 py-2","data-testid":"files-panel-header",children:x.jsx("div",{className:"min-h-8 flex items-center gap-1 text-sm text-base-content/60",children:l?x.jsxs(x.Fragment,{children:[x.jsx(nh,{path:l}),x.jsx($3,{target:{type:"file",filePath:l}})]}):x.jsx("span",{className:"text-sm text-base-content/50",children:"Select a file to preview."})})}),x.jsx("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"files-panel-body",children:r?l?n&&!c&&!a?x.jsx(sa,{className:"border-b border-base-300",children:"Loading file..."}):!c&&!a?x.jsx(sa,{className:"border-b border-base-300",children:"Unable to load file."}):a?x.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center border-b border-base-300 bg-base-100 p-4","data-testid":"files-panel-preview",children:a==="image"?x.jsx("img",{src:d,alt:l,className:"max-h-full max-w-full object-contain","data-testid":"files-panel-preview-image"}):a==="video"?x.jsx("video",{src:d,controls:!0,className:"max-h-full w-full object-contain","data-testid":"files-panel-preview-video"}):a==="audio"?x.jsx("audio",{src:d,controls:!0,className:"w-full","data-testid":"files-panel-preview-audio"}):a==="pdf"?x.jsx("iframe",{title:l,src:d,className:"h-full w-full","data-testid":"files-panel-preview-pdf"}):x.jsx("div",{className:"text-sm text-base-content/60","data-testid":"files-panel-preview-unsupported",children:"This file type is not supported for preview."})}):x.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-base-100","data-testid":"files-panel-diff",children:[x.jsx(XQ,{file:T,options:{themeType:o,overflow:"wrap",disableFileHeader:!0,tokenizeMaxLineLength:600}}),m<p&&x.jsx("div",{ref:y,className:"h-1","data-testid":"files-panel-load-more"})]}):x.jsx(sa,{className:"border-b border-base-300",children:"Select a file to preview."}):x.jsx(sa,{className:"border-b border-base-300",children:"File tree requires a git repository."})})]})});function V3(e,t){const n=t.direction??1,r=t.initialWidth,a=t.minWidth,o=t.maxWidth,[l,c]=w.useState(r),d=w.useRef(null),f=w.useRef(!1),p=w.useCallback(m=>{m.button===0&&(d.current={startCoord:m.clientX,startSize:l},m.preventDefault())},[e,l]);return w.useEffect(()=>{const m=y=>{const _=d.current;if(!_)return;const T=y.clientX,A=_.startSize+(T-_.startCoord)*n,C=Math.min(o,Math.max(a,A));c(C),f.current=!0},b=()=>{d.current&&(d.current=null)};return window.addEventListener("pointermove",m),window.addEventListener("pointerup",b),()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",b)}},[e,n,o,a]),w.useEffect(()=>{if(f.current)return;const m=Math.min(o,Math.max(a,r));c(m)},[r,o,a]),{width:l,handleResizeStart:p}}const cW=w.memo(({selectedCommit:e,selectedCommitSha:t,historyChanges:n,selectedHistoryChange:r,selectedHistoryFileDiff:a,isLoadingDiff:o})=>{const{width:l,handleResizeStart:c}=V3("x",{initialWidth:260,minWidth:200,maxWidth:420}),d=w.useRef(null),{selectedHistoryFilePath:f,setSelectedHistoryFilePath:p}=Iu(vi(m=>({selectedHistoryFilePath:m.selectedHistoryFilePath,setSelectedHistoryFilePath:m.setSelectedHistoryFilePath})));return x.jsxs("section",{className:"flex min-h-0 flex-col overflow-hidden bg-base-100","data-testid":"history-panel",children:[x.jsx("div",{className:"border-b border-base-300 px-4 py-2","data-testid":"history-panel-header",children:e?x.jsxs("details",{className:"collapse collapse-arrow","data-testid":"history-panel-commit",children:[x.jsx("summary",{className:"collapse-title py-0 after:start-0 after:end-auto",children:x.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:x.jsx("div",{className:"flex items-center gap-2 min-h-8",children:x.jsx("div",{className:"text-sm font-semibold",children:e.subject||"(no message)"})})})}),x.jsx("div",{className:"collapse-content px-0 pt-2","data-testid":"history-panel-commit-details",children:x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsx("div",{className:"text-sm whitespace-pre-wrap text-base-content/70",children:e.description||"(no description)"}),x.jsxs("div",{className:"flex gap-2 items-center text-base-content/60",children:[x.jsx("span",{className:"text-sm",children:e.authorName||"Unknown"}),x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:[x.jsx("circle",{cx:"12",cy:"12",r:"3"}),x.jsx("line",{x1:"3",x2:"9",y1:"12",y2:"12"}),x.jsx("line",{x1:"15",x2:"21",y1:"12",y2:"12"})]}),x.jsx("span",{className:"text-sm",children:e.shortSha})]})]})})]}):x.jsx("div",{className:"text-sm text-base-content/60","data-testid":"history-panel-empty",children:"Select a commit to review."})}),x.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 lg:grid-cols-[var(--history-aside-width)_1fr]",style:{"--history-aside-width":`${l}px`},"data-testid":"history-panel-body",children:[x.jsxs("aside",{className:"relative flex min-h-0 flex-col border-t border-base-300 bg-base-100 lg:border-r lg:border-t-0","data-testid":"history-panel-aside",children:[x.jsx("div",{className:"border-b border-base-300 px-4 py-3 leading-5 text-xs font-semibold uppercase text-base-content/60",children:"Changed files"}),x.jsx("div",{className:"min-h-0 flex-1 overflow-auto",ref:d,"data-testid":"history-panel-changes-scroll",children:x.jsx(P3,{changes:n,selectedFilePath:f,onFileSelect:p,isLoading:o,scrollRef:d})}),x.jsx("div",{className:"absolute right-0 top-0 hidden h-full w-2 cursor-col-resize bg-transparent hover:bg-base-300/40 lg:block",onPointerDown:c,"data-testid":"history-panel-resize-handle"})]}),x.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"history-panel-main",children:[x.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-base-300 px-4 py-3","data-testid":"history-panel-file-header",children:[x.jsx("div",{className:"text-sm text-base-content/60",children:r?x.jsx(nh,{path:r.path,previousPath:r.previousPath}):x.jsx("span",{className:"text-sm text-base-content/50",children:"Select a file to review"})}),r?x.jsx(z3,{change:r}):null]}),x.jsx("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"history-panel-preview",children:t?o?x.jsx(sa,{className:"border-b border-base-300",children:"Loading commit diff..."}):r?x.jsx(U3,{fileDiff:a}):x.jsx(sa,{className:"border-b border-base-300",children:"No changed files to preview."}):x.jsx(sa,{className:"border-b border-base-300",children:"Pick a commit to load its diff preview."})})]})]})]})}),dW=w.memo(({hasGit:e,onResizeStart:t,rightPanelRef:n,rightPanelClassName:r})=>{const{projectPath:o,sidebarTab:l,setProjectPath:c,setProjectOpenError:d}=as(vi(fe=>({projectPath:fe.projectPath,sidebarTab:fe.sidebarTab,setProjectPath:fe.setProjectPath,setProjectOpenError:fe.setProjectOpenError}))),{selectedFilePath:f,selectedTreeFilePath:p,selectedCommitSha:m,selectedHistoryFilePath:b,setSelectedFilePath:y,setSelectedTreeFilePath:_,setSelectedCommitSha:T,setSelectedHistoryFilePath:A}=Iu(vi(fe=>({selectedFilePath:fe.selectedFilePath,selectedTreeFilePath:fe.selectedTreeFilePath,selectedCommitSha:fe.selectedCommitSha,selectedHistoryFilePath:fe.selectedHistoryFilePath,setSelectedFilePath:fe.setSelectedFilePath,setSelectedTreeFilePath:fe.setSelectedTreeFilePath,setSelectedCommitSha:fe.setSelectedCommitSha,setSelectedHistoryFilePath:fe.setSelectedHistoryFilePath}))),{changes:C,selectedChange:k,selectedFileDiff:N,changesLoading:L,toggleStage:O,toggleStageAll:P,diffError:V}=bQ({projectPath:o,isActive:l==="changes",selectedFilePath:f,onSelectedFilePathChange:y}),{entries:G,isAvailable:Z,isLoading:z}=vQ({projectPath:o,isActive:l==="files",selectedFilePath:p,onSelectedFilePathChange:_}),re=F4(p),{file:W,isLoading:he}=yQ({projectPath:o,filePath:p,isActive:l==="files"&&!re}),{historyCommits:ue,selectedCommit:se,historyChanges:B,selectedHistoryChange:Q,selectedHistoryFileDiff:X,commitDiffLoading:Ee,historyLoading:H,historyLoadingMore:$,hasMoreHistory:ae,loadMoreHistory:D}=_Q({projectPath:o,selectedCommitSha:m,onSelectedCommitShaChange:T,selectedHistoryFilePath:b,onSelectedHistoryFilePathChange:A,hasGit:e,isActive:l==="history",pageSize:30});return w.useEffect(()=>{const fe=br(V);fe!=="invalid_path"&&fe!=="not_a_directory"||(c(""),d(DC(V)))},[V,d,c]),x.jsxs(x.Fragment,{children:[x.jsx(HQ,{fileTreeEntries:G,fileTreeLoading:z,fileTreeAvailable:Z,changes:C,changesLoading:L,onToggleStage:O,onToggleStageAll:P,historyCommits:ue,onLoadMoreHistory:D,hasMoreHistory:ae,historyLoading:H,historyLoadingMore:$,hasGit:e,onResizeStart:t}),x.jsxs("section",{ref:n,className:r,"data-testid":"review-panels-right",children:[l==="history"&&x.jsx(cW,{selectedCommit:se,selectedCommitSha:m,historyChanges:B,selectedHistoryChange:Q,selectedHistoryFileDiff:X,isLoadingDiff:Ee}),l==="files"&&x.jsx(uW,{projectPath:o,file:W,isLoading:he,isAvailable:Z,previewType:re}),l==="changes"&&x.jsx(lW,{selectedChange:k,selectedFileDiff:N})]})]})}),fW=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(16).slice(2)}`;class hW{#e=null;#t="connecting";#n=new Set;#i=new Set;#r=new Map;#a=null;#o=0;connect(){if(this.#e)return;const t="http://localhost:4312/",n=new URL("/api/events",t);n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:");const r=n.toString();this.#s("connecting");const a=new WebSocket(r);this.#e=a,a.onopen=()=>{this.#o=0,this.#s("connected")},a.onmessage=o=>{if(typeof o.data=="string")try{const l=JSON.parse(o.data);if(typeof l.event!="string")return;this.#f(l.event,l.payload)}catch(l){console.error("Failed to parse WebSocket payload",l)}},a.onerror=()=>{a.readyState===WebSocket.OPEN&&a.close()},a.onclose=()=>{this.#e===a&&(this.#e=null),this.#c("connection_closed"),this.#s("disconnected"),this.#u()}}subscribe(t){return this.#n.add(t),()=>{this.#n.delete(t)}}subscribeState(t){return this.#i.add(t),t(this.#t),()=>{this.#i.delete(t)}}getConnectionState(){return this.#t}sendCommand(t,n){return new Promise((r,a)=>{const o=this.#e;if(!o||o.readyState!==WebSocket.OPEN){a(new Error("ws_not_connected"));return}const l=fW(),c=setTimeout(()=>{this.#r.delete(l),a(new Error("command_timeout"))},3e4);this.#r.set(l,{resolve:d=>r(d),reject:d=>a(d),timeout:c}),o.send(JSON.stringify({type:t,payload:n,requestId:l}))})}#s(t){if(this.#t!==t){this.#t=t;for(const n of this.#i)n(t)}}#f(t,n){if(t==="ping"){this.#e?.readyState===WebSocket.OPEN&&this.#e.send(JSON.stringify({type:"pong"}));return}if(t==="command_ack"){const r=n;r&&typeof r.requestId=="string"&&this.#l(r.requestId,r.result??null,!1);return}if(t==="command_error"){const r=n;if(r&&typeof r.requestId=="string"){const a=typeof r.error=="string"?r.error:"command_failed";this.#l(r.requestId,new Error(a),!0)}return}for(const r of this.#n)r(t,n)}#l(t,n,r){const a=this.#r.get(t);a&&(this.#r.delete(t),clearTimeout(a.timeout),r?a.reject(n):a.resolve(n))}#c(t){if(!this.#r.size)return;const n=new Error(t);for(const r of this.#r.values())clearTimeout(r.timeout),r.reject(n);this.#r.clear()}#u(){this.#a&&clearTimeout(this.#a);const n=Math.min(1e4,500*2**this.#o)+Math.floor(Math.random()*300);this.#o+=1,this.#a=setTimeout(()=>{this.connect()},n)}}const Ql=new hW,pW=()=>{const[e,t]=w.useState(Ql.getConnectionState());w.useEffect(()=>(Ql.connect(),Ql.subscribeState(t)),[]);const n=w.useCallback(a=>Ql.subscribe(a),[]),r=w.useCallback((a,o)=>Ql.sendCommand(a,o),[]);return{connectionState:e,subscribe:n,sendCommand:r}},mW=e=>{if(!e||typeof e!="object")return null;const t=e,n=typeof t.chatId=="number"?t.chatId:null,r=typeof t.userId=="number"?t.userId:null;return!n||!r?null:{chatId:n,userId:r,username:typeof t.username=="string"?t.username:void 0,firstName:typeof t.firstName=="string"?t.firstName:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:new Date().toISOString()}},gW=()=>{const e=w.useRef(null),{subscribe:t}=pW(),[n,r]=w.useState([]),[a,o]=w.useState(!1),[l,c]=w.useState(""),[d,f]=w.useState(""),[p,m]=w.useState(!1),b=n[0]||null,y=w.useMemo(()=>b?`Telegram Pairing (${b.username||b.firstName||"user"})`:"Telegram Pairing",[b]);w.useEffect(()=>t((T,A)=>{if(T!=="telegram_pairing_request")return;const C=mW(A);C&&(r(k=>[...k,C]),o(!0))}),[t]),w.useEffect(()=>{const T=e.current;if(T){if(a&&!T.open){T.showModal();return}!a&&T.open&&T.close()}},[a]),w.useEffect(()=>{!n.length&&a&&o(!1)},[a,n.length]);const _=async()=>{const T=l.trim();if(!T){f("Code is required.");return}m(!0),f("");try{await nt("/api/telegram/pairing/approve",{method:"POST",body:JSON.stringify({code:T})}),c(""),r(A=>A.slice(1))}catch(A){const C=br(A);f(C||"Failed to approve code.")}finally{m(!1)}};return x.jsxs("dialog",{ref:e,className:"modal",onClose:()=>o(!1),"data-testid":"telegram-pairing-modal",children:[x.jsxs("div",{className:"modal-box w-120 max-w-[90vw]",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h2",{className:"text-sm font-semibold",children:y}),x.jsx("button",{type:"button",className:"btn btn-ghost btn-xs",onClick:()=>e.current?.close(),"data-testid":"telegram-pairing-close",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 6 6 18"}),x.jsx("path",{d:"m6 6 12 12"})]})})]}),x.jsxs("div",{className:"mt-4 space-y-3",children:[b?x.jsxs("div",{className:"text-xs text-base-content/60",children:["Pairing request from",b.username?` @${b.username}`:"",b.firstName?` (${b.firstName})`:"","."]}):x.jsx("div",{className:"text-xs text-base-content/60",children:"Waiting for pairing requests."}),x.jsxs("label",{className:"form-control w-full",children:[x.jsx("div",{className:"label py-0 pb-1",children:x.jsx("span",{className:"label-text text-xs text-base-content/60",children:"Pairing Code"})}),x.jsx("input",{className:"input input-sm w-full font-mono text-xs bg-base-100",value:l,onChange:T=>c(T.currentTarget.value),placeholder:"6-digit code","data-testid":"telegram-pairing-code-input"})]}),d?x.jsx("div",{className:"text-xs text-error",children:d}):null,x.jsx("div",{className:"flex items-center gap-2",children:x.jsx("button",{type:"button",className:"btn btn-sm",disabled:p,onClick:_,"data-testid":"telegram-pairing-approve",children:"Approve"})})]})]}),x.jsx("form",{method:"dialog",className:"modal-backdrop",children:x.jsx("button",{type:"submit",children:"close"})})]})},bW=()=>{const{projectPath:e}=as(vi(d=>({projectPath:d.projectPath}))),t=w.useRef(null),{width:n,handleResizeStart:r}=V3("x",{initialWidth:280,minWidth:200,maxWidth:520}),a=gn({queryKey:["capabilities",e],queryFn:()=>nt(`/api/capabilities?project=${encodeURIComponent(e)}`),enabled:!!e}),o=a.isLoading,l=!!a.data?.git,c=!!a.data?.github;return x.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-base-200","data-testid":"app-root",children:[x.jsx(gQ,{hasGit:l,hasGithub:c,capabilitiesLoading:o}),x.jsx("main",{className:"grid min-h-0 flex-1 overflow-hidden gap-0 grid-cols-[var(--sidebar-width)_1fr]","data-testid":"app-main",style:{"--sidebar-width":`${n}px`},children:x.jsx(dW,{hasGit:l,onResizeStart:r,rightPanelRef:t,rightPanelClassName:"grid min-h-0 min-w-0 overflow-hidden grid-cols-1 grid-rows-1"})}),x.jsx(gW,{})]})},yW="/assets/worker-C3lkbYoB.js";function EW(){return new Worker(yW,{type:"module"})}function vW({children:e}){return x.jsx(YQ,{poolOptions:{workerFactory:EW},highlighterOptions:{theme:{dark:"pierre-dark",light:"pierre-light"},langs:["typescript","javascript","css","html","go","rust","python"]},children:e})}const _W=new RL({defaultOptions:{queries:{staleTime:5e3,retry:1}}}),q3=document.getElementById("root");if(!q3)throw new Error("Missing root element");QL.createRoot(q3).render(x.jsx(OL,{client:_W,children:x.jsx(vW,{children:x.jsx(bW,{})})}));const xW=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:C3},Symbol.toStringTag,{value:"Module"}));export{cr as N,dY as a,Le as b,RW as c,x as j,w as r};
|