@yorz/cli 0.3.7 → 0.4.2
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/index.js +874 -29
- package/dist/gui/assets/{abnfDiagram-VRR7QNED-P8M0mKNL.js → abnfDiagram-VRR7QNED-C1LflvIY.js} +1 -1
- package/dist/gui/assets/{arc-DlQjdRG1.js → arc-CLVcmGRI.js} +1 -1
- package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-CWjQFrBc.js → architectureDiagram-ZJ3FMSHR-CshNMQ27.js} +1 -1
- package/dist/gui/assets/{blockDiagram-677ZJIJ3-BKVLTUWU.js → blockDiagram-677ZJIJ3-D5dDqKKl.js} +1 -1
- package/dist/gui/assets/{c4Diagram-LMCZKHZV-Dc-LyufI.js → c4Diagram-LMCZKHZV-DRVpuaAe.js} +1 -1
- package/dist/gui/assets/channel-3Bz_lxm-.js +1 -0
- package/dist/gui/assets/{chunk-2Q5K7J3B-N67wx4l2.js → chunk-2Q5K7J3B-CyfpeX3b.js} +1 -1
- package/dist/gui/assets/{chunk-32BRIVSS-DTgkNatU.js → chunk-32BRIVSS-Bpb0lkX5.js} +1 -1
- package/dist/gui/assets/{chunk-5VM5RSS4-CvwJ-FXX.js → chunk-5VM5RSS4-Cxz0034S.js} +1 -1
- package/dist/gui/assets/{chunk-EX3LRPZG-B_ZbidKZ.js → chunk-EX3LRPZG-KRbOxYPK.js} +1 -1
- package/dist/gui/assets/{chunk-JWPE2WC7-CBOi6DIW.js → chunk-JWPE2WC7-Xrz2UilG.js} +1 -1
- package/dist/gui/assets/{chunk-MOJQB5TN-CW-x6_OV.js → chunk-MOJQB5TN-BNaU7zJh.js} +1 -1
- package/dist/gui/assets/{chunk-RYQCIY6F-BmdlZ9KS.js → chunk-RYQCIY6F-DWByW4ue.js} +1 -1
- package/dist/gui/assets/{chunk-V7JOEXUC-B4f5PF42.js → chunk-V7JOEXUC-wqPxL9c_.js} +1 -1
- package/dist/gui/assets/{chunk-VR4S4FIN-DKcqnznN.js → chunk-VR4S4FIN-CpNkwfNF.js} +1 -1
- package/dist/gui/assets/{chunk-XXDRQBXY--4FGYA_u.js → chunk-XXDRQBXY-DfzP0kY8.js} +1 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-DX15YBOn.js +1 -0
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DX15YBOn.js +1 -0
- package/dist/gui/assets/{cose-bilkent-JH36ORCC-B2f6Upao.js → cose-bilkent-JH36ORCC-DRxVn8EA.js} +1 -1
- package/dist/gui/assets/{cynefin-VYW2F7L2-CxS20C5H.js → cynefin-VYW2F7L2-Dgo2oRfE.js} +1 -1
- package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-hyW_UYqU.js → cynefinDiagram-TSTJHNR4-DkOfGZKA.js} +1 -1
- package/dist/gui/assets/{dagre-VKFMJZFB-BW-oRpvd.js → dagre-VKFMJZFB-B9lbU1Y5.js} +1 -1
- package/dist/gui/assets/{diagram-FQU43EPY-B-2gzyIy.js → diagram-FQU43EPY-L4aTZZob.js} +1 -1
- package/dist/gui/assets/{diagram-G47NLZAW-DF0y134D.js → diagram-G47NLZAW-C7EjvTdr.js} +1 -1
- package/dist/gui/assets/{diagram-NH7WQ7WH-CejbGVF2.js → diagram-NH7WQ7WH-B3oafVE9.js} +1 -1
- package/dist/gui/assets/{diagram-OA4YK3LP-D5e5A6IV.js → diagram-OA4YK3LP-B5Xr4fVb.js} +1 -1
- package/dist/gui/assets/{diagram-WEI45ONY-CAISCqpz.js → diagram-WEI45ONY-CizYf4-d.js} +1 -1
- package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-BYSESG5t.js → ebnfDiagram-CCIWWBDH-Cdp4Ck2s.js} +1 -1
- package/dist/gui/assets/{erDiagram-Q63AITRT-DpW8WS2S.js → erDiagram-Q63AITRT-D_HQYmPu.js} +1 -1
- package/dist/gui/assets/{flowDiagram-23GEKE2U-C_v7g6xp.js → flowDiagram-23GEKE2U-DOp2pyM-.js} +1 -1
- package/dist/gui/assets/{ganttDiagram-NO4QXBWP-CeaE4SQt.js → ganttDiagram-NO4QXBWP-jeuE6-Kq.js} +1 -1
- package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-DHiPQjRQ.js → gitGraphDiagram-IHSO6WYX-BmHbinZO.js} +1 -1
- package/dist/gui/assets/index-Ck5Q41lR.js +36 -0
- package/dist/gui/assets/index-DO4me3fw.css +1 -0
- package/dist/gui/assets/{infoDiagram-FWYZ7A6U-tbR2h7uU.js → infoDiagram-FWYZ7A6U-C1JAC0zw.js} +1 -1
- package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-TFTW7kkJ.js → ishikawaDiagram-FXEZZL3T-C7gxtQ09.js} +1 -1
- package/dist/gui/assets/{journeyDiagram-5HDEW3XC-DOV8E7Kx.js → journeyDiagram-5HDEW3XC-Bm09XlrS.js} +1 -1
- package/dist/gui/assets/{kanban-definition-HUTT4EX6-BmQnZixr.js → kanban-definition-HUTT4EX6-w-2VnSoA.js} +1 -1
- package/dist/gui/assets/{linear-BM4IZgpi.js → linear-DuGFha_A.js} +1 -1
- package/dist/gui/assets/{mermaid.core-LupX_4le.js → mermaid.core-DDfmGYIx.js} +4 -4
- package/dist/gui/assets/{mindmap-definition-LN4V7U3C-Ci25EAsL.js → mindmap-definition-LN4V7U3C-DSWPnA6W.js} +1 -1
- package/dist/gui/assets/{pegDiagram-2B236MQR-De8kn5Bk.js → pegDiagram-2B236MQR-Css8B66d.js} +1 -1
- package/dist/gui/assets/{pieDiagram-ENE6RG2P-Q1uRLnK9.js → pieDiagram-ENE6RG2P-CSyx5YUR.js} +1 -1
- package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-Dox-lxWY.js → quadrantDiagram-ABIIQ3AL-Dd0BHS30.js} +1 -1
- package/dist/gui/assets/{railroadDiagram-RFXS5EU6-5PHbvzzM.js → railroadDiagram-RFXS5EU6-6tQYC8Kx.js} +1 -1
- package/dist/gui/assets/{requirementDiagram-TGXJPOKE-BOlMALKo.js → requirementDiagram-TGXJPOKE-CIgyhQt1.js} +1 -1
- package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-Dhl4t_ZC.js → sankeyDiagram-HTMAVEWB-CV8IW8dn.js} +1 -1
- package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-DWCe9xy7.js → sequenceDiagram-DBY2YBRQ-XrPzK96U.js} +1 -1
- package/dist/gui/assets/{sizeCapture-X5ZJPWSS-BUM02Me6.js → sizeCapture-X5ZJPWSS-B0RuqhJy.js} +1 -1
- package/dist/gui/assets/{stateDiagram-2N3HPSRC-ryQbw4Q_.js → stateDiagram-2N3HPSRC-BbX5u2al.js} +1 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-DPSUOLxs.js +1 -0
- package/dist/gui/assets/{swimlanes-5IMT3BWC-CrP6qLyo.js → swimlanes-5IMT3BWC-eN6NeRxH.js} +2 -2
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BJJrQBKd.js +8 -0
- package/dist/gui/assets/{timeline-definition-FHXFAJF6-CXm-_myR.js → timeline-definition-FHXFAJF6-Cwx4rfjD.js} +1 -1
- package/dist/gui/assets/{vennDiagram-L72KCM5P-C2ONmkxz.js → vennDiagram-L72KCM5P-BfVuNGYO.js} +1 -1
- package/dist/gui/assets/{wardleyDiagram-EHGQE667-DG3WuRlC.js → wardleyDiagram-EHGQE667-tTfKUfA2.js} +1 -1
- package/dist/gui/assets/{xychartDiagram-FW5EYKEG-CChHjXHR.js → xychartDiagram-FW5EYKEG-BMDTawgV.js} +1 -1
- package/dist/gui/index.html +2 -2
- package/package.json +2 -3
- package/dist/gui/assets/channel-Donye8KV.js +0 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-8onVfRQK.js +0 -1
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-8onVfRQK.js +0 -1
- package/dist/gui/assets/index-BESUyU3O.js +0 -673
- package/dist/gui/assets/index-CTkTlp_v.css +0 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CkZ3MMxP.js +0 -1
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CioGa7m6.js +0 -8
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Me={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return zc(this.context.count)},getNextContextId(){return zc(this.context.count++)}};function zc(e){const t=String(e),n=t.length-1;return Me.context.id+(n?String.fromCharCode(96+n):"")+t}function No(e){Me.context=e}const mm=!1,bm=(e,t)=>e===t,fn=Symbol("solid-proxy"),Kf=typeof Proxy=="function",uu=Symbol("solid-track"),Ui={equals:bm};let qf=Yf;const gn=1,Ko=2,Hf={owned:null,cleanups:null,context:null,owner:null},Vs={};var He=null;let ge=null,ym=null,Xe=null,Pt=null,$t=null,us=0;function Rr(e,t){const n=Xe,r=He,o=e.length===0,i=t===void 0?r:t,s=o?Hf:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>wt(()=>gr(s)));He=s,Xe=null;try{return Xt(a,!0)}finally{Xe=n,He=r}}function $(e,t){t=t?Object.assign({},Ui,t):Ui;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(ge&&ge.running&&ge.sources.has(n)?o=o(n.tValue):o=o(n.value)),Wf(n,o));return[Vf.bind(n),r]}function cu(e,t,n){const r=ds(e,t,!0,gn);yo(r)}function pe(e,t,n){const r=ds(e,t,!1,gn);yo(r)}function J(e,t,n){qf=Em;const r=ds(e,t,!1,gn),o=Mr&&nt(Mr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),$t?$t.push(r):yo(r)}function ie(e,t,n){n=n?Object.assign({},Ui,n):Ui;const r=ds(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,yo(r),Vf.bind(r)}function vm(e){return e&&typeof e=="object"&&"then"in e}function Gt(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=Vs,u=null,c=!1,l=!1,d="initialValue"in i,f=typeof r=="function"&&ie(r);const g=new Set,[p,b]=(i.storage||$)(i.initialValue),[m,y]=$(void 0),[v,x]=$(void 0,{equals:!1}),[C,S]=$(d?"ready":"unresolved");Me.context&&(u=Me.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Me.load&&Me.has(u)&&(a=Me.load(u)));function k(L,P,O,D){return s===L&&(s=null,D!==void 0&&(d=!0),(L===a||P===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(D,{value:P})),a=Vs,ge&&L&&c?(ge.promises.delete(L),c=!1,Xt(()=>{ge.running=!0,A(P,O)},!1)):A(P,O)),P}function A(L,P){Xt(()=>{P===void 0&&b(()=>L),S(P!==void 0?"errored":d?"ready":"unresolved"),y(P);for(const O of g.keys())O.decrement();g.clear()},!1)}function _(){const L=Mr&&nt(Mr),P=p(),O=m();if(O!==void 0&&!s)throw O;return Xe&&!Xe.user&&L&&cu(()=>{v(),s&&(L.resolved&&ge&&c?ge.promises.add(s):g.has(L)||(L.increment(),g.add(L)))}),P}function T(L=!0){if(L!==!1&&l)return;l=!1;const P=f?f():r;if(c=ge&&ge.running,P==null||P===!1){k(s,wt(p));return}ge&&s&&ge.promises.delete(s);let O;const D=a!==Vs?a:wt(()=>{try{return o(P,{value:p(),refetching:L})}catch(I){O=I}});if(O!==void 0){k(s,void 0,Bi(O),P);return}else if(!vm(D))return k(s,D,void 0,P),D;return s=D,"v"in D?(D.s===1?k(s,D.v,void 0,P):k(s,void 0,Bi(D.v),P),D):(l=!0,queueMicrotask(()=>l=!1),Xt(()=>{S(d?"refreshing":"pending"),x()},!1),D.then(I=>k(D,I,void 0,P),I=>k(D,void 0,Bi(I),P)))}Object.defineProperties(_,{state:{get:()=>C()},error:{get:()=>m()},loading:{get(){const L=C();return L==="pending"||L==="refreshing"}},latest:{get(){if(!d)return _();const L=m();if(L&&!s)throw L;return p()}}});let M=He;return f?cu(()=>(M=He,T(!1))):T(!1),[_,{refetch:L=>cs(M,()=>T(L)),mutate:b}]}function jf(e){return Xt(e,!1)}function wt(e){if(Xe===null)return e();const t=Xe;Xe=null;try{return e()}finally{Xe=t}}function dt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const u=wt(()=>t(a,o,s));return o=a,u}}function pn(e){J(()=>wt(e))}function ne(e){return He===null||(He.cleanups===null?He.cleanups=[e]:He.cleanups.push(e)),e}function lu(){return Xe}function qo(){return He}function cs(e,t){const n=He,r=Xe;He=e,Xe=null;try{return Xt(t,!0)}catch(o){$u(o)}finally{He=n,Xe=r}}function Gf(e){if(ge&&ge.running)return e(),ge.done;const t=Xe,n=He;return Promise.resolve().then(()=>{Xe=t,He=n;let r;return Mr&&(r=ge||(ge={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Xt(e,!1),Xe=He=null,r?r.done:void 0})}const[ZD,Uc]=$(!1);function xm(e){$t.push.apply($t,e),e.length=0}function at(e,t){const n=Symbol("context");return{id:n,Provider:km(n),defaultValue:e}}function nt(e){let t;return He&&He.context&&(t=He.context[e.id])!==void 0?t:e.defaultValue}function ls(e){const t=ie(e),n=ie(()=>du(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Mr;function wm(){return Mr||(Mr=at())}function Vf(){const e=ge&&ge.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===gn)yo(this);else{const t=Pt;Pt=null,Xt(()=>qi(this),!1),Pt=t}if(Xe){const t=this.observers;if(!t||t[t.length-1]!==Xe){const n=t?t.length:0;Xe.sources?(Xe.sources.push(this),Xe.sourceSlots.push(n)):(Xe.sources=[this],Xe.sourceSlots=[n]),t?(t.push(Xe),this.observerSlots.push(Xe.sources.length-1)):(this.observers=[Xe],this.observerSlots=[Xe.sources.length-1])}}return e&&ge.sources.has(this)?this.tValue:this.value}function Wf(e,t,n){let r=ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(ge){const o=ge.running;(o||!n&&ge.sources.has(e))&&(ge.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Xt(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=ge&&ge.running;s&&ge.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Pt.push(i):$t.push(i),i.observers&&Zf(i)),s?i.tState=gn:i.state=gn)}if(Pt.length>1e6)throw Pt=[],new Error},!1)}return t}function yo(e){if(!e.fn)return;gr(e);const t=us;Kc(e,ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value,t),ge&&!ge.running&&ge.sources.has(e)&&queueMicrotask(()=>{Xt(()=>{ge&&(ge.running=!0),Xe=He=e,Kc(e,e.tValue,t),Xe=He=null},!1)})}function Kc(e,t,n){let r;const o=He,i=Xe;Xe=He=e;try{r=e.fn(t)}catch(s){return e.pure&&(ge&&ge.running?(e.tState=gn,e.tOwned&&e.tOwned.forEach(gr),e.tOwned=void 0):(e.state=gn,e.owned&&e.owned.forEach(gr),e.owned=null)),e.updatedAt=n+1,$u(s)}finally{Xe=i,He=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Wf(e,r,!0):ge&&ge.running&&e.pure?(ge.sources.has(e)||(e.value=r),ge.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ds(e,t,n,r=gn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:He,context:He?He.context:null,pure:n};return ge&&ge.running&&(i.state=0,i.tState=r),He===null||He!==Hf&&(ge&&ge.running&&He.pure?He.tOwned?He.tOwned.push(i):He.tOwned=[i]:He.owned?He.owned.push(i):He.owned=[i]),i}function Ki(e){const t=ge&&ge.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Ko)return qi(e);if(e.suspense&&wt(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<us);){if(t&&ge.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(ge.disposed.has(o))return}if((t?e.tState:e.state)===gn)yo(e);else if((t?e.tState:e.state)===Ko){const o=Pt;Pt=null,Xt(()=>qi(e,n[0]),!1),Pt=o}}}function Xt(e,t){if(Pt)return e();let n=!1;t||(Pt=[]),$t?n=!0:$t=[],us++;try{const r=e();return _m(n),r}catch(r){n||($t=null),Pt=null,$u(r)}}function _m(e){if(Pt&&(Yf(Pt),Pt=null),e)return;let t;if(ge){if(!ge.promises.size&&!ge.queue.size){const r=ge.sources,o=ge.disposed;$t.push.apply($t,ge.effects),t=ge.resolve;for(const i of $t)"tState"in i&&(i.state=i.tState),delete i.tState;ge=null,Xt(()=>{for(const i of o)gr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)gr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Uc(!1)},!1)}else if(ge.running){ge.running=!1,ge.effects.push.apply(ge.effects,$t),$t=null,Uc(!0);return}}const n=$t;$t=null,n.length&&Xt(()=>qf(n),!1),t&&t()}function Yf(e){for(let t=0;t<e.length;t++)Ki(e[t])}function Em(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ki(r)}if(Me.context){if(Me.count){Me.effects||(Me.effects=[]),Me.effects.push(...e.slice(0,n));return}No()}for(Me.effects&&(Me.done||!Me.count)&&(e=[...Me.effects,...e],n+=Me.effects.length,delete Me.effects),t=0;t<n;t++)Ki(e[t])}function qi(e,t){const n=ge&&ge.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===gn?o!==t&&(!o.updatedAt||o.updatedAt<us)&&Ki(o):i===Ko&&qi(o,t)}}}function Zf(e){const t=ge&&ge.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Ko:r.state=Ko,r.pure?Pt.push(r):$t.push(r),r.observers&&Zf(r))}}function gr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)gr(e.tOwned[t]);delete e.tOwned}if(ge&&ge.running&&e.pure)Xf(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)gr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ge&&ge.running?e.tState=0:e.state=0}function Xf(e,t){if(t||(e.tState=0,ge.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Xf(e.owned[n])}function Bi(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function $u(e,t=He){throw Bi(e)}function du(e){if(typeof e=="function"&&!e.length)return du(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=du(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function km(e,t){return function(r){let o;return pe(()=>o=wt(()=>(He.context={...He.context,[e]:r.value},ls(()=>r.children))),void 0),o}}const Cm=Symbol("fallback");function qc(e){for(let t=0;t<e.length;t++)e[t]()}function Sm(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ne(()=>qc(i)),()=>{let u=e()||[],c=u.length,l,d;return u[uu],wt(()=>{let g,p,b,m,y,v,x,C,S;if(c===0)s!==0&&(qc(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Cm],o[0]=Rr(k=>(i[0]=k,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Rr(f);s=c}else{for(b=new Array(c),m=new Array(c),a&&(y=new Array(c)),v=0,x=Math.min(s,c);v<x&&r[v]===u[v];v++);for(x=s-1,C=c-1;x>=v&&C>=v&&r[x]===u[C];x--,C--)b[C]=o[x],m[C]=i[x],a&&(y[C]=a[x]);for(g=new Map,p=new Array(C+1),d=C;d>=v;d--)S=u[d],l=g.get(S),p[d]=l===void 0?-1:l,g.set(S,d);for(l=v;l<=x;l++)S=r[l],d=g.get(S),d!==void 0&&d!==-1?(b[d]=o[l],m[d]=i[l],a&&(y[d]=a[l]),d=p[d],g.set(S,d)):i[l]();for(d=v;d<c;d++)d in b?(o[d]=b[d],i[d]=m[d],a&&(a[d]=y[d],a[d](d))):o[d]=Rr(f);o=o.slice(0,s=c),r=u.slice(0)}return o});function f(g){if(i[d]=g,a){const[p,b]=$(d);return a[d]=b,t(u[d],p)}return t(u[d])}}}function h(e,t){return wt(()=>e(t||{}))}function Ei(){return!0}const fu={get(e,t,n){return t===fn?n:e.get(t)},has(e,t){return t===fn?!0:e.has(t)},set:Ei,deleteProperty:Ei,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ei,deleteProperty:Ei}},ownKeys(e){return e.keys()}};function Ws(e){return(e=typeof e=="function"?e():e)?e:{}}function Am(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function H(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&fn in a,e[s]=typeof a=="function"?(t=!0,ie(a)):a}if(Kf&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Ws(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Ws(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Ws(e[a])));return[...new Set(s)]}},fu);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:Am.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[l];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function ue(e,...t){const n=t.length;if(Kf&&fn in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},fu));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},fu)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Tm=0;function At(){return Me.context?Me.getNextContextId():`cl-${Tm++}`}const Dm=e=>`Stale read from <${e}>.`;function lt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ie(Sm(()=>e.each,e.children,t||void 0))}function Y(e){const t=e.keyed,n=ie(()=>e.when,void 0,void 0),r=t?n:ie(n,void 0,{equals:(o,i)=>!o==!i});return ie(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?wt(()=>i(t?o:()=>{if(!wt(r))throw Dm("Show");return n()})):i}return e.fallback},void 0,void 0)}const Om=at();function fs(e){let t=0,n,r,o,i,s;const[a,u]=$(!1),c=wm(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=qo();if(Me.context&&Me.load){const p=Me.getContextId();let b=Me.load(p);if(b&&(typeof b!="object"||b.s!==1?o=b:Me.gather(p)),o&&o!=="$$f"){const[m,y]=$(void 0,{equals:!1});i=m,o.then(()=>{if(Me.done)return y();Me.gather(p),No(r),y(),No()},v=>{s=v,y()})}}const f=nt(Om);f&&(n=f.register(l.inFallback));let g;return ne(()=>g&&g()),h(c.Provider,{value:l,get children(){return ie(()=>{if(s)throw s;if(r=Me.context,i)return i(),i=void 0;r&&o==="$$f"&&No();const p=ie(()=>e.children);return ie(b=>{const m=l.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!m||o&&o!=="$$f")&&y)return l.resolved=!0,g&&g(),g=r=o=void 0,xm(l.effects),p();if(v)return g?b:Rr(x=>(g=x,r&&(No({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Rm=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Im=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Rm]),Nm=new Set(["innerHTML","textContent","innerText","children"]),Mm=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Lm=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function $m(e,t){const n=Lm[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Pm=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Fm=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","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","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Bm={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},ae=e=>ie(()=>e());function zm(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,f=1,g;for(;++d<o&&d<i&&!((g=c.get(t[d]))==null||g!==l+f);)f++;if(f>l-a){const p=t[s];for(;a<l;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Hc="_$DX_DELEGATE";function Um(e,t,n,r={}){let o;return Rr(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function B(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function an(e,t=window.document){const n=t[Hc]||(t[Hc]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Wm))}}function je(e,t,n){Ur(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Km(e,t,n,r){Ur(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function qm(e,t,n){Ur(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Nt(e,t){Ur(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Hi(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Hm(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(jc(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(jc(e,a,!0),n[a]=u)}return n}function gs(e,t,n){if(!t)return n?je(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Ho(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Vn(e,t={},n,r){const o={};return r||pe(()=>o.children=jo(e,t.children,o.children)),pe(()=>typeof t.ref=="function"&&pr(t.ref,e)),pe(()=>jm(e,t,n,!0,o,!0)),o}function pr(e,t,n){return wt(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return jo(e,t,r,n);pe(o=>jo(e,t(),o,n),r)}function jm(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Gc(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Gc(e,s,a,o[s],n,i,t)}}function Gm(e){let t,n;return!Ur()||!(t=Me.registry.get(n=Ym()))?e():(Me.completed&&Me.completed.add(t),Me.registry.delete(n),t)}function Ur(e){return!!Me.context&&!Me.done&&(!e||e.isConnected)}function Vm(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function jc(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Gc(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return gs(e,n,r);if(t==="classList")return Hm(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),g=Pm.has(f);if(!g&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(f,p)}(g||n)&&(Hi(e,f,n,g),g&&an([f]))}else if(t.slice(0,5)==="attr:")je(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")qm(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Nm.has(t))||!o&&((l=$m(t,e.tagName))||(u=Im.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(Ur(e))return n;t==="class"||t==="className"?Nt(e,n):a&&!u&&!c?e[Vm(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&Bm[t.split(":")[0]];f?Km(e,f,t,n):je(e,Mm[t]||t,n)}return n}function Wm(e){if(Me.registry&&Me.events&&Me.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Me.registry&&!Me.done&&(Me.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function jo(e,t,n,r,o){const i=Ur(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=Yr(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Yr(e,n,r)}else{if(s==="function")return pe(()=>{let u=t();for(;typeof u=="function";)u=u();n=jo(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(gu(u,t,n,o))return pe(()=>n=jo(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=Yr(e,n,r),a)return n}else c?n.length===0?Vc(e,u,r):zm(e,n,u):(n&&Yr(e),Vc(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Yr(e,n,r,t);Yr(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function gu(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=gu(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=gu(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function Vc(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Yr(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Ym(){return Me.getNextContextId()}const Zm=!1,Xm="http://www.w3.org/2000/svg";function Qf(e,t=!1,n=void 0){return t?document.createElementNS(Xm,e):document.createElement(e,{is:n})}function ps(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=qo();let i,s=!!Me.context;return J(()=>{s&&(qo().user=s=!1),i||(i=cs(o,()=>ie(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=$(!1),l=()=>c(!0);Rr(d=>w(a,()=>u()?d():i(),null)),ne(l)}else{const u=Qf(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ne(()=>a.removeChild(u))}},void 0,{render:!s}),n}function Qm(e,t){const n=ie(e);return ie(()=>{const r=n();switch(typeof r){case"function":return wt(()=>r(t));case"string":const o=Fm.has(r),i=Me.context?Gm():Qf(r,o,wt(()=>t.is));return Vn(i,t,o),i}})}function Jf(e){const[,t]=ue(e,["component"]);return Qm(()=>e.component,t)}function eg(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let pu;function Pu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),pu=window.history.state._depth}Pu();function Jm(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function eb(e,t){let n=!1;return()=>{const r=pu;Pu();const o=r==null?null:pu-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const tb=/^(?:[a-z0-9]+:)?\/\//i,nb=/^\/+|(\/)\/+$/g,tg="http://sr";function Ir(e,t=!1){const n=e.replace(nb,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function zi(e,t,n){if(tb.test(t))return;const r=Ir(e),o=n&&Ir(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+Ir(t,!i)}function rb(e,t){if(e==null)throw new Error(t);return e}function ob(e,t){return Ir(e).replace(/\/*(\*.*)?$/g,"")+Ir(t)}function ng(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function ib(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const g=i[f],p=g[0]===":",b=p?u[f]:u[f].toLowerCase(),m=p?g.slice(1):g.toLowerCase();if(p&&Ys(b,d(m)))l.params[m]=b;else if(p||!Ys(b,m))return null;l.path+=`/${b}`}if(o){const f=c?u.slice(-c).join("/"):"";if(Ys(f,d(o)))l.params[o]=f;else return null}return l}}function Ys(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function sb(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function rg(e){const t=new Map,n=qo();return new Proxy({},{get(r,o){return t.has(o)||cs(n,()=>t.set(o,ie(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function og(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return og(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const ab=100,ig=at(),Fu=at(),si=()=>rb(nt(ig),"<A> and 'use' router primitives can be only used inside a Route."),ub=()=>nt(Fu)||si().base,cb=e=>{const t=ub();return ie(()=>t.resolvePath(e()))},lb=e=>{const t=si();return ie(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},ai=()=>si().navigatorFactory(),hs=()=>si().location,ui=()=>si().params;function db(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return sg(e.path).reduce((c,l)=>{for(const d of og(l)){const f=ob(t,d);let g=a?f:f.split("/*",1)[0];g=g.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...u,originalPath:l,pattern:g,matcher:ib(g,!a,e.matchFilters)})}return c},[])}function fb(e,t=0){return{routes:e,score:sb(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function sg(e){return Array.isArray(e)?e:[e]}function ag(e,t="",n=[],r=[]){const o=sg(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=db(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)ag(a.children,c.pattern,n,r);else{const d=fb([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Zs(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function gb(e,t,n){const r=new URL(tg),o=ie(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=ie(()=>o().pathname),s=ie(()=>o().search,!0),a=ie(()=>o().hash),u=()=>"",c=dt(s,()=>ng(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):rg(c)}}let Tr;function pb(){return Tr}function hb(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(D=>D),u=s.renderPath||(D=>D),c=s.beforeLeave||eg(),l=zi("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,f]=$(!1);let g;const p=(D,I)=>{I.value===b()&&I.state===y()||(g===void 0&&f(!0),Tr=D,g=I,Gf(()=>{g===I&&(m(g.value),v(g.state),S[1](N=>N.filter(z=>z.pending)))}).finally(()=>{g===I&&jf(()=>{Tr=void 0,D==="navigate"&&P(g),f(!1),g=void 0})}))},[b,m]=$(o().value),[y,v]=$(o().state),x=gb(b,y,s.queryWrapper),C=[],S=$([]),k=ie(()=>typeof r.transformUrl=="function"?Zs(t(),r.transformUrl(x.pathname)):Zs(t(),x.pathname)),A=()=>{const D=k(),I={};for(let N=0;N<D.length;N++)Object.assign(I,D[N].params);return I},_=s.paramsWrapper?s.paramsWrapper(A,t):rg(A),T={pattern:l,path:()=>l,outlet:()=>null,resolvePath(D){return zi(l,D)}};return pe(dt(o,D=>p("native",D),{defer:!0})),{base:T,location:x,params:_,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:L,matches:k,beforeLeave:c,preloadRoute:O,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:S};function M(D,I,N){wt(()=>{if(typeof I=="number"){I&&(s.go?s.go(I):console.warn("Router integration does not support relative routing"));return}const z=!I||I[0]==="?",{replace:U,resolve:K,scroll:F,state:X}={replace:!1,resolve:!z,scroll:!0,...N},j=K?D.resolvePath(I):zi(z&&x.pathname||"",I);if(j===void 0)throw new Error(`Path '${I}' is not a routable path`);if(C.length>=ab)throw new Error("Too many redirects");const Q=b();(j!==Q||X!==y())&&(Zm||c.confirm(j,N)&&(C.push({value:Q,replace:U,scroll:F,state:y()}),p("navigate",{value:j,state:X})))})}function L(D){return D=D||nt(Fu)||T,(I,N)=>M(D,I,N)}function P(D){const I=C[0];I&&(i({...D,replace:I.replace,scroll:I.scroll}),C.length=0)}function O(D,I){const N=Zs(t(),D.pathname),z=Tr;Tr="preload";for(let U in N){const{route:K,params:F}=N[U];K.component&&K.component.preload&&K.component.preload();const{preload:X}=K;I&&X&&cs(n(),()=>X({params:F,location:{pathname:D.pathname,search:D.search,hash:D.hash,query:ng(D),state:null,key:""},intent:"preload"}))}Tr=z}}function mb(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ie(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:Tr||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?h(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(g){return zi(o.path(),g,l())}}}const bb=e=>t=>{const{base:n}=t,r=ls(()=>t.children),o=ie(()=>ag(r(),t.base||""));let i;const s=hb(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),h(ig.Provider,{value:s,get children(){return h(yb,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[ae(()=>(i=qo())&&null),h(vb,{routerState:s,get branches(){return o()}})]}})}})};function yb(e){const t=e.routerState.location,n=e.routerState.params,r=ie(()=>e.preload&&wt(()=>{e.preload({params:n,location:t,intent:pb()||"initial"})}));return h(Y,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>h(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function vb(e){const t=[];let n;const r=ie(dt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Rr(g=>{t[c]=g,u[c]=mb(e.routerState,u[c-1]||e.routerState.base,Wc(()=>r()[c+1]),()=>{const p=e.routerState.matches();return p[c]??p[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return Wc(()=>r()&&n)()}const Wc=e=>()=>h(Y,{get when(){return e()},keyed:!0,children:t=>h(Fu.Provider,{value:t,get children(){return t.outlet()}})}),or=e=>{const t=ls(()=>e.children);return H(e,{get children(){return t()}})};function xb([e,t],n,r){return[e,r?o=>t(r(o)):t]}function wb(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=xb($(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Me.registry&&!Me.done&&(Me.done=!0),o));return e.init&&ne(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),bb({signal:r,create:e.create,utils:e.utils})}function _b(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Eb(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const kb=new Map;function Cb({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(b){return b.namespaceURI==="http://www.w3.org/2000/svg"}function l(b){if(b.defaultPrevented||b.button!==0||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)return;const m=b.composedPath().find(k=>k instanceof Node&&k.nodeName.toUpperCase()==="A");if(!m||t&&!m.hasAttribute("link"))return;const y=c(m),v=y?m.href.baseVal:m.href;if((y?m.target.baseVal:m.target)||!v&&!m.hasAttribute("state"))return;const C=(m.getAttribute("rel")||"").split(/\s+/);if(m.hasAttribute("download")||C&&C.includes("external"))return;const S=y?new URL(v,document.baseURI):new URL(v);if(!(S.origin!==window.location.origin||i&&S.pathname&&!S.pathname.toLowerCase().startsWith(i.toLowerCase())))return[m,S]}function d(b){const m=l(b);if(!m)return;const[y,v]=m,x=o.parsePath(v.pathname+v.search+v.hash),C=y.getAttribute("state");b.preventDefault(),s(x,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:C?JSON.parse(C):void 0})}function f(b){const m=l(b);if(!m)return;const[y,v]=m;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,y.getAttribute("preload")!=="false")}function g(b){clearTimeout(a);const m=l(b);if(!m)return u=null;const[y,v]=m;u!==y&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,y.getAttribute("preload")!=="false"),u=y},20))}function p(b){if(b.defaultPrevented)return;let m=b.submitter&&b.submitter.hasAttribute("formaction")?b.submitter.getAttribute("formaction"):b.target.getAttribute("action");if(!m)return;if(!m.startsWith("https://action/")){const v=new URL(m,tg);if(m=o.parsePath(v.pathname+v.search),!m.startsWith(n))return}if(b.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=kb.get(m);if(y){b.preventDefault();const v=new FormData(b.target,b.submitter);y.call({r:o,f:b.target},b.target.enctype==="multipart/form-data"?v:new URLSearchParams(v))}}an(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",g,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",p),ne(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",g),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",p)})}}function Sb(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=eg();return wb({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Jm(s),"",r):window.history.pushState(s,"",r),Eb(decodeURIComponent(window.location.hash.slice(1)),i),Pu()},init:r=>_b(window,"popstate",eb(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Cb({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Ab=B("<a>");function Tn(e){e=H({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=ue(e,["href","state","class","activeClass","inactiveClass","end"]),n=cb(()=>e.href),r=lb(n),o=hs(),i=ie(()=>{const s=n();if(s===void 0)return[!1,!1];const a=Ir(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(Ir(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Ab();return Vn(s,H(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Tb(e){const t=ai(),n=hs(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const hu=Symbol("store-raw"),uo=Symbol("store-node"),zn=Symbol("store-has"),ug=Symbol("store-self");function cg(e){let t=e[fn];if(!t&&(Object.defineProperty(e,fn,{value:t=new Proxy(e,Rb)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function ji(e){let t;return e!=null&&typeof e=="object"&&(e[fn]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Go(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[hu])return n;if(!ji(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Go(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=Go(o,t))!==o&&(e[i]=r))}return e}function Gi(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Vo(e,t,n){if(e[t])return e[t];const[r,o]=$(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Db(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===fn||t===uo||(delete n.value,delete n.writable,n.get=()=>e[fn][t]),n}function lg(e){lu()&&Vo(Gi(e,uo),ug)()}function Ob(e){return lg(e),Reflect.ownKeys(e)}const Rb={get(e,t,n){if(t===hu)return e;if(t===fn)return n;if(t===uu)return lg(e),n;const r=Gi(e,uo),o=r[t];let i=o?o():e[t];if(t===uo||t===zn||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);lu()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Vo(r,t,i)())}return ji(i)?cg(i):i},has(e,t){return t===hu||t===fn||t===uu||t===uo||t===zn||t==="__proto__"?!0:(lu()&&Vo(Gi(e,zn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Ob,getOwnPropertyDescriptor:Db};function Vi(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[zn]&&e[zn][t]&&o!==void 0&&e[zn][t].$()):(e[t]=n,e[zn]&&e[zn][t]&&o===void 0&&e[zn][t].$());let s=Gi(e,uo),a;if((a=Vo(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Vo(s,"length",i))&&a.$(e.length)}(a=s[ug])&&a.$()}function dg(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];fg(o)||Vi(e,o,t[o])}}function fg(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Ib(e,t){if(typeof t=="function"&&(t=t(e)),t=Go(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Vi(e,n,o)}Vi(e,"length",r)}else dg(e,t)}function Mo(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&fg(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)Mo(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&Mo(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let d=u;d<=c;d+=l)Mo(e,[d].concat(t),n);return}else if(t.length>1){Mo(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Go(i),r===void 0||ji(o)&&ji(i)&&!Array.isArray(i)?dg(o,i):Vi(e,r,i))}function Nb(...[e,t]){const n=Go(e||{}),r=Array.isArray(n),o=cg(n);function i(...s){jf(()=>{r&&s.length===1?Ib(n,s[0]):Mo(n,s)})}return[o,i]}const Ne=e=>typeof e=="string",So=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Yc=e=>e==null?"":String(e),Mb=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Lb=/###/g,Zc=e=>e&&e.includes("###")?e.replace(Lb,"."):e,Xc=e=>!e||Ne(e),Bo=(e,t,n)=>{const r=Ne(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Xc(e))return{};const i=Zc(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Xc(e)?{}:{obj:e,k:Zc(r[o])}},Qc=(e,t,n)=>{const{obj:r,k:o}=Bo(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=Bo(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=Bo(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},$b=(e,t,n,r)=>{const{obj:o,k:i}=Bo(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Wi=(e,t)=>{const{obj:n,k:r}=Bo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pb=(e,t,n)=>{const r=Wi(e,n);return r!==void 0?r:Wi(t,n)},gg=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Ne(e[r])||e[r]instanceof String||Ne(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):gg(e[r],t[r],n):e[r]=t[r]);return e},Pn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Fb={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Bb=e=>Ne(e)?e.replace(/[&<>"'\/]/g,t=>Fb[t]):e;class zb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Ub=[" ",",","?","!",";"],Kb=new zb(20),qb=(e,t,n)=>{t=t||"",n=n||"";const r=Ub.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=Kb.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},mu=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Wo=e=>e?.replace(/_/g,"-"),Hb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Yi{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Hb,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>Ne(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Ne(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Yi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Yi(this.logger,t)}}var En=new Yi;class ms{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class Jc extends ms{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Ne(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Wi(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Ne(r)?u:mu(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Qc(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(Ne(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=Wi(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?gg(u,r,i):u={...u,...r},Qc(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var pg={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const hg=Symbol("i18next/PATH_KEY");function jb(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===hg?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function co(e,t){const{[hg]:n}=e(jb()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const Xs=e=>!Ne(e)&&typeof e!="boolean"&&typeof e!="number";class Zi extends ms{constructor(t,n={}){super(),Mb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=En.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=Xs(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!qb(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Ne(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:Ne(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=co(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(O=>typeof O=="function"?co(O,{...this.options,...o}):String(O));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,f=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const g=this.resolve(t,o);let p=g?.res;const b=g?.usedKey||a,m=g?.exactUsedKey||a,y=["[object Number]","[object Function]","[object RegExp]"],v=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!Ne(o.count),S=Zi.hasDefaultValue(o),k=C?this.pluralResolver.getSuffix(d,o.count,o):"",A=o.ordinal&&C?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",_=C&&!o.ordinal&&o.count===0,T=_&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${A}`]||o.defaultValue;let M=p;x&&!p&&S&&(M=T);const L=Xs(M),P=Object.prototype.toString.apply(M);if(x&&M&&L&&!y.includes(P)&&!(Ne(v)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,M,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=O,g.usedParams=this.getUsedParamsDetails(o),g):O}if(s){const O=Array.isArray(M),D=O?[]:{},I=O?m:b;for(const N in M)if(Object.prototype.hasOwnProperty.call(M,N)){const z=`${I}${s}${N}`;S&&!p?D[N]=this.translate(z,{...o,defaultValue:Xs(T)?T[N]:void 0,joinArrays:!1,ns:u}):D[N]=this.translate(z,{...o,joinArrays:!1,ns:u}),D[N]===z&&(D[N]=M[N])}p=D}}else if(x&&Ne(v)&&Array.isArray(p))p=p.join(v),p&&(p=this.extendTranslation(p,t,o,r));else{let O=!1,D=!1;!this.isValidLookup(p)&&S&&(O=!0,p=T),this.isValidLookup(p)||(D=!0,p=a);const N=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:p,z=S&&T!==p&&this.options.updateMissing;if(D||O||z){if(this.logger.log(z?"updateKey":"missingKey",d,c,C&&!z?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,z?T:p),s){const X=this.resolve(a,{...o,keySeparator:!1});X&&X.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let X=0;X<K.length;X++)U.push(K[X]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(o.lng||this.language):U.push(o.lng||this.language);const F=(X,j,Q)=>{const V=S&&Q!==p?Q:N;this.options.missingKeyHandler?this.options.missingKeyHandler(X,c,j,V,z,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(X,c,j,V,z,o),this.emit("missingKey",X,c,j,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?U.forEach(X=>{const j=this.pluralResolver.getSuffixes(X,o);_&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!j.includes(`${this.options.pluralSeparator}zero`)&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(Q=>{F([X],a+Q,o[`defaultValue${Q}`]||T)})}):F(U,a,T))}p=this.extendTranslation(p,t,o,g,r),D&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${l}${a}`),(D||O)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,O?p:void 0,o))}return i?(g.res=p,g.usedParams=this.getUsedParamsDetails(o),g):p}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Ne(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let l=r.replace&&!Ne(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c<f&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Ne(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=pg.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return Ne(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?co(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Ne(n.count),g=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(Ne(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(m=>{this.isValidLookup(r)||(a=m,!this.checkedLoadedFor[`${b[0]}-${m}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${b[0]}-${m}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(y=>{if(this.isValidLookup(r))return;s=y;const v=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(v,l,y,m,n);else{let C;f&&(C=this.pluralResolver.getSuffix(y,n.count,n));const S=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&C.startsWith(k)&&v.push(l+C.replace(k,this.options.pluralSeparator)),v.push(l+C),g&&v.push(l+S)),p){const A=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(A),f&&(n.ordinal&&C.startsWith(k)&&v.push(A+C.replace(k,this.options.pluralSeparator)),v.push(A+C),g&&v.push(A+S))}}let x;for(;x=v.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(y,m,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ne(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class el{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=En.create("languageUtils")}getScriptPartFromCode(t){if(t=Wo(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Wo(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ne(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Ne(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Ne(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Ne(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const tl={zero:0,one:1,two:2,few:3,many:4,other:5},nl={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Gb{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=En.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Wo(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),nl;if(!t.match(/-|_/))return nl;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>tl[o]-tl[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const rl=(e,t,n,r=".",o=!0)=>{let i=Pb(e,t,n);return!i&&o&&Ne(n)&&(i=mu(e,n,r),i===void 0&&(i=mu(t,n,r))),i},Vb=e=>e.replace(/\$/g,"$$$$");class ol{constructor(t={}){this.logger=En.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:b,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Bb,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Pn(i):s||"{{",this.suffix=a?Pn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?Pn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?Pn(l):"",this.nestingPrefix=f?Pn(f):g||Pn("$t("),this.nestingSuffix=p?Pn(p):b||Pn(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const y=rl(n,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:g}):y}const p=g.split(this.formatSeparator),b=p.shift().trim(),m=p.join(this.formatSeparator).trim();return this.format(rl(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...o,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(a=0;i=g.regex.exec(t);){const p=i[1].trim();if(s=c(p),s===void 0)if(typeof l=="function"){const m=l(t,i,o);s=Ne(m)?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),s="";else!Ne(s)&&!this.useRawValueToEscape&&(s=Yc(s));const b=g.safeValue(s);if(t=t.replace(i[0],Vb(b)),d?(g.regex.lastIndex+=b.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${Pn(l)}[ ]*{`));let f=`{${d[1]}`;u=d[0],f=this.interpolate(f,s);const g=f.match(/'/g),p=f.match(/"/g);((g?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${l}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!Ne(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!Ne(i))return i;Ne(i)||(i=Yc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const Wb=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},il=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Wo(r),o),t[s]=a),a(n)}},Yb=e=>(t,n,r)=>e(Wo(n),r)(t);class Zb{constructor(t={}){this.logger=En.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?il:Yb;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=il(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=Wb(c);if(this.formats[l]){let f=u;try{const g=o?.formatParams?.[o.interpolationkey]||{},p=g.locale||g.lng||o.locale||o.lng||r;f=this.formats[l](u,p,{...d,...o,...g})}catch(g){this.logger.warn(g)}return f}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const Xb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Qb extends ms{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=En.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{$b(u.loaded,[i],s),Xb(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ne(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ne(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Qs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ne(e[1])&&(t.defaultValue=e[1]),Ne(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),sl=e=>(Ne(e.ns)&&(e.ns=[e.ns]),Ne(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ne(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ki=()=>{},Jb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class zo extends ms{constructor(t={},n){if(super(),this.options=sl(t),this.services={},this.logger=En,this.modules={external:[]},Jb(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Ne(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Qs();this.options={...r,...this.options,...sl(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?En.init(o(this.modules.logger),this.options):En.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Zb;const l=new el(this.options);this.store=new Jc(this.options.resources,this.options);const d=this.services;d.logger=En,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new Gb(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new ol(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Qb(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...g)=>{this.emit(f,...g)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Zi(this.services,this.options),this.translator.on("*",(f,...g)=>{this.emit(f,...g)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ki),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=So(),u=()=>{const c=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(l,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=ki){let r=n;const o=Ne(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=So();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ki),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&pg.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=So();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=Ne(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Ne(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const d=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const f={...this.options,...l};Array.isArray(i)&&!d&&(f.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=co(l.keyPrefix,f));const g=this.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(a)?p=a.map(b=>(typeof b=="function"&&(b=co(b,f)),`${l.keyPrefix}${g}${b}`)):(typeof a=="function"&&(a=co(a,f)),p=l.keyPrefix?`${l.keyPrefix}${g}${a}`:a),this.t(p,l)};return Ne(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=So();return this.options.ns?(Ne(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=So();Ne(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new el(Qs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new zo(t,n);return r.createInstance=zo.createInstance,r}cloneInstance(t={},n=ki){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new zo(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,d)=>(l[d]={...u[c][d]},l),u[c]),u),{});i.store=new Jc(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...Qs().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new ol(c)}return i.translator=new Zi(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ht=zo.createInstance();ht.createInstance;ht.dir;ht.init;ht.loadResources;ht.reloadResources;ht.use;ht.changeLanguage;ht.getFixedT;ht.t;ht.exists;ht.setDefaultNamespace;ht.hasLoadedNamespace;ht.loadNamespaces;ht.loadLanguages;const{slice:e1,forEach:t1}=[];function n1(e){return t1.call(e1.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function r1(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const al=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,o1=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!al.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!al.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},ul={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=o1(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var i1={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return ul.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&ul.create(n,e,r,o,i)}},s1={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},a1={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Zr=null;const cl=()=>{if(Zr!==null)return Zr;try{if(Zr=typeof window<"u"&&window.localStorage!==null,!Zr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Zr=!1}return Zr};var u1={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&cl())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&cl()&&window.localStorage.setItem(n,e)}};let Xr=null;const ll=()=>{if(Xr!==null)return Xr;try{if(Xr=typeof window<"u"&&window.sessionStorage!==null,!Xr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Xr=!1}return Xr};var c1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&ll())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&ll()&&window.sessionStorage.setItem(n,e)}},l1={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},d1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},f1={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},g1={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let mg=!1;try{document.cookie,mg=!0}catch{}const bg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mg||bg.splice(1,1);const p1=()=>({order:bg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class yg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=n1(n,this.options||{},p1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(i1),this.addDetector(s1),this.addDetector(u1),this.addDetector(c1),this.addDetector(l1),this.addDetector(d1),this.addDetector(f1),this.addDetector(g1),this.addDetector(a1)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!r1(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}yg.type="languageDetector";const h1={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",globalConfig:"全局配置"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",refreshList:"刷新项目列表",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",inputPlaceholder:"输入消息,Enter 发送…",draftPlaceholder:"输入消息,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Agent 创建中…",creatingHint:"Agent 正在创建 spec 文档…可在右下角 Agent 面板查看流式输出,文档落地后将自动跳转。",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",stash:"暂存",reviewChanges:"Review 变更",reviewing:"Review 中…",committing:"提交中…",discarding:"丢弃中…",stashing:"暂存中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:",noReport:"尚无 review 报告。点击「Review 变更」让 Agent 生成。",lastReview:"最近一次 review:{{time}}",reviewHint:"Review 下方变更文件,生成报告"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",debugMode:"debug 模式",debugModeHint:"深度分析调试,尝试解决疑难问题",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"会话结束提示",banner:"横幅提示",sound:"声音提示",saved:"全局配置已保存",save:"保存"},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",started:"命令已启动",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",stop:"终止",stopping:"终止中…",stopped:"命令已终止",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},m1={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",globalConfig:"Global Settings"},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",refreshList:"Refresh project list",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",inputPlaceholder:"Type a message, Enter to send…",draftPlaceholder:"Type a message — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Agent creating…",creatingHint:"Agent is creating spec document… Watch streaming output in the Agent panel at bottom-right. Auto-navigate when ready.",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",stash:"Stash",reviewChanges:"Review Changes",reviewing:"Reviewing…",committing:"Committing…",discarding:"Discarding…",stashing:"Stashing…",commitPlaceholder:"commit message…",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: ",noReport:'No review report yet. Click "Review Changes" to generate.',lastReview:"Last review: {{time}}",reviewHint:"Review changed files below and generate report"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",debugMode:"debug mode",debugModeHint:"Deep analysis & debugging — tackle stubborn, hard-to-solve issues",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"Custom",agent:"Agent",cmd:"Command (cmd)",cmdPlaceholder:"e.g. /usr/local/bin/my-agent",args:"Arguments (args, space-separated)",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",cmdRequired:"Custom command cmd cannot be empty",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Session end alerts",banner:"Banner alert",sound:"Sound alert",saved:"Global settings saved",save:"Save"},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",started:"Command started",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",stop:"Stop",stopping:"Stopping...",stopped:"Command stopped",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},vg=ht.use(yg).init({resources:{"zh-CN":{translation:h1},en:{translation:m1}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});vg.then(()=>{});/**
|
|
2
|
+
* @license lucide-solid v1.24.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var b1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Qr=b1,y1=at({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),v1=B("<svg>"),x1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},w1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),_1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),dl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E1=e=>{const t=_1(e);return t.charAt(0).toUpperCase()+t.slice(1)},k1=e=>{const[t,n]=ue(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=nt(y1);return(()=>{var o=v1();return Vn(o,H(Qr,{get width(){return t.size??r.size??Qr.width},get height(){return t.size??r.size??Qr.height},get stroke(){return t.color??r.color??Qr.stroke},get"stroke-width"(){return ae(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??Qr["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??Qr["stroke-width"])},get class(){return w1("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${dl(E1(t.name))}`,`lucide-${dl(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!x1(n)?"true":void 0}},n),!0,!0),w(o,h(lt,{get each(){return t.iconNode},children:([i,s])=>h(Jf,H({component:i},s))})),o})()},Je=k1,C1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],S1=e=>h(Je,H(e,{iconNode:C1,name:"arrow-left"})),A1=S1,T1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],D1=e=>h(Je,H(e,{iconNode:T1,name:"check"})),fl=D1,O1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],R1=e=>h(Je,H(e,{iconNode:O1,name:"chevron-down"})),Bu=R1,I1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],N1=e=>h(Je,H(e,{iconNode:I1,name:"chevron-right"})),M1=N1,L1=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],$1=e=>h(Je,H(e,{iconNode:L1,name:"chevrons-left"})),xg=$1,P1=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],F1=e=>h(Je,H(e,{iconNode:P1,name:"chevrons-right"})),wg=F1,B1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],z1=e=>h(Je,H(e,{iconNode:B1,name:"circle-check"})),U1=z1,K1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],q1=e=>h(Je,H(e,{iconNode:K1,name:"circle-question-mark"})),H1=q1,j1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],G1=e=>h(Je,H(e,{iconNode:j1,name:"copy"})),V1=G1,W1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Y1=e=>h(Je,H(e,{iconNode:W1,name:"ellipsis"})),Z1=Y1,X1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Q1=e=>h(Je,H(e,{iconNode:X1,name:"git-branch"})),J1=Q1,ey=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],ty=e=>h(Je,H(e,{iconNode:ey,name:"git-merge"})),ny=ty,ry=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oy=e=>h(Je,H(e,{iconNode:ry,name:"info"})),iy=oy,sy=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],ay=e=>h(Je,H(e,{iconNode:sy,name:"languages"})),uy=ay,cy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ly=e=>h(Je,H(e,{iconNode:cy,name:"loader-circle"})),qn=ly,dy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],fy=e=>h(Je,H(e,{iconNode:dy,name:"maximize-2"})),gy=fy,py=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],hy=e=>h(Je,H(e,{iconNode:py,name:"menu"})),my=hy,by=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],yy=e=>h(Je,H(e,{iconNode:by,name:"minimize-2"})),vy=yy,xy=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],wy=e=>h(Je,H(e,{iconNode:xy,name:"paperclip"})),_y=wy,Ey=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ky=e=>h(Je,H(e,{iconNode:Ey,name:"pencil"})),Cy=ky,Sy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ay=e=>h(Je,H(e,{iconNode:Sy,name:"plus"})),bs=Ay,Ty=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Dy=e=>h(Je,H(e,{iconNode:Ty,name:"refresh-cw"})),Oy=Dy,Ry=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Iy=e=>h(Je,H(e,{iconNode:Ry,name:"send"})),ys=Iy,Ny=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],My=e=>h(Je,H(e,{iconNode:Ny,name:"settings"})),Ly=My,$y=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Py=e=>h(Je,H(e,{iconNode:$y,name:"square"})),_g=Py,Fy=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],By=e=>h(Je,H(e,{iconNode:Fy,name:"terminal"})),zy=By,Uy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ky=e=>h(Je,H(e,{iconNode:Uy,name:"trash-2"})),qy=Ky,Hy=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jy=e=>h(Je,H(e,{iconNode:Hy,name:"triangle-alert"})),Gy=jy,Vy=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Wy=e=>h(Je,H(e,{iconNode:Vy,name:"upload"})),Yy=Wy,Zy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xy=e=>h(Je,H(e,{iconNode:Zy,name:"x"})),Kr=Xy;function Ue(e){return`/api/projects/${encodeURIComponent(e)}`}async function bu(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Le(e,t){const n=await fetch(e,t);if(!n.ok){const r=await bu(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const Ce={listSpecs:e=>Le(`${Ue(e)}/specs`),getSpec:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${Ue(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await bu(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),triggerReview:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/review`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),gitOp:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getReview:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/review`),getDebug:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Le("/api/projects"),removeProject:e=>Le(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Le(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Le(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Le(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Le(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Le(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getGlobalConfig:()=>Le("/api/global-config"),updateGlobalConfig:e=>Le("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Le(`${Ue(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${Ue(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await bu(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Le(`${Ue(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Le(`${Ue(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${Ue(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${Ue(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Le(`${Ue(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Le(`${Ue(e)}/sessions`),createSession:(e,t={})=>Le(`${Ue(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Le(`${Ue(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Le(`${Ue(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Le(`${Ue(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Le(`${Ue(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Le(`${Ue(e)}/commands`),createCommand:(e,t)=>Le(`${Ue(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Le(`${Ue(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Le(`${Ue(e)}/command-runs`),getCommandRun:(e,t)=>Le(`${Ue(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Le(`${Ue(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Le(`${Ue(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Le(`${Ue(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Le(`${Ue(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[Qy,Eg]=$("");function so(e){e&&Eg(e)}function Jy(){Eg("")}const[kt,ev]=$(tv());function tv(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function vo(){const e=ui();return()=>e.projectId??kt()}function Ft(e="",t){const n=kt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[lr,kg]=$(!1);function nv(){kg(e=>!e)}function Xi(){kg(!1)}function vs(e){ne(Xi),J(()=>{if(!lr())return;const t=n=>{n.key!=="Escape"||e?.()||Xi()};window.addEventListener("keydown",t),ne(()=>window.removeEventListener("keydown",t))})}function rv(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class ov{clientId=rv();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let Wn=new ov;function xs(e){const t=e;return t.readyState=()=>Wn.readyState(),t}function iv(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Wn.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return xs(o)}function ws(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Wn.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return xs(o)}function Cg(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Wn.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return xs(r)}function Sg(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Wn.subscribe(n,r=>{r==="list-updated"&&t()})}function Ag(e){return Wn.subscribe("projects",t=>{t==="projects-changed"&&e()})}function sv(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return Wn.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function av(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return Wn.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function uv(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Wn.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return xs(o)}function Tg(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}function Dg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Dg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Og(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Dg(e))&&(r&&(r+=" "),r+=t);return r}const cv=(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},lv=(e,t)=>({classGroupId:e,validator:t}),Rg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qi="-",gl=[],dv="arbitrary..",fv=e=>{const t=pv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return gv(s);const a=s.split(Qi),u=a[0]===""&&a.length>1?1:0;return Ig(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?cv(c,u):u:c||gl}return n[s]||gl}}},Ig=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ig(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Qi):e.slice(t).join(Qi),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},gv=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?dv+r:void 0})(),pv=e=>{const{theme:t,classGroups:n}=e;return hv(n,t)},hv=(e,t)=>{const n=Rg();for(const r in e){const o=e[r];zu(o,n,r,t)}return n},zu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];mv(s,t,n,r)}},mv=(e,t,n,r)=>{if(typeof e=="string"){bv(e,t,n);return}if(typeof e=="function"){yv(e,t,n,r);return}vv(e,t,n,r)},bv=(e,t,n)=>{const r=e===""?t:Ng(t,e);r.classGroupId=n},yv=(e,t,n,r)=>{if(xv(e)){zu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(lv(n,e))},vv=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];zu(u,Ng(t,a),n,r)}},Ng=(e,t)=>{let n=e;const r=t.split(Qi),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=Rg(),n.nextPart.set(s,a)),n=a}return n},xv=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},yu="!",pl=":",_v=[],hl=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ev=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let b=0;b<l;b++){const m=o[b];if(s===0&&a===0){if(m===pl){i.push(o.slice(u,b)),u=b+1;continue}if(m==="/"){c=b;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(u);let f=d,g=!1;d.endsWith(yu)?(f=d.slice(0,-1),g=!0):d.startsWith(yu)&&(f=d.slice(1),g=!0);const p=c&&c>u?c-u:void 0;return hl(i,g,f,p)};if(t){const o=t+pl,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):hl(_v,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},kv=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Cv=e=>({cache:wv(e.cacheSize),parseClassName:Ev(e),sortModifiers:kv(e),postfixLookupClassGroupIds:Sv(e),...fv(e)}),Sv=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Av=/\s+/,Tv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Av);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:f,modifiers:g,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:m}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!m,v;if(y){const A=b.substring(0,m);v=r(A);const _=v&&s[v]?r(b):void 0;_&&_!==v&&(v=_,y=!1)}else v=r(b);if(!v){if(!y){c=d+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=g.length===0?"":g.length===1?g[0]:i(g).join(":"),C=p?x+yu:x,S=C+v;if(a.indexOf(S)>-1)continue;a.push(S);const k=o(v,y);for(let A=0;A<k.length;++A){const _=k[A];a.push(C+_)}c=d+(c.length>0?" "+c:c)}return c},Dv=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Mg(n))&&(o&&(o+=" "),o+=r);return o},Mg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mg(e[r]))&&(n&&(n+=" "),n+=t);return n},Ov=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Cv(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=Tv(u,n);return o(u,l),l};return i=s,(...u)=>i(Dv(...u))},Rv=[],vt=e=>{const t=n=>n[e]||Rv;return t.isThemeGetter=!0,t},Lg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$g=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Iv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mv=/\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$/,Lv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$v=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ir=e=>Iv.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),_n=e=>!!e&&Number.isInteger(Number(e)),Js=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fn=e=>Nv.test(e),Pg=()=>!0,Fv=e=>Mv.test(e)&&!Lv.test(e),Uu=()=>!1,Bv=e=>$v.test(e),zv=e=>Pv.test(e),Uv=e=>!be(e)&&!ye(e),Kv=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),qv=e=>vr(e,zg,Uu),be=e=>Lg.test(e),kr=e=>vr(e,Ug,Fv),ml=e=>vr(e,Xv,qe),Hv=e=>vr(e,qg,Pg),jv=e=>vr(e,Kg,Uu),bl=e=>vr(e,Fg,Uu),Gv=e=>vr(e,Bg,zv),Ci=e=>vr(e,Hg,Bv),ye=e=>$g.test(e),Ao=e=>qr(e,Ug),Vv=e=>qr(e,Kg),yl=e=>qr(e,Fg),Wv=e=>qr(e,zg),Yv=e=>qr(e,Bg),Si=e=>qr(e,Hg,!0),Zv=e=>qr(e,qg,!0),vr=(e,t,n)=>{const r=Lg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qr=(e,t,n=!1)=>{const r=$g.exec(e);return r?r[1]?t(r[1]):n:!1},Fg=e=>e==="position"||e==="percentage",Bg=e=>e==="image"||e==="url",zg=e=>e==="length"||e==="size"||e==="bg-size",Ug=e=>e==="length",Xv=e=>e==="number",Kg=e=>e==="family-name",qg=e=>e==="number"||e==="weight",Hg=e=>e==="shadow",Qv=()=>{const e=vt("color"),t=vt("font"),n=vt("text"),r=vt("font-weight"),o=vt("tracking"),i=vt("leading"),s=vt("breakpoint"),a=vt("container"),u=vt("spacing"),c=vt("radius"),l=vt("shadow"),d=vt("inset-shadow"),f=vt("text-shadow"),g=vt("drop-shadow"),p=vt("blur"),b=vt("perspective"),m=vt("aspect"),y=vt("ease"),v=vt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...C(),ye,be],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],_=()=>[ye,be,u],T=()=>[ir,"full","auto",..._()],M=()=>[_n,"none","subgrid",ye,be],L=()=>["auto",{span:["full",_n,ye,be]},_n,ye,be],P=()=>[_n,"auto",ye,be],O=()=>["auto","min","max","fr",ye,be],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",..._()],z=()=>[ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],U=()=>[ir,"screen","full","dvw","lvw","svw","min","max","fit",..._()],K=()=>[ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],F=()=>[e,ye,be],X=()=>[...C(),yl,bl,{position:[ye,be]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Wv,qv,{size:[ye,be]}],V=()=>[Js,Ao,kr],q=()=>["","none","full",c,ye,be],ee=()=>["",qe,Ao,kr],he=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[qe,Js,yl,bl],Oe=()=>["","none",p,ye,be],Fe=()=>["none",qe,ye,be],ze=()=>["none",qe,ye,be],rt=()=>[qe,ye,be],Qe=()=>[ir,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[Pg],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[Uv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",qe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ir,be,ye,m]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,be]}],"container-named":[Kv],columns:[{columns:[qe,be,ye,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:S()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",ye,be]}],basis:[{basis:[ir,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,ir,"auto","initial","none",be]}],grow:[{grow:["",qe,ye,be]}],shrink:[{shrink:["",qe,ye,be]}],order:[{order:[_n,"first","last","none",ye,be]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[a,"screen",...z()]}],"min-w":[{"min-w":[a,"screen","none",...z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,Ao,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Zv,Hv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Js,be]}],"font-family":[{font:[Vv,jv,t]}],"font-features":[{"font-features":[be]}],"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:[o,ye,be]}],"line-clamp":[{"line-clamp":[qe,"none",ye,ml]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",ye,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",ye,kr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[qe,"auto",ye,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[_n,ye,be]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,be]}],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",ye,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,ye,be],radial:["",ye,be],conic:[_n,ye,be]},Yv,Gv]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,ye,be]}],"outline-w":[{outline:["",qe,Ao,kr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",l,Si,Ci]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",d,Si,Ci]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[qe,kr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",f,Si,Ci]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[qe,ye,be]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ye,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,be]}],filter:[{filter:["","none",ye,be]}],blur:[{blur:Oe()}],brightness:[{brightness:[qe,ye,be]}],contrast:[{contrast:[qe,ye,be]}],"drop-shadow":[{"drop-shadow":["","none",g,Si,Ci]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",qe,ye,be]}],"hue-rotate":[{"hue-rotate":[qe,ye,be]}],invert:[{invert:["",qe,ye,be]}],saturate:[{saturate:[qe,ye,be]}],sepia:[{sepia:["",qe,ye,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,be]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[qe,ye,be]}],"backdrop-contrast":[{"backdrop-contrast":[qe,ye,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,ye,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,ye,be]}],"backdrop-invert":[{"backdrop-invert":["",qe,ye,be]}],"backdrop-opacity":[{"backdrop-opacity":[qe,ye,be]}],"backdrop-saturate":[{"backdrop-saturate":[qe,ye,be]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,ye,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",ye,be]}],ease:[{ease:["linear","initial",y,ye,be]}],delay:[{delay:[qe,ye,be]}],animate:[{animate:["none",v,ye,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ye,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:ze()}],"scale-x":[{"scale-x":ze()}],"scale-y":[{"scale-y":ze()}],"scale-z":[{"scale-z":ze()}],"scale-3d":["scale-3d"],skew:[{skew:rt()}],"skew-x":[{"skew-x":rt()}],"skew-y":[{"skew-y":rt()}],transform:[{transform:[ye,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qe()}],"translate-x":[{"translate-x":Qe()}],"translate-y":[{"translate-y":Qe()}],"translate-z":[{"translate-z":Qe()}],"translate-none":["translate-none"],zoom:[{zoom:[_n,ye,be]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",ye,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ye,be]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[qe,Ao,kr,ml]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jv=Ov(Qv);function ut(...e){return Jv(Og(e))}function ex(e){return(...t)=>{for(const n of e)n&&n(...t)}}const Z=e=>typeof e=="function"&&!e.length?e():e,vl=e=>Array.isArray(e)?e:e?[e]:[];function tx(e,...t){return typeof e=="function"?e(...t):e}const nx=ne;function rx(e,t,n,r){return e.addEventListener(t,n,r),nx(e.removeEventListener.bind(e,t,n,r))}function ox(e,t,n,r){const o=()=>{vl(Z(e)).forEach(i=>{i&&vl(Z(t)).forEach(s=>rx(i,s,n,r))})};typeof e=="function"?J(o):pe(o)}const ix=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function xl(e){const t={};let n;for(;n=ix.exec(e);)t[n[1]]=n[2];return t}function un(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=xl(e)}else typeof t=="string"&&(t=xl(t));return{...e,...t}}function tt(...e){return ex(e)}function sx(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function vu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ax(e){return typeof e=="number"}function oo(e){return Object.prototype.toString.call(e)==="[object String]"}function Ku(e){return typeof e=="function"}function cn(e){return t=>`${e()}-${t}`}function xt(e,t){return e?e===t||e.contains(t):!1}function Lo(e,t=!1){const{activeElement:n}=Ut(e);if(!n?.nodeName)return null;if(jg(n)&&n.contentDocument)return Lo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=Ut(n).getElementById(r);if(o)return o}}return n}function qu(e){return Ut(e).defaultView||window}function Ut(e){return e?e.ownerDocument||e:document}function jg(e){return e.tagName==="IFRAME"}var _s=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(_s||{});function Hu(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Es(){return Hu(/^Mac/i)}function ux(){return Hu(/^iPhone/i)}function cx(){return Hu(/^iPad/i)||Es()&&navigator.maxTouchPoints>1}function lx(){return ux()||cx()}function dx(){return Es()||lx()}function Te(e,t){return t&&(Ku(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Ct(e){return t=>{for(const n of e)Te(t,n)}}function fx(e){return Es()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function pt(e){if(e)if(gx())e.focus({preventScroll:!0});else{const t=px(e);e.focus(),hx(t)}}var Ai=null;function gx(){if(Ai==null){Ai=!1;try{document.createElement("div").focus({get preventScroll(){return Ai=!0,!0}})}catch{}}return Ai}function px(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function hx(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Gg=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],mx=[...Gg,'[tabindex]:not([tabindex="-1"]):not([disabled])'],ju=`${Gg.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,bx=mx.join(':not([hidden]):not([tabindex="-1"]),');function Vg(e,t){const r=Array.from(e.querySelectorAll(ju)).filter(wl);return t&&wl(e)&&r.unshift(e),r.forEach((o,i)=>{if(jg(o)&&o.contentDocument){const s=o.contentDocument.body,a=Vg(s,!1);r.splice(i,1,...a)}}),r}function wl(e){return Wg(e)&&!yx(e)}function Wg(e){return e.matches(ju)&&Gu(e)}function yx(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Gu(e,t){return e.nodeName!=="#comment"&&vx(e)&&xx(e,t)&&(!e.parentElement||Gu(e.parentElement,e))}function vx(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function xx(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function wx(e,t,n){const r=t?.tabbable?bx:ju,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Gu(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function _l(e){let t=e;for(;t&&!_x(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function _x(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Ex(){}function kx(e){return[e.clientX,e.clientY]}function Yg(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,f]=t[u],[,g]=t[u===0?s-1:u-1]||[0,0],p=(l-f)*(n-c)-(c-d)*(r-l);if(f<l){if(r>=f&&r<l){if(p===0)return!0;p>0&&(r===f?r>g&&(o=!o):o=!o)}}else if(l<f){if(r>l&&r<=f){if(p===0)return!0;p<0&&(r===f?r<g&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function ke(e,t){return H(e,t)}var To=new Map,El=new Set;function kl(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=To.get(n.target);r||(r=new Set,To.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=To.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),To.delete(n.target)),To.size===0)){for(const o of El)o();El.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?kl():document.addEventListener("DOMContentLoaded",kl));function xu(e,t){const n=Cl(e,t,"left"),r=Cl(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function Cl(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Cx(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=_l(e);for(;e&&o&&e!==n&&o!==n;)xu(o,e),e=o,o=_l(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Vu={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ks(e,t){const[n,r]=$(Sl(t?.()));return J(()=>{r(e()?.tagName.toLowerCase()||Sl(t?.()))}),n}function Sl(e){return oo(e)?e:void 0}function Pe(e){const[t,n]=ue(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return h(Jf,H(n,{get component(){return t.as}}))}var Sx=Object.defineProperty,On=(e,t)=>{for(var n in t)Sx(e,n,{get:t[n],enumerable:!0})},Ax={};On(Ax,{Button:()=>Zg,Root:()=>Yn});var Tx=["button","color","file","image","reset","submit"];function Dx(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Tx.indexOf(e.type)!==-1:!1}function Yn(e){let t;const n=ke({type:"button"},e),[r,o]=ue(n,["ref","type","disabled"]),i=ks(()=>t,()=>"button"),s=ie(()=>{const c=i();return c==null?!1:Dx({tagName:c,type:r.type})}),a=ie(()=>i()==="input"),u=ie(()=>i()==="a"&&t?.getAttribute("href")!=null);return h(Pe,H({as:"button",ref(c){var l=tt(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return ae(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return ae(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var Zg=Yn;const Al=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Tl=Og,Xg=(e,t)=>n=>{var r;if(t?.variants==null)return Tl(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const f=Al(l)||Al(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,f]=l;return f===void 0||(c[d]=f),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:f,...g}=l;return Object.entries(g).every(p=>{let[b,m]=p;return Array.isArray(m)?m.includes({...i,...a}[b]):{...i,...a}[b]===m})?[...c,d,f]:c},[]);return Tl(e,s,u,n?.class,n?.className)},Ox=Xg("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ae=e=>{const[t,n]=ue(e,["class","variant","size"]);return h(Zg,H({get class(){return ut(Ox({size:t.size,variant:t.variant}),t.class)}},n))};var Rx=B("<div>");const Ix=Xg("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Qg=e=>{const[t,n]=ue(e,["class","variant"]);return(()=>{var r=Rx();return Vn(r,H({get class(){return ut(Ix({variant:t.variant}),t.class)}},n),!1,!1),r})()},[Nx,Jg]=$(ht.language||"zh-CN"),[Mx,Lx]=$(ht.isInitialized);vg.then(()=>{Jg(ht.language||"zh-CN"),Lx(!0)});ht.on("languageChanged",e=>Jg(e));function E(e,t){return ht.t(e,t)}function ep(){return{t:E,lng:ie(()=>Nx()),ready:ie(()=>Mx()),changeLanguage:e=>ht.changeLanguage(e)}}const Cs=()=>{const e=()=>lr()?E("specDetail.exitFullscreen"):E("specDetail.fullscreen");return h(Ae,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:nv,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return lr()},get children(){return h(Y,{get when(){return lr()},get fallback(){return h(gy,{class:"h-3 w-3"})},get children(){return h(vy,{class:"h-3 w-3"})}})}})};var $x=B("<input>");const Nr=e=>{const[t,n]=ue(e,["class"]);return(()=>{var r=$x();return Vn(r,H({get class(){return ut("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var Px=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Fx=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Bx(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Px.has(n)}const t=e.split("-")[0];return Fx.has(t)}function zx(e){return Bx(e)?"rtl":"ltr"}function tp(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:zx(e)}}var wu=tp(),$o=new Set;function Dl(){wu=tp();for(const e of $o)e(wu)}function Ux(){const[e,t]=$(wu),n=ie(()=>e());return pn(()=>{$o.size===0&&window.addEventListener("languagechange",Dl),$o.add(t),ne(()=>{$o.delete(t),$o.size===0&&window.removeEventListener("languagechange",Dl)})}),{locale:()=>n().locale,direction:()=>n().direction}}var Kx=at();function xr(){const e=Ux();return nt(Kx)||e}var ea=new Map;function qx(e){const{locale:t}=xr(),n=ie(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ie(()=>{const r=n();let o;return ea.has(r)&&(o=ea.get(r)),o||(o=new Intl.Collator(t(),e),ea.set(r,o)),o})}const Hx=["top","right","bottom","left"],hr=Math.min,Zt=Math.max,Ji=Math.round,Ti=Math.floor,Sn=e=>({x:e,y:e}),jx={left:"right",right:"left",bottom:"top",top:"bottom"};function _u(e,t,n){return Zt(e,hr(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function np(e){return e==="x"?"y":"x"}function Wu(e){return e==="y"?"height":"width"}function Hn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yu(e){return np(Hn(e))}function Gx(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=Yu(e),i=Wu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=es(s)),[s,es(s)]}function Vx(e){const t=es(e);return[Eu(e),t,Eu(t)]}function Eu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ol=["left","right"],Rl=["right","left"],Wx=["top","bottom"],Yx=["bottom","top"];function Zx(e,t,n){switch(e){case"top":case"bottom":return n?t?Rl:Ol:t?Ol:Rl;case"left":case"right":return t?Wx:Yx;default:return[]}}function Xx(e,t,n,r){const o=xo(e);let i=Zx(mr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Eu)))),i}function es(e){const t=mr(e);return jx[t]+e.slice(t.length)}function Qx(e){return{top:0,right:0,bottom:0,left:0,...e}}function rp(e){return typeof e!="number"?Qx(e):{top:e,right:e,bottom:e,left:e}}function ts(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Il(e,t,n){let{reference:r,floating:o}=e;const i=Hn(t),s=Yu(t),a=Wu(s),u=mr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(u){case"top":g={x:l,y:r.y-o.height};break;case"bottom":g={x:l,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(xo(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}async function Jx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:g=0}=Hr(t,e),p=rp(g),m=a[f?d==="floating"?"reference":"floating":d],y=ts(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),C=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(y.top-S.top+p.top)/C.y,bottom:(S.bottom-y.bottom+p.bottom)/C.y,left:(y.left-S.left+p.left)/C.x,right:(S.right-y.right+p.right)/C.x}}const ew=50,tw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Jx},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=Il(c,r,u),f=r,g=0;const p={};for(let b=0;b<i.length;b++){const m=i[b];if(!m)continue;const{name:y,fn:v}=m,{x,y:C,data:S,reset:k}=await v({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=C??d,p[y]={...p[y],...S},k&&g<ew&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:l,y:d}=Il(c,f,u)),b=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:p}},nw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=Hr(e,t)||{};if(c==null)return{};const d=rp(l),f={x:n,y:r},g=Yu(o),p=Wu(g),b=await s.getDimensions(c),m=g==="y",y=m?"top":"left",v=m?"bottom":"right",x=m?"clientHeight":"clientWidth",C=i.reference[p]+i.reference[g]-f[g]-i.floating[p],S=f[g]-i.reference[g],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let A=k?k[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(k)))&&(A=a.floating[x]||i.floating[p]);const _=C/2-S/2,T=A/2-b[p]/2-1,M=hr(d[y],T),L=hr(d[v],T),P=M,O=A-b[p]-L,D=A/2-b[p]/2+_,I=_u(P,D,O),N=!u.arrow&&xo(o)!=null&&D!==I&&i.reference[p]/2-(D<P?M:L)-b[p]/2<0,z=N?D<P?D-P:D-O:0;return{[g]:f[g]+z,data:{[g]:I,centerOffset:D-I-z,...N&&{alignmentOffset:z}},reset:N}}}),rw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...m}=Hr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=mr(o),v=Hn(a),x=mr(a)===a,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),S=f||(x||!b?[es(a)]:Vx(a)),k=p!=="none";!f&&k&&S.push(...Xx(a,b,p,C));const A=[a,...S],_=await u.detectOverflow(t,m),T=[];let M=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&T.push(_[y]),d){const D=Gx(o,s,C);T.push(_[D[0]],_[D[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every(D=>D<=0)){var L,P;const D=(((L=i.flip)==null?void 0:L.index)||0)+1,I=A[D];if(I&&(!(d==="alignment"?v!==Hn(I):!1)||M.every(U=>Hn(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:D,overflows:M},reset:{placement:I}};let N=(P=M.filter(z=>z.overflows[0]<=0).sort((z,U)=>z.overflows[1]-U.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(g){case"bestFit":{var O;const z=(O=M.filter(U=>{if(k){const K=Hn(U.placement);return K===v||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,F)=>K+F,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:O[0];z&&(N=z);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Nl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ml(e){return Hx.some(t=>e[t]>=0)}const ow=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Hr(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Nl(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ml(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Nl(s,n.floating);return{data:{escapedOffsets:a,escaped:Ml(a)}}}default:return{}}}}},iw=new Set(["left","top"]);async function sw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=mr(n),a=xo(n),u=Hn(n)==="y",c=iw.has(s)?-1:1,l=i&&u?-1:1,d=Hr(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(g=a==="end"?p*-1:p),u?{x:g*l,y:f*c}:{x:f*c,y:g*l}}const aw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await sw(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},uw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...c}=Hr(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),f=Hn(mr(o)),g=np(f);let p=l[g],b=l[f];if(s){const y=g==="y"?"top":"left",v=g==="y"?"bottom":"right",x=p+d[y],C=p-d[v];p=_u(x,p,C)}if(a){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=b+d[y],C=b-d[v];b=_u(x,b,C)}const m=u.fn({...t,[g]:p,[f]:b});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[g]:s,[f]:a}}}}}},cw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Hr(e,t),l=await s.detectOverflow(t,c),d=mr(o),f=xo(o),g=Hn(o)==="y",{width:p,height:b}=i.floating;let m,y;d==="top"||d==="bottom"?(m=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,m=f==="end"?"top":"bottom");const v=b-l.top-l.bottom,x=p-l.left-l.right,C=hr(b-l[m],v),S=hr(p-l[y],x),k=!t.middlewareData.shift;let A=C,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=v),k&&!f){const M=Zt(l.left,0),L=Zt(l.right,0),P=Zt(l.top,0),O=Zt(l.bottom,0);g?_=p-2*(M!==0||L!==0?M+L:Zt(l.left,l.right)):A=b-2*(P!==0||O!==0?P+O:Zt(l.top,l.bottom))}await u({...t,availableWidth:_,availableHeight:A});const T=await s.getDimensions(a.floating);return p!==T.width||b!==T.height?{reset:{rects:!0}}:{}}}};function Ss(){return typeof window<"u"}function wo(e){return op(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rn(e){var t;return(t=(op(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function op(e){return Ss()?e instanceof Node||e instanceof Qt(e).Node:!1}function hn(e){return Ss()?e instanceof Element||e instanceof Qt(e).Element:!1}function Zn(e){return Ss()?e instanceof HTMLElement||e instanceof Qt(e).HTMLElement:!1}function Ll(e){return!Ss()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}function ci(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function lw(e){return/^(table|td|th)$/.test(wo(e))}function As(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const dw=/transform|translate|scale|rotate|perspective|filter/,fw=/paint|layout|strict|content/,Cr=e=>!!e&&e!=="none";let ta;function Zu(e){const t=hn(e)?mn(e):e;return Cr(t.transform)||Cr(t.translate)||Cr(t.scale)||Cr(t.rotate)||Cr(t.perspective)||!Xu()&&(Cr(t.backdropFilter)||Cr(t.filter))||dw.test(t.willChange||"")||fw.test(t.contain||"")}function gw(e){let t=br(e);for(;Zn(t)&&!po(t);){if(Zu(t))return t;if(As(t))return null;t=br(t)}return null}function Xu(){return ta==null&&(ta=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ta}function po(e){return/^(html|body|#document)$/.test(wo(e))}function mn(e){return Qt(e).getComputedStyle(e)}function Ts(e){return hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function br(e){if(wo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ll(e)&&e.host||Rn(e);return Ll(t)?t.host:t}function ip(e){const t=br(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&ci(t)?t:ip(t)}function Yo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ip(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Qt(o);if(i){const a=ku(s);return t.concat(s,s.visualViewport||[],ci(o)?o:[],a&&n?Yo(a):[])}else return t.concat(o,Yo(o,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sp(e){const t=mn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ji(n)!==i||Ji(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Qu(e){return hn(e)?e:e.contextElement}function lo(e){const t=Qu(e);if(!Zn(t))return Sn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sp(t);let s=(i?Ji(n.width):n.width)/r,a=(i?Ji(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const pw=Sn(0);function ap(e){const t=Qt(e);return!Xu()||!t.visualViewport?pw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qt(e)?!1:t}function Lr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Qu(e);let s=Sn(1);t&&(r?hn(r)&&(s=lo(r)):s=lo(e));const a=hw(i,n,r)?ap(i):Sn(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const f=Qt(i),g=r&&hn(r)?Qt(r):r;let p=f,b=ku(p);for(;b&&r&&g!==p;){const m=lo(b),y=b.getBoundingClientRect(),v=mn(b),x=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*m.x,C=y.top+(b.clientTop+parseFloat(v.paddingTop))*m.y;u*=m.x,c*=m.y,l*=m.x,d*=m.y,u+=x,c+=C,p=Qt(b),b=ku(p)}}return ts({width:l,height:d,x:u,y:c})}function Ds(e,t){const n=Ts(e).scrollLeft;return t?t.left+n:Lr(Rn(e)).left+n}function up(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ds(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function mw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Rn(r),a=t?As(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Sn(1);const l=Sn(0),d=Zn(r);if((d||!d&&!i)&&((wo(r)!=="body"||ci(s))&&(u=Ts(r)),d)){const g=Lr(r);c=lo(r),l.x=g.x+r.clientLeft,l.y=g.y+r.clientTop}const f=s&&!d&&!i?up(s,u):Sn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+f.x,y:n.y*c.y-u.scrollTop*c.y+l.y+f.y}}function bw(e){return Array.from(e.getClientRects())}function yw(e){const t=Rn(e),n=Ts(e),r=e.ownerDocument.body,o=Zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ds(e);const a=-n.scrollTop;return mn(r).direction==="rtl"&&(s+=Zt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const $l=25;function vw(e,t){const n=Qt(e),r=Rn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Xu();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Ds(r);if(c<=0){const l=r.ownerDocument,d=l.body,f=getComputedStyle(d),g=l.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-g);p<=$l&&(i-=p)}else c<=$l&&(i+=c);return{width:i,height:s,x:a,y:u}}function xw(e,t){const n=Lr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zn(e)?lo(e):Sn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function Pl(e,t,n){let r;if(t==="viewport")r=vw(e,n);else if(t==="document")r=yw(Rn(e));else if(hn(t))r=xw(t,n);else{const o=ap(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ts(r)}function cp(e,t){const n=br(e);return n===t||!hn(n)||po(n)?!1:mn(n).position==="fixed"||cp(n,t)}function ww(e,t){const n=t.get(e);if(n)return n;let r=Yo(e,[],!1).filter(a=>hn(a)&&wo(a)!=="body"),o=null;const i=mn(e).position==="fixed";let s=i?br(e):e;for(;hn(s)&&!po(s);){const a=mn(s),u=Zu(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ci(s)&&!u&&cp(e,s))?r=r.filter(l=>l!==s):o=a,s=br(s)}return t.set(e,r),r}function _w(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?As(t)?[]:ww(t,this._c):[].concat(n),r],a=Pl(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let f=1;f<s.length;f++){const g=Pl(t,s[f],o);u=Zt(g.top,u),c=hr(g.right,c),l=hr(g.bottom,l),d=Zt(g.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function Ew(e){const{width:t,height:n}=sp(e);return{width:t,height:n}}function kw(e,t,n){const r=Zn(t),o=Rn(t),i=n==="fixed",s=Lr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Sn(0);function c(){u.x=Ds(o)}if(r||!r&&!i)if((wo(t)!=="body"||ci(o))&&(a=Ts(t)),r){const g=Lr(t,!0,i,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?up(o,a):Sn(0),d=s.left+a.scrollLeft-u.x-l.x,f=s.top+a.scrollTop-u.y-l.y;return{x:d,y:f,width:s.width,height:s.height}}function na(e){return mn(e).position==="static"}function Fl(e,t){if(!Zn(e)||mn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function lp(e,t){const n=Qt(e);if(As(e))return n;if(!Zn(e)){let o=br(e);for(;o&&!po(o);){if(hn(o)&&!na(o))return o;o=br(o)}return n}let r=Fl(e,t);for(;r&&lw(r)&&na(r);)r=Fl(r,t);return r&&po(r)&&na(r)&&!Zu(r)?n:r||gw(e)||n}const Cw=async function(e){const t=this.getOffsetParent||lp,n=this.getDimensions,r=await n(e.floating);return{reference:kw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sw(e){return mn(e).direction==="rtl"}const dp={convertOffsetParentRelativeRectToViewportRelativeRect:mw,getDocumentElement:Rn,getClippingRect:_w,getOffsetParent:lp,getElementRects:Cw,getClientRects:bw,getDimensions:Ew,getScale:lo,isElement:hn,isRTL:Sw};function fp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Aw(e,t){let n=null,r;const o=Rn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:f,height:g}=c;if(a||t(),!f||!g)return;const p=Ti(d),b=Ti(o.clientWidth-(l+f)),m=Ti(o.clientHeight-(d+g)),y=Ti(l),x={rootMargin:-p+"px "+-b+"px "+-m+"px "+-y+"px",threshold:Zt(0,hr(1,u))||1};let C=!0;function S(k){const A=k[0].intersectionRatio;if(A!==u){if(!C)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!fp(c,e.getBoundingClientRect())&&s(),C=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function Tw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Qu(e),l=o||i?[...c?Yo(c):[],...t?Yo(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?Aw(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),c&&!u&&g.observe(c),t&&g.observe(t));let p,b=u?Lr(e):null;u&&m();function m(){const y=Lr(e);b&&!fp(b,y)&&n(),b=y,p=requestAnimationFrame(m)}return n(),()=>{var y;l.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(p)}}const Dw=aw,Ow=uw,Rw=rw,Iw=cw,Nw=ow,Mw=nw,Lw=(e,t,n)=>{const r=new Map,o={platform:dp,...n},i={...o.platform,_c:r};return tw(e,t,{...o,platform:i})};var $w=B('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Ju=at();function ec(){const e=nt(Ju);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var Cu=30,Bl=Cu/2,Pw={top:180,right:-90,bottom:0,left:90};function jr(e){const t=ec(),n=ke({size:Cu},e),[r,o]=ue(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Fw(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*(Cu/r.size),d=()=>`rotate(${Pw[i()]} ${Bl} ${Bl}) translate(0 2)`;return h(Pe,H({as:"div",ref(f){var g=tt(t.setArrowRef,r.ref);typeof g=="function"&&g(f)},"aria-hidden":"true",get style(){return un({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var f=$w(),g=f.firstChild,p=g.firstChild;return p.nextSibling,pe(()=>je(g,"transform",d())),f}}))}function Fw(e){const[t,n]=$();return J(()=>{const r=e();r&&n(qu(r).getComputedStyle(r))}),t}function Bw(e){const t=ec(),[n,r]=ue(e,["ref","style"]);return h(Pe,H({as:"div",ref(o){var i=tt(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return un({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function zl(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function zw(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?zl(r):e?e.getBoundingClientRect():zl()}}}function Uw(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Kw={top:"bottom",right:"left",bottom:"top",left:"right"};function qw(e,t){const[n,r]=e.split("-"),o=Kw[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Hw(e){const t=ke({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=$(),[o,i]=$(),[s,a]=$(t.placement),u=()=>zw(t.anchorRef?.(),t.getAnchorRect),{direction:c}=xr();async function l(){const f=u(),g=n(),p=o();if(!f||!g)return;const b=(p?.clientHeight||0)/2,m=typeof t.gutter=="number"?t.gutter+b:t.gutter??b;g.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const y=[Dw(({placement:k})=>{const A=!!k.split("-")[1];return{mainAxis:m,crossAxis:A?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const k=typeof t.flip=="string"?t.flip.split(" "):void 0;if(k!==void 0&&!k.every(Uw))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(Rw({padding:t.overflowPadding,fallbackPlacements:k}))}(t.slide||t.overlap)&&y.push(Ow({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(Iw({padding:t.overflowPadding,apply({availableWidth:k,availableHeight:A,rects:_}){const T=Math.round(_.reference.width);k=Math.floor(k),A=Math.floor(A),g.style.setProperty("--kb-popper-anchor-width",`${T}px`),g.style.setProperty("--kb-popper-content-available-width",`${k}px`),g.style.setProperty("--kb-popper-content-available-height",`${A}px`),t.sameWidth&&(g.style.width=`${T}px`),t.fitViewport&&(g.style.maxWidth=`${k}px`,g.style.maxHeight=`${A}px`)}})),t.hideWhenDetached&&y.push(Nw({padding:t.detachedPadding})),p&&y.push(Mw({element:p,padding:t.arrowPadding}));const v=await Lw(f,g,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...dp,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!g)return;g.style.setProperty("--kb-popper-content-transform-origin",qw(v.placement,c()));const x=Math.round(v.x),C=Math.round(v.y);let S;if(t.hideWhenDetached&&(S=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(g.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${C}px, 0)`,visibility:S}),p&&v.middlewareData.arrow){const{x:k,y:A}=v.middlewareData.arrow,_=v.placement.split("-")[0];Object.assign(p.style,{left:k!=null?`${k}px`:"",top:A!=null?`${A}px`:"",[_]:"100%"})}}J(()=>{const f=u(),g=n();if(!f||!g)return;const p=Tw(f,g,l,{elementResize:typeof ResizeObserver=="function"});ne(p)}),J(()=>{const f=n(),g=t.contentRef?.();!f||!g||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(g).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return h(Ju.Provider,{value:d,get children(){return t.children}})}var _o=Object.assign(Hw,{Arrow:jr,Context:Ju,usePopperContext:ec,Positioner:Bw});function gp(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=oo(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=oo(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(oo(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return oo(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(oo(u)||ax(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=gp({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function jw(e,t=[]){return ie(()=>{const n=gp({dataSource:Z(e.dataSource),getKey:Z(e.getKey),getTextValue:Z(e.getTextValue),getDisabled:Z(e.getDisabled),getSectionChildren:Z(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function li(e){const[t,n]=$(e.defaultValue?.()),r=ie(()=>e.value?.()!==void 0),o=ie(()=>r()?e.value?.():t());return[o,s=>{wt(()=>{const a=tx(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function pp(e){const[t,n]=li(e);return[()=>t()??!1,n]}function Gw(e){const[t,n]=li(e);return[()=>t()??[],n]}var Un=class hp extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof hp?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function Vw(e){const[t,n]=li(e);return[()=>t()??new Un,n]}function mp(e){return dx()?e.altKey:e.ctrlKey}function io(e){return Es()?e.metaKey:e.ctrlKey}function Ul(e){return new Un(e)}function Ww(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Yw(e){const t=ke({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=$(!1),[o,i]=$(),s=ie(()=>{const b=Z(t.selectedKeys);return b!=null?Ul(b):b}),a=ie(()=>{const b=Z(t.defaultSelectedKeys);return b!=null?Ul(b):new Un}),[u,c]=Vw({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=$(Z(t.selectionBehavior)),f=()=>Z(t.selectionMode),g=()=>Z(t.disallowEmptySelection)??!1,p=b=>{(Z(t.allowDuplicateSelectionEvents)||!Ww(b,u()))&&c(b)};return J(()=>{const b=u();Z(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),J(()=>{d(Z(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:g,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:p}}function Zw(e){const[t,n]=$(""),[r,o]=$(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(Z(e.isDisabled))return;const a=Z(e.keyboardDelegate),u=Z(e.selectionManager);if(!a.getKeyForSearch)return;const c=Xw(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(f=>f+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&Qw(l)&&(l=l[0],d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Xw(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Qw(e){return e.split("").every(t=>t===e[0])}function Jw(e,t,n){const o=H({selectOnFocus:()=>Z(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=xr();let a={top:0,left:0};ox(()=>Z(o.isVirtualized)?void 0:i(),"scroll",()=>{const m=i();m&&(a={top:m.scrollTop,left:m.scrollLeft})});const{typeSelectHandlers:u}=Zw({isDisabled:()=>Z(o.disallowTypeAhead),keyboardDelegate:()=>Z(o.keyboardDelegate),selectionManager:()=>Z(o.selectionManager)}),c=()=>Z(o.orientation)??"vertical",l=m=>{Te(m,u.onKeyDown),m.altKey&&m.key==="Tab"&&m.preventDefault();const y=t();if(!y?.contains(m.target))return;const v=Z(o.selectionManager),x=Z(o.selectOnFocus),C=_=>{_!=null&&(v.setFocusedKey(_),m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&!mp(m)&&v.replaceSelection(_))},S=Z(o.keyboardDelegate),k=Z(o.shouldFocusWrap),A=v.focusedKey();switch(m.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(S.getKeyBelow){m.preventDefault();let _;A!=null?_=S.getKeyBelow(A):_=S.getFirstKey?.(),_==null&&k&&(_=S.getFirstKey?.(A)),C(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(S.getKeyAbove){m.preventDefault();let _;A!=null?_=S.getKeyAbove(A):_=S.getLastKey?.(),_==null&&k&&(_=S.getLastKey?.(A)),C(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(S.getKeyLeftOf){m.preventDefault();const _=s()==="rtl";let T;A!=null?T=S.getKeyLeftOf(A):T=_?S.getFirstKey?.():S.getLastKey?.(),C(T)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(S.getKeyRightOf){m.preventDefault();const _=s()==="rtl";let T;A!=null?T=S.getKeyRightOf(A):T=_?S.getLastKey?.():S.getFirstKey?.(),C(T)}break}case"Home":if(S.getFirstKey){m.preventDefault();const _=S.getFirstKey(A,io(m));_!=null&&(v.setFocusedKey(_),io(m)&&m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"End":if(S.getLastKey){m.preventDefault();const _=S.getLastKey(A,io(m));_!=null&&(v.setFocusedKey(_),io(m)&&m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"PageDown":if(S.getKeyPageBelow&&A!=null){m.preventDefault();const _=S.getKeyPageBelow(A);C(_)}break;case"PageUp":if(S.getKeyPageAbove&&A!=null){m.preventDefault();const _=S.getKeyPageAbove(A);C(_)}break;case"a":io(m)&&v.selectionMode()==="multiple"&&Z(o.disallowSelectAll)!==!0&&(m.preventDefault(),v.selectAll());break;case"Escape":m.defaultPrevented||(m.preventDefault(),Z(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!Z(o.allowsTabNavigation)){if(m.shiftKey)y.focus();else{const _=wx(y,{tabbable:!0});let T,M;do M=_.lastChild(),M&&(T=M);while(M);T&&!T.contains(document.activeElement)&&pt(T)}break}}},d=m=>{const y=Z(o.selectionManager),v=Z(o.keyboardDelegate),x=Z(o.selectOnFocus);if(y.isFocused()){m.currentTarget.contains(m.target)||y.setFocused(!1);return}if(m.currentTarget.contains(m.target)){if(y.setFocused(!0),y.focusedKey()==null){const C=k=>{k!=null&&(y.setFocusedKey(k),x&&y.replaceSelection(k))},S=m.relatedTarget;S&&m.currentTarget.compareDocumentPosition(S)&Node.DOCUMENT_POSITION_FOLLOWING?C(y.lastSelectedKey()??v.getLastKey?.()):C(y.firstSelectedKey()??v.getFirstKey?.())}else if(!Z(o.isVirtualized)){const C=i();if(C){C.scrollTop=a.top,C.scrollLeft=a.left;const S=C.querySelector(`[data-key="${y.focusedKey()}"]`);S&&(pt(S),xu(C,S))}}}},f=m=>{const y=Z(o.selectionManager);m.currentTarget.contains(m.relatedTarget)||y.setFocused(!1)},g=m=>{i()===m.target&&m.preventDefault()},p=()=>{const m=Z(o.autoFocus);if(!m)return;const y=Z(o.selectionManager),v=Z(o.keyboardDelegate);let x;m==="first"&&(x=v.getFirstKey?.()),m==="last"&&(x=v.getLastKey?.());const C=y.selectedKeys();C.size&&(x=C.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const S=t();S&&x==null&&!Z(o.shouldUseVirtualFocus)&&pt(S)};return pn(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),J(dt([i,()=>Z(o.isVirtualized),()=>Z(o.selectionManager).focusedKey()],m=>{const[y,v,x]=m;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const C=y.querySelector(`[data-key="${x}"]`);C&&xu(y,C)}})),{tabIndex:ie(()=>{if(!Z(o.shouldUseVirtualFocus))return Z(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:g,onFocusIn:d,onFocusOut:f}}function bp(e,t){const n=()=>Z(e.selectionManager),r=()=>Z(e.key),o=()=>Z(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||io(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>Z(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=v=>{u()&&(c=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!Z(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&Z(e.shouldSelectOnPressUp)&&Z(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{u()&&(Z(e.shouldSelectOnPressUp)&&!Z(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},g=v=>{!u()||!["Enter"," "].includes(v.key)||(mp(v)?n().toggleSelection(r()):i(v))},p=v=>{a()&&v.preventDefault()},b=v=>{const x=t();o()||a()||!x||v.target===x&&n().setFocusedKey(r())},m=ie(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=ie(()=>Z(e.virtualized)?void 0:r());return J(dt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,C,S,k])=>{v&&x===S&&k&&!C&&document.activeElement!==v&&(e.focus?e.focus():pt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:m,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:f,onKeyDown:g,onMouseDown:p,onFocus:b}}var e_=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Un(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Un(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Un([t],t,t):new Un;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Un;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Un)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Kl=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function t_(e){const t=Yw(e),r=jw({dataSource:()=>Z(e.dataSource),getKey:()=>Z(e.getKey),getTextValue:()=>Z(e.getTextValue),getDisabled:()=>Z(e.getDisabled),getSectionChildren:()=>Z(e.getSectionChildren),factory:i=>e.filter?new Kl(e.filter(i)):new Kl(i)},[()=>e.filter]),o=new e_(r,t);return cu(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var n_=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function r_(e,t,n){const r=qx({usage:"search",sensitivity:"base"}),o=ie(()=>{const i=Z(e.keyboardDelegate);return i||new n_(e.collection,t,r)});return Jw({selectionManager:()=>Z(e.selectionManager),keyboardDelegate:o,autoFocus:()=>Z(e.autoFocus),deferAutoFocus:()=>Z(e.deferAutoFocus),shouldFocusWrap:()=>Z(e.shouldFocusWrap),disallowEmptySelection:()=>Z(e.disallowEmptySelection),selectOnFocus:()=>Z(e.selectOnFocus),disallowTypeAhead:()=>Z(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Z(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Z(e.allowsTabNavigation),isVirtualized:()=>Z(e.isVirtualized),scrollToKey:i=>Z(e.scrollToKey)?.(i),orientation:()=>Z(e.orientation)},t)}var yp=at();function vp(){return nt(yp)}function o_(){const e=vp();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function xp(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function i_(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&xp(o,n))return r+1}return 0}function s_(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:xp(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function wp(e,t){const n=s_(e);e!==n&&t(n)}function a_(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Ut(r).body}function u_(e,t){J(()=>{const n=setTimeout(()=>{wp(e(),t)});ne(()=>clearTimeout(n))})}function c_(e,t){if(typeof IntersectionObserver!="function"){u_(e,t);return}let n=[];J(()=>{const r=()=>{const s=!!n.length;n=e(),s&&wp(e(),t)},o=a_(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ne(()=>i.disconnect())})}function l_(e={}){const[t,n]=Gw({value:()=>Z(e.items),onChange:i=>e.onItemsChange?.(i)});c_(t,n);const r=i=>(n(s=>{const a=i_(s,i);return sx(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>h(yp.Provider,{value:{registerItem:r},get children(){return i.children}})}}function d_(e){const t=o_(),n=ke({shouldRegisterItem:!0},e);J(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ne(r)})}var Zo="data-kb-top-layer",_p,Su=!1,An=[];function Xo(e){return An.findIndex(t=>t.node===e)}function f_(e){return An[Xo(e)]}function g_(e){return An.length>0&&An[An.length-1].node===e}function Ep(){return An.filter(e=>e.isPointerBlocking)}function p_(){return[...Ep()].slice(-1)[0]}function tc(){return Ep().length>0}function kp(e){const t=Xo(p_()?.node);return Xo(e)<t}function h_(e){An.push(e)}function m_(e){const t=Xo(e);t<0||An.splice(t,1)}function b_(){for(const{node:e}of An)e.style.pointerEvents=kp(e)?"none":"auto"}function y_(e){if(tc()&&!Su){const t=Ut(e);_p=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Su=!0}}function v_(e){if(tc())return;const t=Ut(e);t.body.style.pointerEvents=_p,t.body.style.length===0&&t.body.removeAttribute("style"),Su=!1}var Yt={layers:An,isTopMostLayer:g_,hasPointerBlockingLayer:tc,isBelowPointerBlockingLayer:kp,addLayer:h_,removeLayer:m_,indexOf:Xo,find:f_,assignPointerEventToLayers:b_,disableBodyPointerEvents:y_,restoreBodyPointerEvents:v_},ra="focusScope.autoFocusOnMount",oa="focusScope.autoFocusOnUnmount",ql={bubbles:!1,cancelable:!0},Hl={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=vu(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=vu(this.stack,e),this.active()?.resume()}};function nc(e,t){const[n,r]=$(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),u=()=>Ut(t()),c=()=>{const p=u().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,Vu),p},l=()=>{const p=t();return p?Vg(p,!0).filter(b=>!b.hasAttribute("data-focus-trap")):[]},d=()=>{const p=l();return p.length>0?p[0]:null},f=()=>{const p=l();return p.length>0?p[p.length-1]:null},g=()=>{const p=t();if(!p)return!1;const b=Lo(p);return!b||xt(p,b)?!1:Wg(b)};J(()=>{const p=t();if(!p)return;Hl.add(o);const b=Lo(p);if(!xt(p,b)){const y=new CustomEvent(ra,ql);p.addEventListener(ra,s),p.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{pt(d()),Lo(p)===b&&pt(p)},0)}ne(()=>{p.removeEventListener(ra,s),setTimeout(()=>{const y=new CustomEvent(oa,ql);g()&&y.preventDefault(),p.addEventListener(oa,a),p.dispatchEvent(y),y.defaultPrevented||pt(b??u().body),p.removeEventListener(oa,a),Hl.remove(o)},0)})}),J(()=>{const p=t();if(!p||!Z(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${Zo}]`)||(xt(p,v)?i=v:pt(i))},m=y=>{const x=y.relatedTarget??Lo(p);x?.closest(`[${Zo}]`)||xt(p,x)||pt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",m),ne(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",m)})}),J(()=>{const p=t();if(!p||!Z(e.trapFocus)||n())return;const b=c();p.insertAdjacentElement("afterbegin",b);const m=c();p.insertAdjacentElement("beforeend",m);function y(x){const C=d(),S=f();x.relatedTarget===C?pt(S):pt(C)}b.addEventListener("focusin",y),m.addEventListener("focusin",y);const v=new MutationObserver(x=>{for(const C of x)C.previousSibling===m&&(m.remove(),p.insertAdjacentElement("beforeend",m)),C.nextSibling===b&&(b.remove(),p.insertAdjacentElement("afterbegin",b))});v.observe(p,{childList:!0,subtree:!1}),ne(()=>{b.removeEventListener("focusin",y),m.removeEventListener("focusin",y),b.remove(),m.remove(),v.disconnect()})})}var x_="data-live-announcer";function rc(e){J(()=>{Z(e.isDisabled)||ne(w_(Z(e.targets),Z(e.root)))})}var Do=new WeakMap,rn=[];function w_(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const f of u.querySelectorAll(`[${x_}], [${Zo}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const g of n)if(f.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let f=l.nextNode();for(;f!=null;)i(f),f=l.nextNode()}},i=u=>{const c=Do.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),Do.set(u,c+1))};rn.length&&rn[rn.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return rn.push(a),()=>{s.disconnect();for(const u of r){const c=Do.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),Do.delete(u)):Do.set(u,c-1)}a===rn[rn.length-1]?(rn.pop(),rn.length&&rn[rn.length-1].observe()):rn.splice(rn.indexOf(a),1)}}function __(e){const t=n=>{n.key===_s.Escape&&e.onEscapeKeyDown?.(n)};J(()=>{if(Z(e.isDisabled))return;const n=e.ownerDocument?.()??Ut();n.addEventListener("keydown",t),ne(()=>{n.removeEventListener("keydown",t)})})}var jl="interactOutside.pointerDownOutside",Gl="interactOutside.focusOutside";function E_(e,t){let n,r=Ex;const o=()=>Ut(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${Zo}]`)||!xt(o(),f)||xt(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const g=t(),p=d.target;if(!g||!p||!u(d))return;const b=Ct([i,a]);p.addEventListener(jl,b,{once:!0});const m=new CustomEvent(jl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||fx(d)&&d.button===0}});p.dispatchEvent(m)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},l=d=>{const f=t(),g=d.target;if(!f||!g||!u(d))return;const p=Ct([s,a]);g.addEventListener(Gl,p,{once:!0});const b=new CustomEvent(Gl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});g.dispatchEvent(b)};J(()=>{Z(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ne(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var Cp=at();function k_(){return nt(Cp)}function Os(e){let t;const n=k_(),[r,o]=ue(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n?.registerNestedLayer(d);return()=>{i.delete(d),f?.()}};E_({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>xt(f(),d))||[...i].some(f=>xt(f,d)):!1,onPointerDownOutside:d=>{!t||Yt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Yt.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),__({ownerDocument:()=>Ut(t),onEscapeKeyDown:d=>{!t||!Yt.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),pn(()=>{if(!t)return;Yt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Yt.assignPointerEventToLayers(),Yt.disableBodyPointerEvents(t),ne(()=>{t&&(Yt.removeLayer(t),d?.(),Yt.assignPointerEventToLayers(),Yt.restoreBodyPointerEvents(t))})}),J(dt([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const g=Yt.find(d);g&&g.isPointerBlocking!==f&&(g.isPointerBlocking=f,Yt.assignPointerEventToLayers()),f&&Yt.disableBodyPointerEvents(d),ne(()=>{Yt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return h(Cp.Provider,{value:l,get children(){return h(Pe,H({as:"div",ref(d){var f=tt(g=>t=g,r.ref);typeof f=="function"&&f(d)}},o))}})}function Eo(e={}){const[t,n]=pp({value:()=>Z(e.open),defaultValue:()=>!!Z(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function Sp(e={}){const[t,n]=pp({value:()=>Z(e.isSelected),defaultValue:()=>!!Z(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(i)},toggle:()=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(!t())}}}function ft(e){return t=>(e(t),()=>e(void 0))}var Lt=e=>typeof e=="function"?e():e,Au=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Di=new Map,C_=e=>{J(()=>{const t=Lt(e.style)??{},n=Lt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Di.get(e.key);o?o.activeCount++:Di.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ne(()=>{const i=Di.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Di.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Vl=C_,S_=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},A_=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},T_=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=S_(o,t),d=l-u-r*c;(c!==0||d!==0)&&A_(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Wl,Yl]=$([]),D_=e=>Wl().indexOf(e)===Wl().length-1,O_=e=>{const t=H({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=At();let r=[0,0],o=null,i=null;J(()=>{Lt(t.enabled)&&(Yl(c=>[...c,n]),ne(()=>{Yl(c=>c.filter(l=>l!==n))}))}),J(()=>{if(!Lt(t.enabled)||!Lt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Lt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];l>0&&(Lt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,f.push({key:"--scrollbar-width",value:`${l}px`}));const g=window.scrollY,p=window.scrollX;Vl({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Lt(t.restoreScrollPosition)&&l>0&&window.scrollTo(p,g)}})}else Vl({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),J(()=>{!D_(n)||!Lt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ne(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=Zl(c),o=null,i=null},a=c=>{const l=c.target,d=Lt(t.element),f=R_(c),g=Math.abs(f[0])>Math.abs(f[1])?"x":"y",p=g==="x"?f[0]:f[1],b=Xl(l,g,p,d);let m;d&&Au(d,l)?m=!b:m=!0,m&&c.cancelable&&c.preventDefault()},u=c=>{const l=Lt(t.element),d=c.target;let f;if(c.touches.length===2)f=!Lt(t.allowPinchZoom);else{if(o==null||i===null){const g=Zl(c).map((b,m)=>r[m]-b),p=Math.abs(g[0])>Math.abs(g[1])?"x":"y";o=p,i=p==="x"?g[0]:g[1]}if(d.type==="range")f=!1;else{const g=Xl(d,o,i,l);l&&Au(l,d)?f=!g:f=!0}}f&&c.cancelable&&c.preventDefault()}},R_=e=>[e.deltaX,e.deltaY],Zl=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Xl=(e,t,n,r)=>{const o=r!==null&&Au(r,e),[i,s]=T_(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},I_=O_,oc=I_,N_=e=>{const t=ie(()=>{const s=Lt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=$(Lt(e.show)?"present":"hidden");let i="none";return J(s=>{const a=Lt(e.show);return wt(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),J(()=>{const s=Lt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ne(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},M_=N_,Gn=M_,L_=at();function Rs(){return nt(L_)}var $_=at();function Ap(){return nt($_)}var Tp=at();function Dp(){return nt(Tp)}function Xn(){const e=Dp();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var Op=at();function ic(){const e=nt(Op);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var Rp=at();function In(){const e=nt(Rp);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function sc(e){let t;const n=In(),r=Xn(),o=ke({id:n.generateId(`item-${At()}`)},e),[i,s]=ue(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),g=()=>r.listState().selectionManager(),p=()=>s.id,b=()=>g().focusedKey()===p(),m=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};d_({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=bp({key:p,selectionManager:g,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=T=>{Te(T,i.onPointerMove),T.pointerType==="mouse"&&(i.disabled?r.onItemLeave(T):(r.onItemEnter(T),T.defaultPrevented||(pt(T.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},x=T=>{Te(T,i.onPointerLeave),T.pointerType==="mouse"&&r.onItemLeave(T)},C=T=>{Te(T,i.onPointerUp),!i.disabled&&T.button===0&&m()},S=T=>{if(Te(T,i.onKeyDown),!T.repeat&&!i.disabled)switch(T.key){case"Enter":case" ":m();break}},k=ie(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),A=ie(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":b()?"":void 0})),_={isChecked:()=>i.checked,dataset:A,setLabelRef:f,generateId:cn(()=>s.id),registerLabel:ft(u),registerDescription:ft(l)};return h(Op.Provider,{value:_,get children(){return h(Pe,H({as:"div",ref(T){var M=tt(L=>t=L,i.ref);typeof M=="function"&&M(T)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return y.dataKey()},get onPointerDown(){return Ct([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return Ct([C,y.onPointerUp])},get onClick(){return Ct([i.onClick,y.onClick])},get onKeyDown(){return Ct([S,y.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,y.onMouseDown])},get onFocus(){return Ct([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},A,s))}})}function Ip(e){const t=ke({closeOnSelect:!1},e),[n,r]=ue(t,["checked","defaultChecked","onChange","onSelect"]),o=Sp({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return h(sc,H({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Qo={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Qo.next(e==="ltr"?"rtl":"ltr",t)},Ql={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function Np(e){const t=In(),n=Xn(),r=Rs(),{direction:o}=xr(),i=ke({id:t.generateId("trigger")},e),[s,a]=ue(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=ks(()=>n.triggerRef(),()=>"button"),l=ie(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);J(dt(()=>r?.value(),y=>{l()&&y===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=y=>{Te(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},g=y=>{Te(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},p=y=>{if(Te(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Ql.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Cx(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Ql.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Qo.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Qo.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{Te(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},m=y=>{Te(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return J(()=>ne(n.registerTriggerId(s.id))),h(Yn,H({ref(y){var v=tt(n.setTriggerRef,s.ref);typeof v=="function"&&v(y)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return ae(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:f,onMouseOver:b,onClick:g,onKeyDown:p,onFocus:m,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function Mp(e){let t;const n=In(),r=Xn(),o=Rs(),i=Ap(),{direction:s}=xr(),a=ke({id:n.generateId(`content-${At()}`)},e),[u,c]=ue(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=r_({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);nc({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const g=x=>{if(xt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Qo.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Qo.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},b=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},m=x=>{Te(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(Te(x,u.onPointerMove),x.pointerType!=="mouse")return;const C=x.target,S=l!==x.clientX;xt(x.currentTarget,C)&&S&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};J(()=>ne(r.registerContentId(u.id))),ne(()=>r.setContentRef(void 0));const v={ref:tt(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Ct([u.onKeyDown,f.onKeyDown,g]),onMouseDown:Ct([u.onMouseDown,f.onMouseDown]),onFocusIn:Ct([u.onFocusIn,f.onFocusIn]),onFocusOut:Ct([u.onFocusOut,f.onFocusOut]),onPointerEnter:m,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return h(Y,{get when(){return r.contentPresent()},get children(){return h(Y,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return h(Pe,H({as:"div"},()=>r.dataset(),v,c))},get children(){return h(_o.Positioner,{get children(){return h(Os,H({get disableOutsidePointerEvents(){return ae(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return un({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:p,onFocusOutside:b,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function P_(e){let t;const n=In(),r=Xn(),[o,i]=ue(e,["ref"]);return oc({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),h(Mp,H({ref(s){var a=tt(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var Lp=at();function F_(){const e=nt(Lp);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function ac(e){const t=In(),n=ke({id:t.generateId(`group-${At()}`)},e),[r,o]=$(),i={generateId:cn(()=>n.id),registerLabelId:ft(o)};return h(Lp.Provider,{value:i,get children(){return h(Pe,H({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function $p(e){const t=F_(),n=ke({id:t.generateId("label")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerLabelId(r.id))),h(Pe,H({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Pp(e){const t=Xn(),n=ke({children:"▼"},e);return h(Pe,H({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Fp(e){return h(sc,H({role:"menuitem",closeOnSelect:!0},e))}function Bp(e){const t=ic(),n=ke({id:t.generateId("description")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerDescription(r.id))),h(Pe,H({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function zp(e){const t=ic(),n=ke({id:t.generateId("indicator")},e),[r,o]=ue(n,["forceMount"]);return h(Y,{get when(){return r.forceMount||t.isChecked()},get children(){return h(Pe,H({as:"div"},()=>t.dataset(),o))}})}function Up(e){const t=ic(),n=ke({id:t.generateId("label")},e),[r,o]=ue(n,["ref","id"]);return J(()=>ne(t.registerLabel(r.id))),h(Pe,H({as:"div",ref(i){var s=tt(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Kp(e){const t=Xn();return h(Y,{get when(){return t.contentPresent()},get children(){return h(ps,e)}})}var qp=at();function B_(){const e=nt(qp);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Hp(e){const n=In().generateId(`radiogroup-${At()}`),r=ke({id:n},e),[o,i]=ue(r,["value","defaultValue","onChange","disabled"]),[s,a]=li({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return h(qp.Provider,{value:u,get children(){return h(ac,i)}})}function jp(e){const t=B_(),n=ke({closeOnSelect:!1},e),[r,o]=ue(n,["value","onSelect"]);return h(sc,H({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function z_(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function U_(e,t){return t?Yg([e.clientX,e.clientY],t):!1}function Gp(e){const t=In(),n=vp(),r=Dp(),o=Rs(),i=Ap(),s=ke({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=ue(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[f,g]=$(),[p,b]=$(),[m,y]=$(),[v,x]=$(),[C,S]=$(!0),[k,A]=$(u.placement),[_,T]=$([]),[M,L]=$([]),{DomCollectionProvider:P}=l_({items:M,onItemsChange:L}),O=Eo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:te=>a.onOpenChange?.(te)}),{present:D}=Gn({show:()=>t.forceMount()||O.isOpen(),element:()=>v()??null}),I=t_({selectionMode:"none",dataSource:M}),N=te=>{S(te),O.open()},z=(te=!1)=>{O.close(),te&&r&&r.close(!0)},U=te=>{S(te),O.toggle()},K=()=>{const te=v();te&&(pt(te),I.selectionManager().setFocused(!0),I.selectionManager().setFocusedKey(void 0))},F=()=>{i!=null?setTimeout(()=>K()):K()},X=te=>{T(Oe=>[...Oe,te]);const xe=r?.registerNestedMenu(te);return()=>{T(Oe=>vu(Oe,te)),xe?.()}},j=te=>d===l?.side&&U_(te,l?.area),Q=te=>{j(te)&&te.preventDefault()},V=te=>{j(te)||F()},q=te=>{j(te)&&te.preventDefault()};rc({isDisabled:()=>!(r==null&&O.isOpen()&&t.isModal()),targets:()=>[v(),..._()].filter(Boolean)}),J(()=>{const te=v();if(!te||!r)return;const xe=r.registerNestedMenu(te);ne(()=>{xe()})}),J(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),..._()])}),J(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(m()?.focus(),o.autoFocusMenu()&&N(!0)):z())}),J(()=>{r!==void 0||o===void 0||O.isOpen()&&o.setValue(t.value())}),ne(()=>{r===void 0&&o?.unregisterMenu(t.value())});const he={dataset:ie(()=>({"data-expanded":O.isOpen()?"":void 0,"data-closed":O.isOpen()?void 0:""})),isOpen:O.isOpen,contentPresent:D,nestedMenus:_,currentPlacement:k,pointerGraceTimeoutId:()=>c,autoFocus:C,listState:()=>I,parentMenuContext:()=>r,triggerRef:m,contentRef:v,triggerId:f,contentId:p,setTriggerRef:y,setContentRef:x,open:N,close:z,toggle:U,focusContent:F,onItemEnter:Q,onItemLeave:V,onTriggerLeave:q,setPointerDir:te=>d=te,setPointerGraceTimeoutId:te=>c=te,setPointerGraceIntent:te=>l=te,registerNestedMenu:X,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:ft(g),registerContentId:ft(b)};return h(P,{get children(){return h(Tp.Provider,{value:he,get children(){return h(Y,{when:i===void 0,get fallback(){return u.children},get children(){return h(_o,H({anchorRef:m,contentRef:v,onCurrentPlacementChange:A},u))}})}})}})}function Vp(e){const{direction:t}=xr();return h(Gp,H({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var K_={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Wp(e){const t=Xn(),n=In(),[r,o]=ue(e,["onFocusOutside","onKeyDown"]),{direction:i}=xr();return h(Mp,H({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;xt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Te(l,r.onKeyDown);const d=xt(l.currentTarget,l.target),f=K_.close(i(),n.orientation()).includes(l.key),g=t.parentMenuContext()!=null;d&&f&&g&&(t.close(),pt(t.triggerRef()))}},o))}var Jl=["Enter"," "],q_={open:(e,t)=>e==="ltr"?[...Jl,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Jl,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Yp(e){let t;const n=In(),r=Xn(),o=ke({id:n.generateId(`sub-trigger-${At()}`)},e),[i,s]=ue(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=xr(),l=()=>i.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},f=()=>r.listState().collection(),g=()=>d().focusedKey()===l(),p=bp({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=x=>{Te(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},m=x=>{if(Te(x,i.onPointerMove),x.pointerType!=="mouse")return;const C=r.parentMenuContext();if(C?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){C?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),C?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),pt(x.currentTarget),C?.listState().selectionManager().setFocused(!0),C?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(Te(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const C=r.parentMenuContext(),S=r.contentRef();if(S){C?.setPointerGraceIntent({area:z_(r.currentPlacement(),x,S),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(C?.pointerGraceTimeoutId());const k=window.setTimeout(()=>{C?.setPointerGraceIntent(null)},300);C?.setPointerGraceTimeoutId(k)}else{if(C?.onTriggerLeave(x),x.defaultPrevented)return;C?.setPointerGraceIntent(null)}C?.onItemLeave(x)},v=x=>{Te(x,i.onKeyDown),!x.repeat&&(i.disabled||q_.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return J(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ne(x)}),J(dt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ne(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),J(()=>ne(r.registerTriggerId(i.id))),ne(()=>{u()}),h(Pe,H({as:"div",ref(x){var C=tt(S=>{r.setTriggerRef(S),t=S},i.ref);typeof C=="function"&&C(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return ae(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return g()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Ct([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return Ct([i.onPointerUp,p.onPointerUp])},get onClick(){return Ct([b,p.onClick])},get onKeyDown(){return Ct([v,p.onKeyDown])},get onMouseDown(){return Ct([i.onMouseDown,p.onMouseDown])},get onFocus(){return Ct([i.onFocus,p.onFocus])},onPointerMove:m,onPointerLeave:y},()=>r.dataset(),s))}function H_(e){const t=Rs(),n=`menu-${At()}`,r=ke({id:n,modal:!0},e),[o,i]=ue(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Eo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:cn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return h(Rp.Provider,{value:a,get children(){return h(Gp,H({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var j_={};On(j_,{Root:()=>Is,Separator:()=>Zp});function Is(e){let t;const n=ke({orientation:"horizontal"},e),[r,o]=ue(n,["ref","orientation"]),i=ks(()=>t,()=>"hr");return h(Pe,H({as:"hr",ref(s){var a=tt(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Zp=Is,G_={};On(G_,{Arrow:()=>jr,CheckboxItem:()=>Ip,Content:()=>Xp,DropdownMenu:()=>Dn,Group:()=>ac,GroupLabel:()=>$p,Icon:()=>Pp,Item:()=>Fp,ItemDescription:()=>Bp,ItemIndicator:()=>zp,ItemLabel:()=>Up,Portal:()=>Kp,RadioGroup:()=>Hp,RadioItem:()=>jp,Root:()=>Qp,Separator:()=>Is,Sub:()=>Vp,SubContent:()=>Wp,SubTrigger:()=>Yp,Trigger:()=>Np});function Xp(e){const t=In(),n=Xn(),[r,o]=ue(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return h(P_,H({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||pt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function Qp(e){const t=`dropdownmenu-${At()}`,n=ke({id:t},e);return h(H_,n)}var Dn=Object.assign(Qp,{Arrow:jr,CheckboxItem:Ip,Content:Xp,Group:ac,GroupLabel:$p,Icon:Pp,Item:Fp,ItemDescription:Bp,ItemIndicator:zp,ItemLabel:Up,Portal:Kp,RadioGroup:Hp,RadioItem:jp,Separator:Is,Sub:Vp,SubContent:Wp,SubTrigger:Yp,Trigger:Np});const uc=Dn.Trigger;Dn.Group;Dn.Sub;Dn.RadioGroup;const cc=e=>{const t=H({gutter:4,flip:!1},e);return h(Dn,t)},lc=e=>{const[t,n]=ue(e,["class"]);return h(Dn.Portal,{get children(){return h(Dn.Content,H({get class(){return ut("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Dr=e=>{const[t,n]=ue(e,["class","inset"]);return h(Dn.Item,H({get class(){return ut("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},Jp=e=>{const[t,n]=ue(e,["class"]);return h(Dn.Separator,H({get class(){return ut("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var V_={};On(V_,{CloseButton:()=>t0,Content:()=>n0,Description:()=>r0,Dialog:()=>jn,Overlay:()=>o0,Portal:()=>i0,Root:()=>s0,Title:()=>a0,Trigger:()=>u0,useDialogContext:()=>wr});var e0=at();function wr(){const e=nt(e0);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function t0(e){const t=wr(),[n,r]=ue(e,["aria-label","onClick"]);return h(Yn,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Te(i,n.onClick),t.close()}},r))}function n0(e){let t;const n=wr(),r=ke({id:n.generateId("content")},e),[o,i]=ue(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=f=>{o.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{o.onFocusOutside?.(f),n.modal()&&f.preventDefault()},l=f=>{o.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),xt(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{o.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),pt(n.triggerRef())):(f.defaultPrevented||(s||pt(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return rc({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),oc({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),nc({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),J(()=>ne(n.registerContentId(i.id))),h(Y,{get when(){return n.contentPresent()},get children(){return h(Os,H({ref(f){var g=tt(p=>{n.setContentRef(p),t=p},o.ref);typeof g=="function"&&g(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return ae(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function r0(e){const t=wr(),n=ke({id:t.generateId("description")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerDescriptionId(r.id))),h(Pe,H({as:"p",get id(){return r.id}},o))}function o0(e){const t=wr(),[n,r]=ue(e,["ref","style","onPointerDown"]),o=i=>{Te(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return h(Y,{get when(){return t.overlayPresent()},get children(){return h(Pe,H({as:"div",ref(i){var s=tt(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return un({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function i0(e){const t=wr();return h(Y,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return h(ps,e)}})}var ed={dismiss:"Dismiss"};function s0(e){const t=`dialog-${At()}`,n=ke({id:t,modal:!0,translations:ed},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,f]=$(),[g,p]=$(),b=Eo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:C=>n.onOpenChange?.(C)}),m=()=>n.forceMount||b.isOpen(),{present:y}=Gn({show:m,element:()=>c()??null}),{present:v}=Gn({show:m,element:()=>d()??null}),x={translations:()=>n.translations??ed,isOpen:b.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:g,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:f,overlayPresent:y,contentPresent:v,close:b.close,toggle:b.toggle,setTriggerRef:p,generateId:cn(()=>n.id),registerContentId:ft(o),registerTitleId:ft(s),registerDescriptionId:ft(u)};return h(e0.Provider,{value:x,get children(){return n.children}})}function a0(e){const t=wr(),n=ke({id:t.generateId("title")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerTitleId(r.id))),h(Pe,H({as:"h2",get id(){return r.id}},o))}function u0(e){const t=wr(),[n,r]=ue(e,["ref","onClick"]);return h(Yn,H({ref(i){var s=tt(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return ae(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Te(i,n.onClick),t.toggle()}},r))}var jn=Object.assign(s0,{CloseButton:t0,Content:n0,Description:r0,Overlay:o0,Portal:i0,Title:a0,Trigger:u0}),W_=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),c0=B("<div>");const on=jn;jn.Trigger;const $r=e=>{const[t,n]=ue(e,["class","children"]);return h(jn.Portal,{get children(){return[h(jn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),h(jn.Content,{get class(){return ut("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[ae(()=>t.children),h(jn.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return W_()}})]}})]}})},Pr=e=>{const[t,n]=ue(e,["class"]);return h(jn.Title,H({get class(){return ut("text-lg font-semibold text-foreground",t.class)}},n))},dc=e=>{const[t,n]=ue(e,["class"]);return h(jn.Description,H({get class(){return ut(" text-muted-foreground",t.class)}},n))},Fr=e=>{const[t,n]=ue(e,["class"]);return(()=>{var r=c0();return Vn(r,H({get class(){return ut("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Br=e=>{const[t,n]=ue(e,["class"]);return(()=>{var r=c0();return Vn(r,H({get class(){return ut("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var Y_={};On(Y_,{CloseButton:()=>d0,Description:()=>f0,List:()=>p0,ProgressFill:()=>h0,ProgressTrack:()=>m0,Region:()=>b0,Root:()=>y0,Title:()=>v0,Toast:()=>Or,toaster:()=>Jo,useToastContext:()=>di});var l0=at();function di(){const e=nt(l0);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function d0(e){const t=di(),[n,r]=ue(e,["aria-label","onClick"]);return h(Yn,H({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Te(i,n.onClick),t.close()}},r))}function f0(e){const t=di(),n=ke({id:t.generateId("description")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerDescriptionId(r.id))),h(Pe,H({as:"div",get id(){return r.id}},o))}var g0=at();function fc(){const e=nt(g0);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function p0(e){let t;const n=fc(),[r,o]=ue(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{Te(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{Te(c,r.onFocusOut),xt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{Te(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{Te(c,r.onPointerLeave),xt(t,Ut(t).activeElement)||n.resumeAllTimer()};return J(dt([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const d=Ut(c),f=g=>{l.every(b=>g[b]||g.code===b)&&pt(c)};d.addEventListener("keydown",f),ne(()=>d.removeEventListener("keydown",f))})),J(()=>{if(!n.pauseOnPageIdle())return;const c=qu(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),ne(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),h(Pe,H({as:"ol",ref(c){var l=tt(d=>t=d,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return h(lt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function h0(e){const t=fc(),n=di(),[r,o]=ue(e,["style"]),[i,s]=$(100);let a=0;return J(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});ne(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),h(Pe,H({as:"div",get style(){return un({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function m0(e){return h(Pe,H({as:"div","aria-hidden":"true",role:"presentation"},e))}var[gc,fi]=Nb({toasts:[]});function Z_(e){fi("toasts",t=>[...t,e])}function X_(e){return gc.toasts.find(t=>t.id===e)}function Q_(e,t){const n=gc.toasts.findIndex(r=>r.id===e);n!==-1&&fi("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function J_(e){fi("toasts",t=>t.id===e,"dismiss",!0)}function e2(e){fi("toasts",t=>t.filter(n=>n.id!==e))}function t2(){fi("toasts",[])}var zr={toasts:()=>gc.toasts,add:Z_,get:X_,update:Q_,dismiss:J_,remove:e2,clear:t2},td="{hotkey}",n2={close:"Close"},r2={notifications:e=>`Notifications (${e})`};function b0(e){const t=ke({id:`toast-region-${At()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:r2},e),[n,r]=ue(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ie(()=>zr.toasts().filter(f=>f.region===n.regionId&&f.dismiss===!1).slice(0,n.limit)),[i,s]=$(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(td)).replace(td,u()),l=()=>({[Zo]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:cn(()=>r.id)};return h(g0.Provider,{value:d,get children(){return h(Pe,H({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return un({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var o2="toast.swipeStart",i2="toast.swipeMove",s2="toast.swipeCancel",a2="toast.swipeEnd";function y0(e){const t=fc(),n=ke({id:`toast-${At()}`,priority:"high",translations:n2},e),[r,o]=ue(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=$(!0),[a,u]=$(),[c,l]=$(),[d,f]=$(!0),[g,p]=$(),{present:b}=Gn({show:i,element:()=>g()??null}),m=ie(()=>r.duration||t.duration());let y,v=0,x=m(),C=null,S=null;const k=()=>{s(!1),f(!0)},A=()=>{zr.remove(r.toastId)},_=N=>{!N||r.persistent||(window.clearTimeout(y),v=new Date().getTime(),y=window.setTimeout(k,N))},T=()=>{_(x),r.onResume?.()},M=()=>{const N=new Date().getTime()-v;x=x-N,window.clearTimeout(y),r.onPause?.()},L=N=>{Te(N,r.onKeyDown),N.key==="Escape"&&(r.onEscapeKeyDown?.(N),N.defaultPrevented||k())},P=N=>{Te(N,r.onPointerDown),N.button===0&&(C={x:N.clientX,y:N.clientY})},O=N=>{if(Te(N,r.onPointerMove),!C)return;const z=N.clientX-C.x,U=N.clientY-C.y,K=!!S,F=["left","right"].includes(t.swipeDirection()),X=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,j=F?X(0,z):0,Q=F?0:X(0,U),V=N.pointerType==="touch"?10:2,q={x:j,y:Q},ee={originalEvent:N,delta:q};if(K){S=q,Oi(i2,r.onSwipeMove,ee);const{x:he,y:te}=q;N.currentTarget.setAttribute("data-swipe","move"),N.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${he}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${te}px`)}else nd(q,t.swipeDirection(),V)?(S=q,Oi(o2,r.onSwipeStart,ee),N.currentTarget.setAttribute("data-swipe","start"),N.target.setPointerCapture(N.pointerId)):(Math.abs(z)>V||Math.abs(U)>V)&&(C=null)},D=N=>{Te(N,r.onPointerUp);const z=S,U=N.target;if(U.hasPointerCapture(N.pointerId)&&U.releasePointerCapture(N.pointerId),S=null,C=null,z){const K=N.currentTarget,F={originalEvent:N,delta:z};if(nd(z,t.swipeDirection(),t.swipeThreshold())){Oi(a2,r.onSwipeEnd,F);const{x:X,y:j}=z;N.currentTarget.setAttribute("data-swipe","end"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${X}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${j}px`),k()}else Oi(s2,r.onSwipeCancel,F),N.currentTarget.setAttribute("data-swipe","cancel"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");K.addEventListener("click",X=>X.preventDefault(),{once:!0})}};pn(()=>{t.toasts().find(N=>N.id===r.toastId&&N.update)&&f(!1)}),J(dt(()=>t.isPaused(),N=>{N?M():T()},{defer:!0})),J(dt([i,m],([N,z])=>{N&&!t.isPaused()&&_(z)})),J(dt(()=>zr.get(r.toastId)?.dismiss,N=>N&&k())),J(dt(()=>b(),N=>!N&&A()));const I={translations:()=>r.translations,close:k,duration:m,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>v,generateId:cn(()=>o.id),registerTitleId:ft(u),registerDescriptionId:ft(l)};return h(Y,{get when(){return b()},get children(){return h(l0.Provider,{value:I,get children(){return h(Pe,H({as:"li",ref(N){var z=tt(p,r.ref);typeof z=="function"&&z(N)},role:"status",tabIndex:0,get style(){return un({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:L,onPointerDown:P,onPointerMove:O,onPointerUp:D},o))}})}})}function nd(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function Oi(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function v0(e){const t=di(),n=ke({id:t.generateId("title")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerTitleId(r.id))),h(Pe,H({as:"div",get id(){return r.id}},o))}var u2=0;function x0(e,t){const n=u2++;return zr.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function Tu(e,t){zr.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function c2(e,t,n){const r=x0(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Ku(e)?e():e).then(o=>Tu(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Tu(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function l2(e){return zr.dismiss(e),e}function d2(){zr.clear()}var Jo={show:x0,update:Tu,promise:c2,dismiss:l2,clear:d2},Or=Object.assign(y0,{CloseButton:d0,Description:f0,List:p0,ProgressFill:h0,ProgressTrack:m0,Region:b0,Title:v0,toaster:Jo}),f2={};On(f2,{Arrow:()=>jr,Content:()=>_0,Portal:()=>E0,Root:()=>k0,Tooltip:()=>ei,Trigger:()=>C0,useTooltipContext:()=>Ns});var w0=at();function Ns(){const e=nt(w0);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function _0(e){const t=Ns(),n=ke({id:t.generateId("content")},e),[r,o]=ue(n,["ref","style"]);return J(()=>ne(t.registerContentId(o.id))),h(Y,{get when(){return t.contentPresent()},get children(){return h(_o.Positioner,{get children(){return h(Os,H({ref(i){var s=tt(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return un({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function E0(e){const t=Ns();return h(Y,{get when(){return t.contentPresent()},get children(){return h(ps,e)}})}function g2(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var Sr={},p2=0,Jr=!1,Bn,Oo,eo;function k0(e){const t=`tooltip-${At()}`,n=`${++p2}`,r=ke({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=ue(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=$(),[c,l]=$(),[d,f]=$(),[g,p]=$(i.placement),b=Eo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:D=>o.onOpenChange?.(D)}),{present:m}=Gn({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{Sr[n]=x},v=()=>{for(const D in Sr)D!==n&&(Sr[D](!0),delete Sr[D])},x=(D=!1)=>{D||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,b.close()):s||(s=window.setTimeout(()=>{s=void 0,b.close()},o.closeDelay)),window.clearTimeout(Bn),Bn=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(eo=window.setTimeout(()=>{window.clearTimeout(eo),eo=void 0},o.skipDelayDuration)),Jr&&(window.clearTimeout(Oo),Oo=window.setTimeout(()=>{delete Sr[n],Oo=void 0,Jr=!1},o.closeDelay))},C=()=>{clearTimeout(s),s=void 0,v(),y(),Jr=!0,b.open(),window.clearTimeout(Bn),Bn=void 0,window.clearTimeout(Oo),Oo=void 0,window.clearTimeout(eo),eo=void 0},S=()=>{v(),y(),!b.isOpen()&&!Bn&&!Jr?Bn=window.setTimeout(()=>{Bn=void 0,Jr=!0,C()},o.openDelay):b.isOpen()||C()},k=(D=!1)=>{!D&&o.openDelay&&o.openDelay>0&&!s&&!eo?S():C()},A=()=>{window.clearTimeout(Bn),Bn=void 0,Jr=!1},_=()=>{window.clearTimeout(s),s=void 0},T=D=>xt(c(),D)||xt(d(),D),M=D=>{const I=c(),N=d();if(!(!I||!N))return g2(D,I,N)},L=D=>{const I=D.target;if(T(I)){_();return}if(!o.ignoreSafeArea){const N=M(g());if(N&&Yg(kx(D),N)){_();return}}s||x()};J(()=>{if(!b.isOpen())return;const D=Ut();D.addEventListener("pointermove",L,!0),ne(()=>{D.removeEventListener("pointermove",L,!0)})}),J(()=>{const D=c();if(!D||!b.isOpen())return;const I=z=>{const U=z.target;xt(U,D)&&x(!0)},N=qu();N.addEventListener("scroll",I,{capture:!0}),ne(()=>{N.removeEventListener("scroll",I,{capture:!0})})}),ne(()=>{clearTimeout(s),Sr[n]&&delete Sr[n]});const O={dataset:ie(()=>({"data-expanded":b.isOpen()?"":void 0,"data-closed":b.isOpen()?void 0:""})),isOpen:b.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:m,openTooltip:k,hideTooltip:x,cancelOpening:A,generateId:cn(()=>r.id),registerContentId:ft(u),isTargetOnTooltip:T,setTriggerRef:l,setContentRef:f};return h(w0.Provider,{value:O,get children(){return h(_o,H({anchorRef:c,contentRef:d,onCurrentPlacementChange:D=>{p(D),o.onCurrentPlacementChange?.(D)}},i))}})}function C0(e){let t;const n=Ns(),[r,o]=ue(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},l=y=>{n.isOpen()&&!s&&!a&&n.hideTooltip(y)},d=y=>{Te(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},f=y=>{Te(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},g=y=>{Te(y,r.onPointerDown),i=!0,Ut(t).addEventListener("pointerup",u,{once:!0})},p=y=>{Te(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{Te(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},m=y=>{Te(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ne(()=>{Ut(t).removeEventListener("pointerup",u)}),h(Pe,H({as:"button",ref(y){var v=tt(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return ae(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:g,onClick:p,onFocus:b,onBlur:m},()=>n.dataset(),o))}var ei=Object.assign(k0,{Arrow:jr,Content:_0,Portal:E0,Trigger:C0}),S0=["id","name","validationState","required","disabled","readOnly"];function A0(e){const t=`form-control-${At()}`,n=ke({id:t},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),d=(b,m,y)=>{const v=y!=null||r()!=null;return[y,r(),v&&m!=null?b:void 0].filter(Boolean).join(" ")||void 0},f=b=>[a(),c(),b].filter(Boolean).join(" ")||void 0,g=ie(()=>({"data-valid":Z(n.validationState)==="valid"?"":void 0,"data-invalid":Z(n.validationState)==="invalid"?"":void 0,"data-required":Z(n.required)?"":void 0,"data-disabled":Z(n.disabled)?"":void 0,"data-readonly":Z(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>Z(n.name)??Z(n.id),dataset:g,validationState:()=>Z(n.validationState),isRequired:()=>Z(n.required),isDisabled:()=>Z(n.disabled),isReadOnly:()=>Z(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:cn(()=>Z(n.id)),registerLabel:ft(o),registerField:ft(s),registerDescription:ft(u),registerErrorMessage:ft(l)}}}var pc=at();function Qn(){const e=nt(pc);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function hc(e){const t=Qn(),n=ke({id:t.generateId("description")},e);return J(()=>ne(t.registerDescription(n.id))),h(Pe,H({as:"div"},()=>t.dataset(),n))}var h2=["id","aria-label","aria-labelledby","aria-describedby"];function m2(e){const t=Qn(),n=ke({id:t.generateId("field")},e);return J(()=>ne(t.registerField(Z(n.id)))),{fieldProps:{id:()=>Z(n.id),ariaLabel:()=>Z(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(Z(n.id),Z(n["aria-label"]),Z(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(Z(n["aria-describedby"]))}}}function T0(e){let t;const n=Qn(),r=ke({id:n.generateId("label")},e),[o,i]=ue(r,["ref"]),s=ks(()=>t,()=>"label");return J(()=>ne(n.registerLabel(i.id))),h(Pe,H({as:"label",ref(a){var u=tt(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return ae(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function D0(e,t){J(dt(e,n=>{if(n==null)return;const r=b2(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ne(()=>{r.removeEventListener("reset",t)}))}))}function b2(e){return y2(e)?e.form:e.closest("form")}function y2(e){return e.matches("textarea, input, select, button")}function mc(e){const t=Qn(),n=ke({id:t.generateId("error-message")},e),[r,o]=ue(n,["forceMount"]),i=()=>t.validationState()==="invalid";return J(()=>{i()&&ne(t.registerErrorMessage(o.id))}),h(Y,{get when(){return r.forceMount||i()},get children(){return h(Pe,H({as:"div"},()=>t.dataset(),o))}})}var v2={};On(v2,{Anchor:()=>R0,Arrow:()=>jr,CloseButton:()=>I0,Content:()=>N0,Description:()=>M0,Popover:()=>dr,Portal:()=>L0,Root:()=>$0,Title:()=>P0,Trigger:()=>F0,usePopoverContext:()=>_r});var O0=at();function _r(){const e=nt(O0);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function R0(e){const t=_r(),[n,r]=ue(e,["ref"]);return h(Pe,H({as:"div",ref(o){var i=tt(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function I0(e){const t=_r(),[n,r]=ue(e,["aria-label","onClick"]);return h(Yn,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Te(i,n.onClick),t.close()}},()=>t.dataset(),r))}function N0(e){let t;const n=_r(),r=ke({id:n.generateId("content")},e),[o,i]=ue(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=g=>{o.onCloseAutoFocus?.(g),n.isModal()?(g.preventDefault(),s||pt(n.triggerRef())):(g.defaultPrevented||(a||pt(n.triggerRef()),g.preventDefault()),a=!1,u=!1)},l=g=>{o.onPointerDownOutside?.(g),n.isModal()&&(s=g.detail.isContextMenu)},d=g=>{o.onFocusOutside?.(g),n.isOpen()&&n.isModal()&&g.preventDefault()},f=g=>{o.onInteractOutside?.(g),!n.isModal()&&(g.defaultPrevented||(a=!0,g.detail.originalEvent.type==="pointerdown"&&(u=!0)),xt(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&u&&g.preventDefault())};return rc({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),oc({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),nc({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),J(()=>ne(n.registerContentId(i.id))),h(Y,{get when(){return n.contentPresent()},get children(){return h(_o.Positioner,{get children(){return h(Os,H({ref(g){var p=tt(b=>{n.setContentRef(b),t=b},o.ref);typeof p=="function"&&p(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return ae(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return un({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function M0(e){const t=_r(),n=ke({id:t.generateId("description")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerDescriptionId(r.id))),h(Pe,H({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function L0(e){const t=_r();return h(Y,{get when(){return t.contentPresent()},get children(){return h(ps,e)}})}var rd={dismiss:"Dismiss"};function $0(e){const t=`popover-${At()}`,n=ke({id:t,modal:!1,translations:rd},e),[r,o]=ue(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,f]=$(),[g,p]=$(),[b,m]=$(),y=Eo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:k=>r.onOpenChange?.(k)}),v=()=>r.anchorRef?.()??i()??a(),{present:x}=Gn({show:()=>r.forceMount||y.isOpen(),element:()=>c()??null}),C=ie(()=>({"data-expanded":y.isOpen()?"":void 0,"data-closed":y.isOpen()?void 0:""})),S={translations:()=>r.translations??rd,dataset:C,isOpen:y.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??S.isModal(),contentPresent:x,triggerRef:a,contentId:d,titleId:g,descriptionId:b,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:y.close,toggle:y.toggle,generateId:cn(()=>r.id),registerContentId:ft(f),registerTitleId:ft(p),registerDescriptionId:ft(m)};return h(O0.Provider,{value:S,get children(){return h(_o,H({anchorRef:v,contentRef:c},o))}})}function P0(e){const t=_r(),n=ke({id:t.generateId("title")},e),[r,o]=ue(n,["id"]);return J(()=>ne(t.registerTitleId(r.id))),h(Pe,H({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function F0(e){const t=_r(),[n,r]=ue(e,["ref","onClick","onPointerDown"]);return h(Yn,H({ref(s){var a=tt(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return ae(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Te(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Te(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var dr=Object.assign($0,{Anchor:R0,Arrow:jr,CloseButton:I0,Content:N0,Description:M0,Portal:L0,Title:P0,Trigger:F0}),x2={};On(x2,{Description:()=>hc,ErrorMessage:()=>mc,Item:()=>U0,ItemControl:()=>K0,ItemDescription:()=>q0,ItemIndicator:()=>H0,ItemInput:()=>j0,ItemLabel:()=>G0,Label:()=>V0,RadioGroup:()=>bn,Root:()=>W0,useRadioGroupContext:()=>bc});var B0=at();function bc(){const e=nt(B0);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var z0=at();function gi(){const e=nt(z0);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function U0(e){const t=Qn(),n=bc(),r=`${t.generateId("item")}-${At()}`,o=ke({id:r},e),[i,s]=ue(o,["value","disabled","onPointerDown"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),[g,p]=$(),[b,m]=$(!1),y=ie(()=>n.isDefaultValue(i.value)),v=ie(()=>n.isSelectedValue(i.value)),x=ie(()=>i.disabled||t.isDisabled()||!1),C=A=>{Te(A,i.onPointerDown),b()&&A.preventDefault()},S=ie(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":v()?"":void 0})),k={value:()=>i.value,dataset:S,isDefault:y,isSelected:v,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:g,select:()=>n.setSelectedValue(i.value),generateId:cn(()=>s.id),registerInput:ft(u),registerLabel:ft(l),registerDescription:ft(f),setIsFocused:m,setInputRef:p};return h(z0.Provider,{value:k,get children(){return h(Pe,H({as:"div",role:"group",onPointerDown:C},S,s))}})}function K0(e){const t=gi(),n=ke({id:t.generateId("control")},e),[r,o]=ue(n,["onClick","onKeyDown"]);return h(Pe,H({as:"div",onClick:a=>{Te(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Te(a,r.onKeyDown),a.key===_s.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function q0(e){const t=gi(),n=ke({id:t.generateId("description")},e);return J(()=>ne(t.registerDescription(n.id))),h(Pe,H({as:"div"},()=>t.dataset(),n))}function H0(e){const t=gi(),n=ke({id:t.generateId("indicator")},e),[r,o]=ue(n,["ref","forceMount"]),[i,s]=$(),{present:a}=Gn({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return h(Y,{get when(){return a()},get children(){return h(Pe,H({as:"div",ref(u){var c=tt(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function j0(e){const t=Qn(),n=bc(),r=gi(),o=ke({id:r.generateId("input")},e),[i,s]=ue(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=$(!1),d=p=>{if(Te(p,i.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const b=p.target;b.checked=r.isSelected()}l(!1)},f=p=>{Te(p,i.onFocus),r.setIsFocused(!0)},g=p=>{Te(p,i.onBlur),r.setIsFocused(!1)};return J(dt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;l(!0);const b=r.inputRef();b?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),b?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),J(()=>ne(r.registerInput(s.id))),h(Pe,H({as:"input",ref(p){var b=tt(r.setInputRef,i.ref);typeof b=="function"&&b(p)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return un({...Vu},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:f,onBlur:g},()=>r.dataset(),s))}function G0(e){const t=gi(),n=ke({id:t.generateId("label")},e);return J(()=>ne(t.registerLabel(n.id))),h(Pe,H({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function V0(e){return h(T0,H({as:"span"},e))}function W0(e){let t;const n=`radiogroup-${At()}`,r=ke({id:n,orientation:"vertical"},e),[o,i,s]=ue(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],S0),[a,u]=li({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:m=>o.onChange?.(m)}),{formControlContext:c}=A0(i);D0(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(Z(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),f=m=>m===e.defaultValue,g=m=>m===a(),b={ariaDescribedBy:d,isDefaultValue:f,isSelectedValue:g,setSelectedValue:m=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(m),t))for(const y of t.querySelectorAll("[type='radio']")){const v=y;v.checked=g(v.value)}}};return h(pc.Provider,{value:c,get children(){return h(B0.Provider,{value:b,get children(){return h(Pe,H({as:"div",ref(m){var y=tt(v=>t=v,o.ref);typeof y=="function"&&y(m)},role:"radiogroup",get id(){return Z(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var bn=Object.assign(W0,{Description:hc,ErrorMessage:mc,Item:U0,ItemControl:K0,ItemDescription:q0,ItemIndicator:H0,ItemInput:j0,ItemLabel:G0,Label:V0}),w2={};On(w2,{Collapsible:()=>Ms,Content:()=>Z0,Root:()=>X0,Trigger:()=>Q0,useCollapsibleContext:()=>yc});var Y0=at();function yc(){const e=nt(Y0);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Z0(e){const[t,n]=$(),r=yc(),o=ke({id:r.generateId("content")},e),[i,s]=ue(o,["ref","id","style"]),{present:a}=Gn({show:r.shouldMount,element:()=>t()??null}),[u,c]=$(0),[l,d]=$(0);let g=r.isOpen()||a();return pn(()=>{const p=requestAnimationFrame(()=>{g=!1});ne(()=>{cancelAnimationFrame(p)})}),J(dt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),g||(t().style.transitionDuration="",t().style.animationName="")})),J(dt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),J(()=>ne(r.registerContentId(i.id))),h(Y,{get when(){return a()},get children(){return h(Pe,H({as:"div",ref(p){var b=tt(n,i.ref);typeof b=="function"&&b(p)},get id(){return i.id},get style(){return un({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function X0(e){const t=`collapsible-${At()}`,n=ke({id:t},e),[r,o]=ue(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=$(),a=Eo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ie(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:cn(()=>o.id),registerContentId:ft(s)};return h(Y0.Provider,{value:c,get children(){return h(Pe,H({as:"div"},u,o))}})}function Q0(e){const t=yc(),[n,r]=ue(e,["onClick"]);return h(Yn,H({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return ae(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Te(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Ms=Object.assign(X0,{Content:Z0,Trigger:Q0}),_2={};On(_2,{Checkbox:()=>fr,Control:()=>eh,Description:()=>th,ErrorMessage:()=>nh,Indicator:()=>rh,Input:()=>oh,Label:()=>ih,Root:()=>sh,useCheckboxContext:()=>Gr});var J0=at();function Gr(){const e=nt(J0);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function eh(e){const t=Qn(),n=Gr(),r=ke({id:n.generateId("control")},e),[o,i]=ue(r,["onClick","onKeyDown"]);return h(Pe,H({as:"div",onClick:u=>{Te(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Te(u,o.onKeyDown),u.key===_s.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function th(e){const t=Gr();return h(hc,H(()=>t.dataset(),e))}function nh(e){const t=Gr();return h(mc,H(()=>t.dataset(),e))}function rh(e){const t=Qn(),n=Gr(),[r,o]=$(),i=ke({id:n.generateId("indicator")},e),[s,a]=ue(i,["ref","forceMount"]),{present:u}=Gn({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return h(Y,{get when(){return u()},get children(){return h(Pe,H({as:"div",ref(c){var l=tt(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function oh(e){let t;const n=Qn(),r=Gr(),o=ke({id:r.generateId("input")},e),[i,s,a]=ue(o,["ref","style","onChange","onFocus","onBlur"],h2),{fieldProps:u}=m2(s),[c,l]=$(!1),d=p=>{if(Te(p,i.onChange),p.stopPropagation(),!c()){const b=p.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},f=p=>{Te(p,i.onFocus),r.setIsFocused(!0)},g=p=>{Te(p,i.onBlur),r.setIsFocused(!1)};return J(dt([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),J(dt([()=>t,()=>r.indeterminate(),()=>r.checked()],([p,b])=>{p&&(p.indeterminate=b)})),h(Pe,H({as:"input",ref(p){var b=tt(m=>{r.setInputRef(m),t=m},i.ref);typeof b=="function"&&b(p)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return un(Vu,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:f,onBlur:g},()=>n.dataset(),()=>r.dataset(),a))}function ih(e){const t=Gr();return h(T0,H(()=>t.dataset(),e))}function sh(e){let t;const n=`checkbox-${At()}`,r=ke({value:"on",id:n},e),[o,i,s]=ue(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],S0),[a,u]=$(),[c,l]=$(!1),{formControlContext:d}=A0(i),f=Sp({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:m=>o.onChange?.(m),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});D0(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const g=m=>{Te(m,o.onPointerDown),c()&&m.preventDefault()},p=ie(()=>({"data-checked":f.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),b={value:()=>o.value,dataset:p,checked:()=>f.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:cn(()=>Z(i.id)),toggle:()=>f.toggle(),setIsChecked:m=>f.setIsSelected(m),setIsFocused:l,setInputRef:u};return h(pc.Provider,{value:d,get children(){return h(J0.Provider,{value:b,get children(){return h(Pe,H({as:"div",ref(m){var y=tt(v=>t=v,o.ref);typeof y=="function"&&y(m)},role:"group",get id(){return Z(i.id)},onPointerDown:g},()=>d.dataset(),p,s,{get children(){return h(E2,{state:b,get children(){return o.children}})}}))}})}})}function E2(e){const t=ls(()=>{const n=e.children;return Ku(n)?n(e.state):n});return ae(t)}var fr=Object.assign(sh,{Control:eh,Description:th,ErrorMessage:nh,Indicator:rh,Input:oh,Label:ih}),k2=B("<div>"),C2=B("<div class=min-w-0>");const S2={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},A2={default:"border-border",success:"border-emerald-200 text-emerald-700 dark:border-emerald-900 dark:text-emerald-300",info:"border-sky-200 text-sky-700 dark:border-sky-900 dark:text-sky-300",warning:"border-amber-200 text-amber-700 dark:border-amber-900 dark:text-amber-300",error:"border-destructive/40 text-destructive",loading:"border-border"};function T2(e){switch(e.type){case"success":return h(U1,{class:"h-4 w-4"});case"info":return h(iy,{class:"h-4 w-4"});case"warning":case"error":return h(Gy,{class:"h-4 w-4"});case"loading":return h(qn,{class:"h-4 w-4 animate-spin"});default:return null}}function D2(e){return h(Or,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return ut("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=k2();return w(t,h(T2,{get type(){return e.type}})),pe(()=>Nt(t,ut("shrink-0 self-center",A2[e.type]))),t})(),(()=>{var t=C2();return w(t,h(Or.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),w(t,(()=>{var n=ae(()=>!!e.description);return()=>n()?h(Or.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),h(Or.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return E("common.close")},get children(){return h(Kr,{class:"h-4 w-4"})}})]}})}function to(e,t,n={}){return Jo.show(r=>h(D2,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const It=Object.assign((e,t)=>to("default",e,t),{success:(e,t)=>to("success",e,t),info:(e,t)=>to("info",e,t),warning:(e,t)=>to("warning",e,t),error:(e,t)=>to("error",e,t),loading:(e,t)=>to("loading",e,t),dismiss:e=>{if(typeof e=="number")return Jo.dismiss(e);Jo.clear()}}),O2=e=>{const[t,n]=ue(e,["position","duration","visibleToasts","class"]);return h(Or.Region,H({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return ut("fixed z-50 flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",S2[t.position??"bottom-right"],t.class)}},n,{get children(){return h(Or.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};var R2=B('<p class="m-0 text-destructive">'),I2=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),N2=B('<div class="flex items-center">'),M2=B('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),L2=B('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),$2=B('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const P2=e=>{const t=ai(),[n,{refetch:r}]=Gt(e.projectId,y=>y?Ce.listCommands(y):Promise.resolve([])),[o,i]=$(!1),[s,a]=$(""),[u,c]=$(""),[l,d]=$(!1),[f,g]=$(null);async function p(y){const v=e.projectId();if(v)try{const x=await Ce.runCommand(v,y.id);It.success(E("commands.started")),e.onRunStarted?.(),t(Ft(`commands/${encodeURIComponent(x.runId)}`))}catch(x){It.error(x.message)}}async function b(y){const v=e.projectId();if(v)try{await Ce.deleteCommand(v,y.id),await r()}catch(x){It.error(x.message)}}async function m(y){y.preventDefault();const v=e.projectId();if(!v)return;const x=s().trim(),C=u().trim();if(!(!x||!C)){d(!0),g(null);try{await Ce.createCommand(v,{name:x,cli:C}),a(""),c(""),i(!1),await r()}catch(S){g(S.message)}finally{d(!1)}}}return(()=>{var y=N2();return w(y,h(cc,{placement:"bottom-start",get children(){return[h(uc,{as:Ae,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return E("commands.menuTitle")},get children(){return h(zy,{class:"h-4 w-4"})}}),h(lc,{class:"min-w-56",get children(){return[h(Y,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var v=M2();return w(v,()=>E("commands.empty")),v})()},get children(){return h(lt,{get each(){return n()??[]},children:v=>h(Dr,{class:"group flex items-center justify-between gap-2",onSelect:()=>void p(v),get children(){return[(()=>{var x=L2(),C=x.firstChild,S=C.nextSibling;return w(C,()=>v.name),w(S,()=>v.cli),x})(),(()=>{var x=$2();return x.$$click=C=>{C.stopPropagation(),C.preventDefault(),b(v)},w(x,h(qy,{class:"h-3.5 w-3.5 text-destructive"})),pe(()=>je(x,"title",E("commands.deleteDef"))),x})()]}})})}}),h(Jp,{}),h(Dr,{onSelect:()=>i(!0),get children(){return[h(bs,{class:"mr-1 h-4 w-4"}),ae(()=>E("commands.add"))]}})]}})]}}),null),w(y,h(on,{get open(){return o()},onOpenChange:v=>{i(v),v||g(null)},get children(){return h($r,{class:"max-w-md",get children(){return[h(Fr,{get children(){return h(Pr,{get children(){return E("commands.addTitle")}})}}),(()=>{var v=I2(),x=v.firstChild,C=x.nextSibling;return v.addEventListener("submit",S=>void m(S)),w(x,()=>E("commands.name"),null),w(x,h(Nr,{id:"command-name",get value(){return s()},get placeholder(){return E("commands.namePlaceholder")},onInput:S=>a(S.currentTarget.value),get disabled(){return l()}}),null),w(C,()=>E("commands.cli"),null),w(C,h(Nr,{id:"command-cli",get value(){return u()},get placeholder(){return E("commands.cliPlaceholder")},onInput:S=>c(S.currentTarget.value),get disabled(){return l()}}),null),w(v,h(Y,{get when(){return f()},get children(){var S=R2();return w(S,f),S}}),null),w(v,h(Br,{get children(){return[h(Ae,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return E("common.cancel")}}),h(Ae,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return ae(()=>!!l())()?E("common.submitting"):E("commands.submit")}})]}}),null),v})()]}})}}),null),y})()};an(["click"]);var F2=B("<span>");const B2={running:"text-emerald-600 dark:text-emerald-400",exited:"text-muted-foreground",killed:"text-amber-600 dark:text-amber-400",failed:"text-rose-600 dark:text-rose-400"},ah=e=>(()=>{var t=F2();return w(t,()=>E(`commands.status.${e.status}`)),pe(()=>Nt(t,`shrink-0 text-xs font-medium ${B2[e.status]} ${e.class??""}`)),t})();var z2=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const U2=dr.Trigger;dr.Title;dr.Description;const K2=e=>{const t=H({gutter:4,flip:!1},e);return h(dr,t)},q2=e=>{const[t,n]=ue(e,["class","children"]);return h(dr.Portal,{get children(){return h(dr.Content,H({get class(){return ut("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[ae(()=>t.children),h(dr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return z2()}})]}}))}})};var H2=B('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),j2=B('<span class="truncate font-medium">'),G2=B('<span class="truncate font-mono text-xs text-muted-foreground">'),V2=B('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),W2=B('<p class="m-0 text-sm font-medium">'),Y2=B('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),Z2=B('<div class="flex justify-end">'),X2=B('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2">');function uh(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}const Q2=e=>{const[t,{refetch:n,mutate:r}]=Gt(e.projectId,l=>l?Ce.listCommandRuns(l):Promise.resolve([])),[o,i]=$(Date.now()),[s,a]=$(null),u=setInterval(()=>i(Date.now()),1e3);ne(()=>clearInterval(u)),J(()=>{e.revision?.(),n()}),J(()=>{const l=e.projectId();if(!l)return;const d=sv(l,f=>r(f));ne(d)});async function c(l){const d=e.projectId();if(d){a(l.runId);try{await Ce.clearCommandRun(d,l.runId),await n()}catch(f){It.error(f.message)}finally{a(null)}}}return h(Y,{get when(){return(t()??[]).length>0},get children(){var l=H2(),d=l.firstChild,f=d.nextSibling;return w(d,()=>E("commands.running")),w(f,h(lt,{get each(){return t()??[]},children:g=>(()=>{var p=X2();return w(p,h(Tn,{get href(){return Ft(`commands/${encodeURIComponent(g.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[h(ah,{get status(){return g.status}}),(()=>{var b=j2();return w(b,()=>g.name),b})(),(()=>{var b=G2();return w(b,()=>g.cli),b})(),(()=>{var b=V2();return w(b,()=>uh(g.startedAt,g.endedAt,o())),b})()]}}),null),w(p,h(K2,{get children(){return[h(U2,{as:Ae,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return E("commands.clear")},get children(){return h(Kr,{class:"h-4 w-4"})}}),h(q2,{class:"w-72",get children(){return[(()=>{var b=W2();return w(b,()=>E("commands.clearTitle")),b})(),(()=>{var b=Y2();return w(b,()=>E("commands.clearDescription")),b})(),(()=>{var b=Z2();return w(b,h(Ae,{variant:"destructive",size:"sm",get disabled(){return s()===g.runId},onClick:()=>void c(g),get children(){return ae(()=>s()===g.runId)()?E("common.deleting"):E("commands.clear")}})),b})()]}})]}}),null),p})()})),l}})};var J2=B('<span class=" text-muted-foreground">'),eE=B('<span class=" text-destructive">'),tE=B('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),nE=B('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),od=B('<p class=" text-destructive">'),rE=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),oE=B('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="m-0 text-xl">'),iE=B('<p class=" text-muted-foreground">'),sE=B('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),aE=B('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),uE=B('<h2 class="my-1.5 text-base font-semibold">'),cE=B('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),lE=B('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),dE=B('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),id=B("<span>."),fE=B("<span>");const gE={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},pE={feat:"text-emerald-600 dark:text-emerald-400",refct:"text-sky-600 dark:text-sky-400",fix:"text-rose-600 dark:text-rose-400"};function hE(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const mE=()=>{const e=ai(),t=vo(),[n,{refetch:r}]=Gt(t,O=>O?Ce.listSpecs(O):Promise.resolve([])),[o,{refetch:i}]=Gt(()=>Ce.listProjects()),s=ie(()=>(o()??[]).find(O=>O.id===t())),a=ie(()=>{const O=s();return O?.worktree?(o()??[]).some(D=>D.id===O.worktree.mainProjectId):!0}),u=ie(()=>{const O=s();return O?.worktree?`feat(${O.worktree.branch}): merge from worktree`:""}),[c,l]=$(!1),[d,f]=$(null),[g,p]=$(!1),[b,m]=$(""),[y,v]=$(null),[x,C]=$(0),[S,k]=$(!1),[A,_]=$(null);vs(()=>g()||y()!==null);let T=null;J(()=>{const O=t();T?.(),T=null,O&&(T=Sg(O,()=>{r()}))}),pn(()=>{const O=Ag(()=>{(async()=>{const D=s()?.worktree?.mainProjectId??null;await i();const I=t();!I||(o()??[]).some(z=>z.id===I)||D&&e(`/${encodeURIComponent(D)}`)})()});ne(O)}),ne(()=>{T?.(),T=null});function M(){s()?.worktree&&a()&&(m(u()),f(null),p(!0))}async function L(){const O=s();if(!O?.worktree||!a())return;const D=b().trim()||u();l(!0),f(null);try{const I=await Ce.mergeWorktreeToMain(O.id,{commitMessage:D});p(!1),I.status==="merged"?(It.success(E("home.merged")),await i(),e(`/${encodeURIComponent(I.mainProjectId)}`)):(It.info(E("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(I.mainProjectId)}/specs/${encodeURIComponent(I.conflictSpecId)}`))}catch(I){f(I.message)}finally{l(!1)}}async function P(O){const D=t();if(D){k(!0),_(null);try{await Ce.deleteSpec(D,O),v(null),await r()}catch(I){_(I.message)}finally{k(!1)}}}return(()=>{var O=oE(),D=O.firstChild,I=D.firstChild,N=I.firstChild;return w(N,()=>E("home.specList")),w(I,h(P2,{projectId:t,onRunStarted:()=>C(z=>z+1)}),null),w(D,h(Cs,{}),null),w(O,h(Q2,{projectId:t,revision:x}),null),w(O,h(Y,{get when(){return s()?.worktree},get children(){var z=tE(),U=z.firstChild,K=U.firstChild;return w(K,()=>E("home.mainProject"),null),w(K,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(z,h(Ae,{variant:"default",size:"sm",onClick:M,get disabled(){return c()||!a()},get title(){return ae(()=>!!a())()?E("home.mergeHint"):E("home.mainUnreachable")},get children(){return[h(ny,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>ae(()=>!!c())()?E("home.merging"):E("home.mergeToMain"))]}}),null),w(z,h(Y,{get when(){return!a()},get children(){var F=J2();return w(F,()=>E("home.mainUnreachable")),F}}),null),w(z,h(Y,{get when(){return d()},get children(){var F=eE();return w(F,d),F}}),null),z}}),null),w(O,h(fs,{get fallback(){return(()=>{var z=iE();return w(z,()=>E("common.loading")),z})()},get children(){return h(Y,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var z=sE(),U=z.firstChild;return w(U,()=>E("home.noSpecs")),w(z,h(Ae,{as:Tn,get href(){return Ft("specs/new")},variant:"default",size:"sm",get children(){return[h(bs,{class:"mr-1 h-4 w-4"}),ae(()=>E("home.createFirst"))]}}),null),z})()},get children(){var z=nE();return w(z,h(lt,{get each(){return n()??[]},children:U=>{const K=hE(U.id);return(()=>{var F=dE(),X=F.firstChild;return w(F,h(Tn,{get href(){return Ft(`specs/${encodeURIComponent(U.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var j=aE(),Q=j.firstChild;return w(j,h(Qg,{get class(){return`border-transparent ${gE[U.stage]??"bg-muted"} text-white uppercase`},get children(){return U.stage}}),Q),w(Q,()=>Tg(U.updated_at)),j})(),(()=>{var j=uE();return w(j,()=>U.title||E("common.pendingAgent")),j})(),(()=>{var j=cE();return w(j,()=>U.summary||E("common.pendingAgent")),j})(),(()=>{var j=lE();return w(j,h(Y,{when:K,get fallback(){return U.id},children:Q=>[(()=>{var V=id(),q=V.firstChild;return w(V,()=>Q().prefix,q),V})(),(()=>{var V=fE();return w(V,()=>Q().type),pe(()=>Nt(V,`font-semibold ${pE[Q().type]??"text-foreground"}`)),V})(),(()=>{var V=id();return V.firstChild,w(V,()=>Q().suffix,null),V})()]})),j})()]}}),X),w(X,h(cc,{placement:"bottom-end",get children(){return[h(uc,{as:Ae,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return E("home.moreActions")},get children(){return h(Z1,{class:"h-4 w-4"})}}),h(lc,{get children(){return h(Dr,{class:"text-destructive focus:text-destructive",onSelect:()=>v(U.id),get children(){return E("common.delete")}})}})]}})),F})()}})),z}})}}),null),w(O,h(on,{get open(){return g()},onOpenChange:z=>{p(z),z||f(null)},get children(){return h($r,{class:"max-w-md",get children(){return[h(Fr,{get children(){return[h(Pr,{get children(){return E("home.mergeDialogTitle")}}),h(dc,{get children(){return E("home.mergeDialogDescription")}})]}}),(()=>{var z=rE(),U=z.firstChild;return z.addEventListener("submit",K=>{K.preventDefault(),L()}),w(U,()=>E("home.mergeCommitMessage"),null),w(U,h(Nr,{id:"merge-commit-message",get value(){return b()},onInput:K=>m(K.currentTarget.value),get disabled(){return c()}}),null),w(z,h(Y,{get when(){return d()},get children(){var K=od();return w(K,d),K}}),null),w(z,h(Br,{get children(){return[h(Ae,{type:"button",variant:"outline",onClick:()=>p(!1),get disabled(){return c()},get children(){return E("common.cancel")}}),h(Ae,{type:"submit",get disabled(){return c()||!a()},get children(){return ae(()=>!!c())()?E("home.merging"):E("home.mergeToMain")}})]}}),null),z})()]}})}}),null),w(O,h(on,{get open(){return y()!==null},onOpenChange:z=>{z||(v(null),_(null))},get children(){return h($r,{class:"max-w-sm",get children(){return[h(Fr,{get children(){return h(Pr,{get children(){return E("home.confirmDeleteSpec")}})}}),h(Y,{get when(){return A()},get children(){var z=od();return w(z,A),z}}),h(Br,{get children(){return[h(Ae,{variant:"outline",onClick:()=>v(null),get disabled(){return S()},get children(){return E("common.cancel")}}),h(Ae,{variant:"destructive",onClick:()=>y()&&void P(y()),get disabled(){return S()},get children(){return ae(()=>!!S())()?E("common.deleting"):E("common.confirmDelete")}})]}})]}})}}),null),O})()},ch="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",bE=5*1024*1024,fo=10,yE=new Set(["application/pdf","text/plain","text/markdown"]);function vE(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":null}function xE(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function sd(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function wE(){return Math.random().toString(36).slice(2,8)}function lh(e){const[t,n]=$([]),[r,o]=$(null),[i,s]=$(null),[a,u]=$(null),[c,l]=$(""),d=ie(()=>t().length),f=ie(()=>t().some(M=>M.status==="pending")),g=ie(()=>t().some(M=>M.status==="failed"));ne(()=>{for(const M of t())M.previewUrl&&URL.revokeObjectURL(M.previewUrl)});async function p(){const M=r();if(M)return M;const{draftId:L}=await Ce.createDraft(e.projectId());return o(L),L}function b(M){n(L=>[...L,M])}function m(M,L){n(P=>P.map(O=>O.id===M?{...O,...L}:O))}function y(M){n(L=>{const P=[];for(const O of L){if(O.id===M){O.previewUrl&&URL.revokeObjectURL(O.previewUrl);continue}P.push(O)}return P})}async function v(M){s(null);const L=t(),P=fo-L.length;if(P<=0){s(E("newSpec.attachmentLimit",{max:fo}));return}const O=[];for(const D of M.slice(0,P)){const I=xE(D),N=vE(I);if(!N){s(E("newSpec.unsupportedType",{name:I.name}));continue}if(N!=="image"&&!yE.has(I.type)){s(E("newSpec.unsupportedMime",{mime:I.type||"(unknown)"}));continue}if(I.size>bE){s(E("newSpec.fileTooLarge",{name:I.name}));continue}const z=`att-${Date.now()}-${wE()}`,U=N==="image"?URL.createObjectURL(I):void 0;O.push({id:z,file:I,name:I.name,kind:N,previewUrl:U,status:"pending"})}if(O.length!==0){M.length>P&&s(E("newSpec.attachmentRoomLimit",{room:P,current:L.length,max:fo}));for(const D of O)b(D);try{const D=await p();for(const I of O)try{const N=await Ce.uploadAttachment(e.projectId(),D,I.file);m(I.id,{storedName:N.storedName,name:N.storedName,status:"uploaded"})}catch(N){m(I.id,{status:"failed",error:N.message})}}catch(D){s(D.message);for(const I of O)m(I.id,{status:"failed",error:D.message})}}}async function x(M){const L=M.currentTarget;if(!L.files)return;const P=Array.from(L.files);L.value="",await v(P)}async function C(M){const L=M.clipboardData?.items;if(!L)return;const P=[];for(const O of Array.from(L))if(O.kind==="file"&&O.type.startsWith("image/")){const D=O.getAsFile();D&&P.push(D)}P.length!==0&&(M.preventDefault(),await v(P))}async function S(M){const L=t().find(P=>P.id===M);if(L){if(L.storedName&&r())try{await Ce.deleteAttachment(e.projectId(),r(),L.storedName)}catch(P){s(P.message)}y(M)}}function k(M){l(sd(M.name)),u(M.id)}async function A(M){const L=c().trim();if(u(null),!(!L||!M.storedName||!r())&&L!==sd(M.name))try{const P=await Ce.renameAttachment(e.projectId(),r(),M.storedName,L);m(M.id,{storedName:P.storedName,name:P.storedName})}catch(P){s(P.message)}}function _(){u(null)}function T(){const M=wt(t);for(const L of M)L.previewUrl&&URL.revokeObjectURL(L.previewUrl);M.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:f,hasFailed:g,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:v,onFileInputChange:x,onPaste:C,removeAttachment:S,beginRename:k,commitRename:A,cancelRename:_,reset:T}}var _E=B("<textarea>");const ho=e=>{const[t,n]=ue(e,["class"]);return(()=>{var r=_E();return Vn(r,H({get class(){return ut("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var EE=B('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),kE=B('<div class="relative w-full">'),CE=B("<li><button type=button>");const SE=150,AE=150,TE=2,DE=10,ad=1.5,dh=e=>{const[t,n]=$(!1),[r,o]=$([]),[i,s]=$(0);let a,u=[],c=-1,l="",d=null,f=null;const g=()=>e.autosize!==!1,p=()=>e.minRows??TE,b=()=>e.maxRows??DE;ne(()=>{d&&clearTimeout(d),f&&clearTimeout(f)});function m(){if(!a||!g())return;const A=getComputedStyle(a),_=parseFloat(A.fontSize)||14,T=A.lineHeight==="normal"?_*ad:parseFloat(A.lineHeight)||_*ad,M=parseFloat(A.paddingTop)+parseFloat(A.paddingBottom)+parseFloat(A.borderTopWidth)+parseFloat(A.borderBottomWidth),L=T*p()+M,P=T*b()+M;a.style.height="auto";const O=Math.min(Math.max(a.scrollHeight,L),P);a.style.height=`${O}px`,a.style.overflowY=a.scrollHeight>P?"auto":"hidden"}pn(m),J(dt(()=>e.value,m));function y(){n(!1),o([]),s(0),c=-1,l="",u=[],d&&(clearTimeout(d),d=null)}function v(A){d&&clearTimeout(d),d=setTimeout(async()=>{const _=e.projectId;if(_)try{const T=await Ce.listFiles(_,A);u=[],o(T.items),s(0)}catch{o([])}},SE)}function x(A){const _=A.selectionStart,T=A.value.slice(0,_),M=T.lastIndexOf("@");if(M===-1){y();return}if(M>0&&!/\s/.test(T[M-1])){y();return}const L=T.slice(M+1);if(!/^[\w./@-]*$/.test(L)){y();return}c=M,l=L,t()||n(!0),v(L)}function C(A){const _=e.value,T=_.slice(0,c),M=_.slice(c+1+l.length),L=`@${A}`;e.onValueChange(T+L+M),y();const P=T.length+L.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(P,P),m())})}function S(){u[i()]?.scrollIntoView({block:"nearest"})}function k(A){const _=r();if(t()&&_.length>0){if(A.key==="ArrowDown"){A.preventDefault(),s(T=>(T+1)%_.length),requestAnimationFrame(S);return}if(A.key==="ArrowUp"){A.preventDefault(),s(T=>(T-1+_.length)%_.length),requestAnimationFrame(S);return}if(A.key==="Enter"||A.key==="Tab"){if(!A.isComposing){A.preventDefault(),C(_[i()]);return}}else if(A.key==="Escape"){A.preventDefault(),y();return}}e.onKeyDown?.(A)}return(()=>{var A=kE();return w(A,h(ho,{ref(_){var T=a;typeof T=="function"?T(_):a=_},get rows(){return e.rows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return ut(g()&&"resize-none",e.class)},onInput:_=>{e.onValueChange(_.currentTarget.value),x(_.currentTarget),m()},onKeyDown:k,onPaste:_=>e.onPaste?.(_),onBlur:()=>{f&&clearTimeout(f),f=setTimeout(y,AE)}}),null),w(A,h(Y,{get when(){return ae(()=>!!t())()&&r().length>0},get children(){var _=EE();return w(_,h(lt,{get each(){return r()},children:(T,M)=>(()=>{var L=CE(),P=L.firstChild;return pr(O=>u[M()]=O,L),P.$$mousedown=O=>{O.preventDefault(),C(T)},P.addEventListener("mouseenter",()=>s(M())),je(P,"title",T),w(P,T),pe(()=>Nt(P,ut("block w-full overflow-hidden text-ellipsis whitespace-nowrap border-0 px-3 py-1.5 text-left text-sm",i()===M()?"bg-primary text-primary-foreground":"bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"))),L})()})),_}}),null),A})()};an(["mousedown"]);const OE=ei.Trigger,RE=e=>{const t=H({gutter:4,flip:!1},e);return h(ei,t)},IE=e=>{const[t,n]=ue(e,["class"]);return h(ei.Portal,{get children(){return h(ei.Content,H({get class(){return ut("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var NE=B('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const ME=e=>h(on,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return h(on.Portal,{get children(){return[h(on.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),h(on.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[h(Y,{get when(){return e.src},get children(){var t=NE();return pe(n=>{var r=e.src,o=e.alt;return r!==n.e&&je(t,"src",n.e=r),o!==n.t&&je(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),h(on.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return h(Kr,{class:"h-4 w-4"})}})]}})]}})}});var LE=B('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),fh=B('<img class="h-full w-full object-cover">'),$E=B('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),PE=B('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),FE=B('<span class="text-xs font-bold text-muted-foreground">'),BE=B('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),zE=B('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),UE=B('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),KE=B('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function qE(e){return e.status==="pending"?`${e.name} · ${E("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${E("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const gh=e=>{const t=e.ctrl,[n,r]=$(),[o,i]=$(),[s,a]=$(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return h(Y,{get when(){return e.compact},get fallback(){return h(HE,e)},get children(){return[(()=>{var c=LE();return w(c,h(lt,{get each(){return t.attachments()},children:l=>(()=>{var d=PE(),f=d.firstChild;return w(d,h(RE,{openDelay:150,closeDelay:0,get children(){return[h(OE,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[h(Y,{get when(){return ae(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var g=FE();return w(g,()=>l.kind==="pdf"?"PDF":"TXT"),g})()},get children(){var g=fh();return pe(p=>{var b=l.previewUrl,m=l.name;return b!==p.e&&je(g,"src",p.e=b),m!==p.t&&je(g,"alt",p.t=m),p},{e:void 0,t:void 0}),g}}),h(Y,{get when(){return l.status==="pending"},get children(){var g=$E();return w(g,h(qn,{class:"h-4 w-4 animate-spin text-muted-foreground"})),g}})]}}),h(IE,{get children(){return qE(l)}})]}}),f),f.$$click=()=>void t.removeAttachment(l.id),w(f,h(Kr,{class:"h-3 w-3"})),pe(g=>{var p=e.busy,b=E("newSpec.deleteAttachment",{name:l.name});return p!==g.e&&(f.disabled=g.e=p),b!==g.t&&je(f,"aria-label",g.t=b),g},{e:void 0,t:void 0}),d})()})),c})(),h(ME,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},HE=e=>{const t=e.ctrl;return(()=>{var n=BE();return w(n,h(lt,{get each(){return t.attachments()},children:r=>(()=>{var o=zE(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,h(Y,{get when(){return ae(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=UE();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=fh();return pe(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&je(u,"src",c.e=l),d!==c.t&&je(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,h(Y,{get when(){return ae(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=KE();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),pe(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?E("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&je(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return h(Nr,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,h(Y,{get when(){return r.status==="pending"},get children(){return[h(qn,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),ae(()=>E("newSpec.uploading"))]}}),null),w(a,h(Y,{get when(){return r.status==="failed"},get children(){return E("newSpec.uploadFailed",{error:r.error})}}),null),w(a,h(Y,{get when(){return r.status==="uploaded"},get children(){return[ae(()=>Math.round(r.file.size/1024))," KB · ",ae(()=>r.kind)]}}),null),w(o,h(Ae,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return E("newSpec.deleteAttachment",{name:r.name})},get children(){return h(Kr,{class:"h-3.5 w-3.5"})}}),null),pe(()=>Nt(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};an(["click"]);var jE=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const ns=fr.Label,rs=fr;fr.ErrorMessage;fr.Description;const os=e=>{const[t,n]=ue(e,["class","children"]);return[h(fr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),h(fr.Control,H({get class(){return ut("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return h(fr.Indicator,{class:"flex items-center justify-center text-current",get children(){return jE()}})}}))]};var GE=B('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),VE=B('<span class="truncate font-medium text-foreground">');const Ls=e=>(()=>{var t=GE();return w(t,h(lt,{get each(){return e.items},children:(n,r)=>[h(Y,{get when(){return r()>0},get children(){return h(M1,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),h(Y,{get when(){return n.href},get fallback(){return(()=>{var o=VE();return w(o,()=>n.label),o})()},get children(){return h(Tn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var WE=B('<span class="text-sm text-muted-foreground">'),YE=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),ZE=B('<label><input type=radio name=type class=hidden><strong class=" "></strong><span class="text-sm text-muted-foreground">'),XE=B('<p class=" text-destructive">'),QE=B('<p class=" text-muted-foreground">');const JE=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],ek=()=>{const e=ai(),t=vo(),[n,r]=$(""),[o,i]=$("feat"),[s,a]=$("idle"),[u,c]=$(!1),l=()=>s()==="creating",d=lh({projectId:t}),f=d.error,g=d.setError;let p=null,b=null,m=new Set,y="",v=!1,x;ne(()=>{p?.(),b?.()});async function C(){if(v)return;const k=y||t();try{const _=(await Ce.listSpecs(k)).find(T=>!m.has(T.id));if(_){v=!0,p?.(),p=null,b?.(),b=null;const T=k?`/${k}/specs/${encodeURIComponent(_.id)}`:Ft(`specs/${encodeURIComponent(_.id)}`);e(T)}}catch{}}async function S(k){if(k.preventDefault(),s()==="creating")return;g(null);const A=n().trim();if(A.length<5){g(E("newSpec.descTooShort"));return}const _=d.attachments().filter(T=>T.status==="failed");if(_.length>0){g(E("newSpec.attachmentFailedCount",{count:_.length}));return}if(d.hasPending()){g(E("newSpec.attachmentUploading"));return}a("creating"),v=!1;try{const T=t();let M=T;if(u()){const I=tk(A);M=(await Ce.createWorktree(T,{specSlug:I})).id}y=M;const L=await Ce.listSpecs(M);m=new Set(L.map(I=>I.id));const P={type:o(),requirement:A},O=d.draftId();O&&(P.draftId=O);const D=await Ce.createSpec(M,P);"draft"in D&&D.draft?(so(D.sessionId),b=ws(M,D.sessionId,{onEvent:I=>{I.type==="error"&&(a("failed"),g(I.message||E("newSpec.agentRunFailed")),b?.(),b=null)}}),p=Sg(M,()=>{C()}),C()):"id"in D&&e(`/${M}/specs/${encodeURIComponent(D.id)}`)}catch(T){g(T.message),a("failed")}}return(()=>{var k=YE(),A=k.firstChild,_=A.nextSibling,T=_.nextSibling,M=T.firstChild,L=M.firstChild,P=M.nextSibling,O=P.firstChild,D=P.nextSibling,I=D.firstChild,N=I.firstChild,z=N.nextSibling,U=z.nextSibling;w(A,h(Ls,{get items(){return[{label:E("breadcrumb.specList"),href:Ft("")},{label:E("breadcrumb.newSpec")}]}})),w(_,()=>E("newSpec.description")),T.addEventListener("submit",S),w(L,()=>E("newSpec.type")),w(M,()=>JE.map(F=>(()=>{var X=ZE(),j=X.firstChild,Q=j.nextSibling,V=Q.nextSibling;return j.addEventListener("change",()=>i(F.value)),w(Q,()=>E(F.labelKey)),w(V,()=>E(F.hintKey)),pe(q=>{var ee=`flex min-h-[44px] flex-1 cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===F.value?"border-primary bg-primary/10":"border-border bg-background"}`,he=l();return ee!==q.e&&Nt(X,q.e=ee),he!==q.t&&(j.disabled=q.t=he),q},{e:void 0,t:void 0}),pe(()=>j.value=F.value),pe(()=>j.checked=o()===F.value),X})()),null),w(T,h(rs,{get checked(){return u()},onChange:F=>c(F),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[h(os,{}),h(ns,{class:"cursor-pointer font-medium",get children(){return E("newSpec.parallelWorktree")}}),(()=>{var F=WE();return w(F,()=>E("newSpec.parallelWorktreeDesc")),F})()]}}),P),w(O,()=>E("newSpec.requirement")),w(P,h(dh,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return E("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Hi(D,"paste",d.onPaste),w(N,()=>E("newSpec.attachments")),w(z,()=>E("newSpec.attachmentsHint",{count:d.count(),max:fo})),w(I,h(Ae,{variant:"outline",size:"sm",type:"button",onClick:()=>x?.click(),get disabled(){return l()||d.count()>=fo},get children(){return[h(Yy,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>E("newSpec.importAttachment"))]}}),U),Hi(U,"change",d.onFileInputChange);var K=x;return typeof K=="function"?pr(K,U):x=U,je(U,"accept",ch),w(D,h(Y,{get when(){return d.count()>0},get children(){return h(gh,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(T,(()=>{var F=ae(()=>!!f());return()=>F()&&(()=>{var X=XE();return w(X,f),X})()})(),null),w(T,h(Ae,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[ae(()=>ae(()=>!!l())()?h(qn,{class:"mr-1 h-4 w-4 animate-spin"}):h(ys,{class:"mr-1 h-4 w-4"})),ae(()=>ae(()=>!!l())()?E("newSpec.creating"):E("newSpec.createAndStart"))]}}),null),w(T,(()=>{var F=ae(()=>!!l());return()=>F()&&(()=>{var X=QE();return w(X,()=>E("newSpec.creatingHint")),X})()})(),null),pe(()=>M.disabled=l()),k})()};function tk(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}var ud=11;function nk(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===ud||e.nodeType===ud)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var Ri,rk="http://www.w3.org/1999/xhtml",zt=typeof document>"u"?void 0:document,ok=!!zt&&"content"in zt.createElement("template"),ik=!!zt&&zt.createRange&&"createContextualFragment"in zt.createRange();function sk(e){var t=zt.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function ak(e){Ri||(Ri=zt.createRange(),Ri.selectNode(zt.body));var t=Ri.createContextualFragment(e);return t.childNodes[0]}function uk(e){var t=zt.createElement("body");return t.innerHTML=e,t.childNodes[0]}function ck(e){return e=e.trim(),ok?sk(e):ik?ak(e):uk(e)}function Ii(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function lk(e,t){return!t||t===rk?zt.createElement(e):zt.createElementNS(t,e)}function dk(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function ia(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var cd={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}ia(e,t,"selected")},INPUT:function(e,t){ia(e,t,"checked"),ia(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},Ro=1,ld=11,dd=3,fd=8;function sr(){}function fk(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function gk(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=zt.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=zt.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=ck(r);else r.nodeType===ld&&(r=r.firstElementChild);var u=o.getNodeKey||fk,c=o.onBeforeNodeAdded||sr,l=o.onNodeAdded||sr,d=o.onBeforeElUpdated||sr,f=o.onElUpdated||sr,g=o.onBeforeNodeDiscarded||sr,p=o.onNodeDiscarded||sr,b=o.onBeforeElChildrenUpdated||sr,m=o.skipFromChildren||sr,y=o.addChild||function(K,F){return K.appendChild(F)},v=o.childrenOnly===!0,x=Object.create(null),C=[];function S(K){C.push(K)}function k(K,F){if(K.nodeType===Ro)for(var X=K.firstChild;X;){var j=void 0;F&&(j=u(X))?S(j):(p(X),X.firstChild&&k(X,F)),X=X.nextSibling}}function A(K,F,X){g(K)!==!1&&(F&&F.removeChild(K),p(K),k(K,X))}function _(K){if(K.nodeType===Ro||K.nodeType===ld)for(var F=K.firstChild;F;){var X=u(F);X&&(x[X]=F),_(F),F=F.nextSibling}}_(n);function T(K){l(K);for(var F=K.firstChild;F;){var X=F.nextSibling,j=u(F);if(j){var Q=x[j];Q&&Ii(F,Q)?(F.parentNode.replaceChild(Q,F),L(Q,F)):T(F)}else T(F);F=X}}function M(K,F,X){for(;F;){var j=F.nextSibling;(X=u(F))?S(X):A(F,K,!0),F=j}}function L(K,F,X){var j=u(F);if(j&&delete x[j],!X){var Q=d(K,F);if(Q===!1||(Q instanceof HTMLElement&&(K=Q,_(K)),e(K,F),f(K),b(K,F)===!1))return}K.nodeName!=="TEXTAREA"?P(K,F):cd.TEXTAREA(K,F)}function P(K,F){var X=m(K,F),j=F.firstChild,Q=K.firstChild,V,q,ee,he,te;e:for(;j;){for(he=j.nextSibling,V=u(j);!X&&Q;){if(ee=Q.nextSibling,j.isSameNode&&j.isSameNode(Q)){j=he,Q=ee;continue e}q=u(Q);var xe=Q.nodeType,Oe=void 0;if(xe===j.nodeType&&(xe===Ro?(V?V!==q&&((te=x[V])?ee===te?Oe=!1:(K.insertBefore(te,Q),q?S(q):A(Q,K,!0),Q=te,q=u(Q)):Oe=!1):q&&(Oe=!1),Oe=Oe!==!1&&Ii(Q,j),Oe&&L(Q,j)):(xe===dd||xe==fd)&&(Oe=!0,Q.nodeValue!==j.nodeValue&&(Q.nodeValue=j.nodeValue))),Oe){j=he,Q=ee;continue e}q?S(q):A(Q,K,!0),Q=ee}if(V&&(te=x[V])&&Ii(te,j))X||y(K,te),L(te,j);else{var Fe=c(j);Fe!==!1&&(Fe&&(j=Fe),j.actualize&&(j=j.actualize(K.ownerDocument||zt)),y(K,j),T(j))}j=he,Q=ee}M(K,Q,q);var ze=cd[K.nodeName];ze&&ze(K,F)}var O=n,D=O.nodeType,I=r.nodeType;if(!v){if(D===Ro)I===Ro?Ii(n,r)||(p(n),O=dk(n,lk(r.nodeName,r.namespaceURI))):O=r;else if(D===dd||D===fd){if(I===D)return O.nodeValue!==r.nodeValue&&(O.nodeValue=r.nodeValue),O;O=r}}if(O===r)p(n);else{if(r.isSameNode&&r.isSameNode(O))return;if(L(O,r,v),C)for(var N=0,z=C.length;N<z;N++){var U=x[C[N]];U&&A(U,U.parentNode,!1)}}return!v&&O!==n&&n.parentNode&&(O.actualize&&(O=O.actualize(n.ownerDocument||zt)),n.parentNode.replaceChild(O,n)),O}}var pk=gk(nk);const gd={};function hk(e){let t=gd[e];if(t)return t;t=gd[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function mo(e,t){typeof t!="string"&&(t=mo.defaultChars);const n=hk(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let d=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}mo.defaultChars=";/?:@&=+$,#";mo.componentChars="";const pd={};function mk(e){let t=pd[e];if(t)return t;t=pd[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function pi(e,t,n){typeof t!="string"&&(n=t,t=pi.defaultChars),typeof n>"u"&&(n=!0);const r=mk(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}pi.defaultChars=";/?:@&=+$,-_.!~*'()#";pi.componentChars="-_.!~*'()";function vc(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function is(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const bk=/^([a-z0-9.+-]+:)/i,yk=/:[0-9]*$/,vk=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xk=["<",">",'"',"`"," ","\r",`
|
|
7
|
+
`," "],wk=["{","}","|","\\","^","`"].concat(xk),_k=["'"].concat(wk),hd=["%","/","?",";","#"].concat(_k),md=["/","?","#"],Ek=255,bd=/^[+a-z0-9A-Z_-]{0,63}$/,kk=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yd={javascript:!0,"javascript:":!0},vd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function xc(e,t){if(e&&e instanceof is)return e;const n=new is;return n.parse(e,t),n}is.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=vk.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=bk.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&yd[s])&&(i=i.substr(2),this.slashes=!0)),!yd[s]&&(o||s&&!vd[s])){let c=-1;for(let p=0;p<md.length;p++)r=i.indexOf(md[p]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let p=0;p<hd.length;p++)r=i.indexOf(hd[p]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const f=i.slice(0,c);i=i.slice(c),this.parseHost(f),this.hostname=this.hostname||"";const g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){const p=this.hostname.split(/\./);for(let b=0,m=p.length;b<m;b++){const y=p[b];if(y&&!y.match(bd)){let v="";for(let x=0,C=y.length;x<C;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(bd)){const x=p.slice(0,b),C=p.slice(b+1),S=y.match(kk);S&&(x.push(S[1]),C.unshift(S[2])),C.length&&(i=C.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>Ek&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),vd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};is.prototype.parseHost=function(e){let t=yk.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Ck=Object.freeze(Object.defineProperty({__proto__:null,decode:mo,encode:pi,format:vc,parse:xc},Symbol.toStringTag,{value:"Module"})),ph=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,hh=/[\0-\x1F\x7F-\x9F]/,Sk=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,wc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,mh=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,bh=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ak=Object.freeze(Object.defineProperty({__proto__:null,Any:ph,Cc:hh,Cf:Sk,P:wc,S:mh,Z:bh},Symbol.toStringTag,{value:"Module"})),Tk=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))),Dk=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var sa;const Ok=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]]),Rk=(sa=String.fromCodePoint)!==null&&sa!==void 0?sa:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Ik(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ok.get(e))!==null&&t!==void 0?t:e}var St;(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"})(St||(St={}));const Nk=32;var cr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(cr||(cr={}));function Du(e){return e>=St.ZERO&&e<=St.NINE}function Mk(e){return e>=St.UPPER_A&&e<=St.UPPER_F||e>=St.LOWER_A&&e<=St.LOWER_F}function Lk(e){return e>=St.UPPER_A&&e<=St.UPPER_Z||e>=St.LOWER_A&&e<=St.LOWER_Z||Du(e)}function $k(e){return e===St.EQUALS||Lk(e)}var Et;(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"})(Et||(Et={}));var Kn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Kn||(Kn={}));class Pk{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Et.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Kn.Strict}startEntity(t){this.decodeMode=t,this.state=Et.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Et.EntityStart:return t.charCodeAt(n)===St.NUM?(this.state=Et.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Et.NamedEntity,this.stateNamedEntity(t,n));case Et.NumericStart:return this.stateNumericStart(t,n);case Et.NumericDecimal:return this.stateNumericDecimal(t,n);case Et.NumericHex:return this.stateNumericHex(t,n);case Et.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Nk)===St.LOWER_X?(this.state=Et.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Et.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Du(o)||Mk(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Du(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===St.SEMI)this.consumed+=1;else if(this.decodeMode===Kn.Strict)return 0;return this.emitCodePoint(Ik(this.result),this.consumed),this.errors&&(t!==St.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&cr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Fk(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Kn.Attribute&&(i===0||$k(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&cr.VALUE_LENGTH)>>14,i!==0){if(s===St.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Kn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&cr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~cr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Et.NamedEntity:return this.result!==0&&(this.decodeMode!==Kn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Et.NumericDecimal:return this.emitNumericEntity(0,2);case Et.NumericHex:return this.emitNumericEntity(0,3);case Et.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Et.EntityStart:return 0}}}function yh(e){let t="";const n=new Pk(e,r=>t+=Rk(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function Fk(e,t,n,r){const o=(t&cr.BRANCH_LENGTH)>>7,i=t&cr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const vh=yh(Tk);yh(Dk);function Bk(e,t=Kn.Legacy){return vh(e,t)}function zk(e){return vh(e,Kn.Strict)}function Uk(e){return Object.prototype.toString.call(e)}function _c(e){return Uk(e)==="[object String]"}const Kk=Object.prototype.hasOwnProperty;function qk(e,t){return Kk.call(e,t)}function $s(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function xh(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Ec(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ti(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const wh=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Hk=/&([a-z#][a-z0-9]{1,31});/gi,jk=new RegExp(wh.source+"|"+Hk.source,"gi"),Gk=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Vk(e,t){if(t.charCodeAt(0)===35&&Gk.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Ec(r)?ti(r):e}const n=Bk(e);return n!==e?n:e}function Wk(e){return e.indexOf("\\")<0?e:e.replace(wh,"$1")}function bo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(jk,function(t,n,r){return n||Vk(t,r)})}const Yk=/[&<>"]/,Zk=/[&<>"]/g,Xk={"&":"&","<":"<",">":">",'"':"""};function Qk(e){return Xk[e]}function yr(e){return Yk.test(e)?e.replace(Zk,Qk):e}const Jk=/[.?*+^$[\]\\(){}|-]/g;function eC(e){return e.replace(Jk,"\\$&")}function st(e){switch(e){case 9:case 32:return!0}return!1}function ni(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function _h(e){return wc.test(e)||mh.test(e)}function ri(e){return _h(ti(e))}function oi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ps(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function xd(e){return e===32||e===9||e===10||e===13}function Fs(e){let t=0;for(;t<e.length&&xd(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&xd(e.charCodeAt(n));n--);return e.slice(t,n+1)}const tC={mdurl:Ck,ucmicro:Ak},nC=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:xh,asciiTrim:Fs,assign:$s,escapeHtml:yr,escapeRE:eC,fromCodePoint:ti,has:qk,isMdAsciiPunct:oi,isPunctChar:_h,isPunctCharCode:ri,isSpace:st,isString:_c,isValidEntityCode:Ec,isWhiteSpace:ni,lib:tC,normalizeReference:Ps,unescapeAll:bo,unescapeMd:Wk},Symbol.toStringTag,{value:"Module"}));function rC(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function oC(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=bo(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=bo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function iC(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=bo(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=bo(e.slice(t,i)),s}const sC=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:oC,parseLinkLabel:rC,parseLinkTitle:iC},Symbol.toStringTag,{value:"Module"})),Nn={};Nn.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+yr(i.content)+"</code>"};Nn.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+yr(e[t].content)+`</code></pre>
|
|
8
|
+
`};Nn.fence=function(e,t,n,r,o){const i=e[t],s=i.info?bo(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||yr(i.content):c=yr(i.content),c.indexOf("<pre")===0)return c+`
|
|
9
|
+
`;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const f={attrs:d};return`<pre><code${o.renderAttrs(f)}>${c}</code></pre>
|
|
10
|
+
`}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
|
|
11
|
+
`};Nn.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};Nn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
12
|
+
`:`<br>
|
|
13
|
+
`};Nn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
14
|
+
`:`<br>
|
|
15
|
+
`:`
|
|
16
|
+
`};Nn.text=function(e,t){return yr(e[t].content)};Nn.html_block=function(e,t){return e[t].content};Nn.html_inline=function(e,t){return e[t].content};function ko(){this.rules=$s({},Nn)}ko.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+yr(t.attrs[n][0])+'="'+yr(t.attrs[n][1])+'"';return o};ko.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
|
|
17
|
+
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
18
|
+
`:">",i};ko.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};ko.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
19
|
+
`;break}return r};ko.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function Vt(){this.__rules__=[],this.__cache__=null}Vt.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Vt.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};Vt.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};Vt.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Vt.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Vt.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Vt.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};Vt.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Vt.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};Vt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function yn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}yn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};yn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};yn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};yn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};yn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function Eh(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Eh.prototype.Token=yn;const aC=/\r\n?|\n/g,uC=/\0/g;function cC(e){let t;t=e.src.replace(aC,`
|
|
20
|
+
`),t=t.replace(uC,"�"),e.src=t}function lC(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function dC(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function fC(e){return/^<a[>\s]/i.test(e)}function gC(e){return/^<\/a\s*>/i.test(e)}function pC(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(fC(a.content)&&i>0&&i--,gC(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,f=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let g=0;g<c.length;g++){const p=c[g].url,b=e.md.normalizeLink(p);if(!e.md.validateLink(b))continue;let m=c[g].text;c[g].schema?c[g].schema==="mailto:"&&!/^mailto:/i.test(m)?m=e.md.normalizeLinkText("mailto:"+m).replace(/^mailto:/,""):m=e.md.normalizeLinkText(m):m=e.md.normalizeLinkText("http://"+m).replace(/^http:\/\//,"");const y=c[g].index;if(y>f){const S=new e.Token("text","",0);S.content=u.slice(f,y),S.level=d,l.push(S)}const v=new e.Token("link_open","a",1);v.attrs=[["href",b]],v.level=d++,v.markup="linkify",v.info="auto",l.push(v);const x=new e.Token("text","",0);x.content=m,x.level=d,l.push(x);const C=new e.Token("link_close","a",-1);C.level=--d,C.markup="linkify",C.info="auto",l.push(C),f=c[g].lastIndex}if(f<u.length){const g=new e.Token("text","",0);g.content=u.slice(f),g.level=d,l.push(g)}t[n].children=o=xh(o,s,l)}}}}const kh=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,hC=/\((c|tm|r)\)/i,mC=/\((c|tm|r)\)/ig,bC={c:"©",r:"®",tm:"™"};function yC(e,t){return bC[t.toLowerCase()]}function vC(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(mC,yC)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function xC(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&kh.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function wC(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(hC.test(e.tokens[t].content)&&vC(e.tokens[t].children),kh.test(e.tokens[t].content)&&xC(e.tokens[t].children))}const _C=/['"]/,wd=/['"]/g,_d="’";function Ni(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function EC(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function kC(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){wd.lastIndex=c;const d=wd.exec(u);if(!d)break;let f=!0,g=!0;c=d.index+1;const p=d[0]==="'";let b=32;if(d.index-1>=0)b=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){b=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(c<l)m=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}const y=oi(b)||ri(b),v=oi(m)||ri(m),x=ni(b),C=ni(m);if(C?f=!1:v&&(x||y||(f=!1)),x?g=!1:y&&(C||v||(g=!1)),m===34&&d[0]==='"'&&b>=48&&b<=57&&(g=f=!1),f&&g&&(f=y,g=v),!f&&!g){p&&Ni(o,i,d.index,_d);continue}if(g)for(n=r.length-1;n>=0;n--){let S=r[n];if(r[n].level<a)break;if(S.single===p&&r[n].level===a){S=r[n];let k,A;p?(k=t.md.options.quotes[2],A=t.md.options.quotes[3]):(k=t.md.options.quotes[0],A=t.md.options.quotes[1]),Ni(o,i,d.index,A),Ni(o,S.token,S.pos,k),r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:p,level:a}):g&&p&&Ni(o,i,d.index,_d)}}Object.keys(o).forEach(function(i){e[i].content=EC(e[i].content,o[i])})}function CC(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!_C.test(e.tokens[t].content)||kC(e.tokens[t].children,e)}function SC(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const aa=[["normalize",cC],["block",lC],["inline",dC],["linkify",pC],["replacements",wC],["smartquotes",CC],["text_join",SC]];function kc(){this.ruler=new Vt;for(let e=0;e<aa.length;e++)this.ruler.push(aa[e][0],aa[e][1])}kc.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};kc.prototype.State=Eh;function Mn(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const d=o.charCodeAt(s);if(!l)if(st(d)){a++,d===9?u+=4-u%4:u++;continue}else l=!0;(d===10||s===c-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Mn.prototype.push=function(e,t,n){const r=new yn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Mn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Mn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Mn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!st(r))break}return t};Mn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!st(this.src.charCodeAt(--t)))return t+1;return t};Mn.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};Mn.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Mn.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const f=this.src.charCodeAt(l);if(st(f))f===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};Mn.prototype.Token=yn;const AC=65536;function ua(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Ed(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function TC(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!st(a)||s===45&&st(a))return!1;for(;i<e.eMarks[o];){const C=e.src.charCodeAt(i);if(C!==124&&C!==45&&C!==58&&!st(C))return!1;i++}let u=ua(e,t+1),c=u.split("|");const l=[];for(let C=0;C<c.length;C++){const S=c[C].trim();if(!S){if(C===0||C===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(S))return!1;S.charCodeAt(S.length-1)===58?l.push(S.charCodeAt(0)===58?"center":"right"):S.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=ua(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Ed(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const g=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),b=[t,0];p.map=b;const m=e.push("thead_open","thead",1);m.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let C=0;C<c.length;C++){const S=e.push("th_open","th",1);l[C]&&(S.attrs=[["style","text-align:"+l[C]]]);const k=e.push("inline","",0);k.content=c[C].trim(),k.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let C=!1;for(let k=0,A=g.length;k<A;k++)if(g[k](e,o,n,!0)){C=!0;break}if(C||(u=ua(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Ed(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>AC))break;if(o===t+2){const k=e.push("tbody_open","tbody",1);k.map=v=[t+2,0]}const S=e.push("tr_open","tr",1);S.map=[o,o+1];for(let k=0;k<d;k++){const A=e.push("td_open","td",1);l[k]&&(A.attrs=[["style","text-align:"+l[k]]]);const _=e.push("inline","",0);_.content=c[k]?c[k].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=o),e.push("table_close","table",-1),b[1]=o,e.parentType=f,e.line=o,!0}function DC(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
21
|
+
`,i.map=[t,e.line],!0}function OC(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){f=!0;break}u=e.sCount[t],e.line=d+(f?1:0);const g=e.push("fence","code",0);return g.info=l,g.content=e.getLines(t+1,d,u,!0),g.markup=c,g.map=[t,e.line],!0}function RC(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let g=!1,p;for(p=t;p<n;p++){const x=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let S=e.sCount[p]+1,k,A;e.src.charCodeAt(o)===32?(o++,S++,A=!1,k=!0):e.src.charCodeAt(o)===9?(k=!0,(e.bsCount[p]+S)%4===3?(o++,S++,A=!1):A=!0):k=!1;let _=S;for(a.push(e.bMarks[p]),e.bMarks[p]=o;o<i;){const T=e.src.charCodeAt(o);if(st(T))T===9?_+=4-(_+e.bsCount[p]+(A?1:0))%4:_++;else break;o++}g=o>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(k?1:0),c.push(e.sCount[p]),e.sCount[p]=_-S,l.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(g)break;let C=!1;for(let S=0,k=d.length;S<k;S++)if(d[S](e,p,n,!0)){C=!0;break}if(C){e.lineMax=p,e.blkIndent!==0&&(a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const b=e.blkIndent;e.blkIndent=0;const m=e.push("blockquote_open","blockquote",1);m.markup=">";const y=[t,0];m.map=y,e.md.block.tokenize(e,t,p);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,y[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=b,!0}function IC(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!st(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function kd(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!st(i))return-1}return r}function Cd(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!st(i))?-1:o}function NC(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function MC(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,f,g;if((g=Cd(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],f=Number(e.src.slice(s,g-1)),l&&f!==1)return!1}else if((g=kd(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(g)>=e.eMarks[u])return!1;if(r)return!0;const p=e.src.charCodeAt(g-1),b=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);const m=[u,0];a.map=m,a.markup=String.fromCharCode(p);let y=!1;const v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=g,o=e.eMarks[u];const C=e.sCount[u]+g-(e.bMarks[u]+e.tShift[u]);let S=C;for(;i<o;){const I=e.src.charCodeAt(i);if(I===9)S+=4-(S+e.bsCount[u])%4;else if(I===32)S++;else break;i++}const k=i;let A;k>=o?A=1:A=S-C,A>4&&(A=1);const _=C+A;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const T=[u,0];a.map=T,d&&(a.info=e.src.slice(s,g-1));const M=e.tight,L=e.tShift[u],P=e.sCount[u],O=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[u]=k-e.bMarks[u],e.sCount[u]=S,k>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=O,e.tShift[u]=L,e.sCount[u]=P,e.tight=M,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),u=e.line,T[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let D=!1;for(let I=0,N=v.length;I<N;I++)if(v[I](e,u,n,!0)){D=!0;break}if(D)break;if(d){if(g=Cd(e,u),g<0)break;s=e.bMarks[u]+e.tShift[u]}else if(g=kd(e,u),g<0)break;if(p!==e.src.charCodeAt(g-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),m[1]=u,e.line=u,e.parentType=x,c&&NC(e,b),!0}function LC(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(v){const x=e.lineMax;if(v>=x||e.isEmpty(v))return null;let C=!1;if(e.sCount[v]-e.blkIndent>3&&(C=!0),e.sCount[v]<0&&(C=!0),!C){const A=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let T=!1;for(let M=0,L=A.length;M<L;M++)if(A[M](e,v,x,!0)){T=!0;break}if(e.parentType=_,T)return null}const S=e.bMarks[v]+e.tShift[v],k=e.eMarks[v];return e.src.slice(S,k+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const v=u.charCodeAt(o);if(v===91)return!1;if(v===93){c=o;break}else if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(v===92&&(o++,o<i&&u.charCodeAt(o)===10)){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!st(v))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const f=o,g=s,p=o;for(;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!st(v))break}let b=e.md.helpers.parseLinkTitle(u,o,i);for(;b.can_continue;){const v=a(s);if(v===null)break;u+=v,o=i,i=u.length,s++,b=e.md.helpers.parseLinkTitle(u,o,i,b)}let m;for(o<i&&p!==o&&b.ok?(m=b.str,o=b.pos):(m="",o=f,s=g);o<i;){const v=u.charCodeAt(o);if(!st(v))break;o++}if(o<i&&u.charCodeAt(o)!==10&&m)for(m="",o=f,s=g;o<i;){const v=u.charCodeAt(o);if(!st(v))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=Ps(u.slice(1,c));return y?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:m,href:d}),e.line=s),!0):!1}const $C=["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"],PC="[a-zA-Z_:][a-zA-Z0-9:._-]*",FC="[^\"'=<>`\\x00-\\x20]+",BC="'[^']*'",zC='"[^"]*"',UC="(?:"+FC+"|"+BC+"|"+zC+")",KC="(?:\\s+"+PC+"(?:\\s*=\\s*"+UC+")?)",Ch="<[A-Za-z][A-Za-z0-9\\-]*"+KC+"*\\s*\\/?>",Sh="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",qC="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",HC="<[?][\\s\\S]*?[?]>",jC="<![A-Za-z][^>]*>",GC="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",VC=new RegExp("^(?:"+Ch+"|"+Sh+"|"+qC+"|"+HC+"|"+jC+"|"+GC+")"),WC=new RegExp("^(?:"+Ch+"|"+Sh+")"),Ar=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+$C.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(WC.source+"\\s*$"),/^$/,!1]];function YC(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<Ar.length&&!Ar[a][0].test(s);a++);if(a===Ar.length)return!1;if(r)return Ar[a][2];let u=t+1;const c=Ar[a][1].test("");if(!Ar[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),Ar[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function ZC(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!st(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&st(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Fs(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function XC(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let g=e.bMarks[a]+e.tShift[a];const p=e.eMarks[a];if(g<p&&(s=e.src.charCodeAt(g),(s===45||s===61)&&(g=e.skipChars(g,s),g=e.skipSpaces(g),g>=p))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let g=0,p=r.length;g<p;g++)if(r[g](e,a,n,!0)){f=!0;break}if(f)break}if(!i)return e.parentType=o,!1;const u=Fs(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function QC(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Fs(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const Mi=[["table",TC,["paragraph","reference"]],["code",DC],["fence",OC,["paragraph","reference","blockquote","list"]],["blockquote",RC,["paragraph","reference","blockquote","list"]],["hr",IC,["paragraph","reference","blockquote","list"]],["list",MC,["paragraph","reference","blockquote"]],["reference",LC],["html_block",YC,["paragraph","reference","blockquote"]],["heading",ZC,["paragraph","reference","blockquote"]],["lheading",XC],["paragraph",QC]];function Bs(){this.ruler=new Vt;for(let e=0;e<Mi.length;e++)this.ruler.push(Mi[e][0],Mi[e][1],{alt:(Mi[e][2]||[]).slice()})}Bs.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Bs.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};Bs.prototype.State=Mn;function hi(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}hi.prototype.pushPending=function(){const e=new yn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};hi.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new yn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};hi.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const m=this.src.charCodeAt(e-2);o=(m&64512)===55296?65536+(m-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const m=this.src.charCodeAt(i+1);a=(m&64512)===56320?65536+(a-55296<<10)+(m-56320):65533}else(a&64512)===56320&&(a=65533);const u=oi(o)||ri(o),c=oi(a)||ri(a),l=ni(o),d=ni(a),f=!d&&(!c||l||u),g=!l&&(!u||d||c);return{can_open:f&&(t||!g||u),can_close:g&&(t||!f||c),length:s}};hi.prototype.Token=yn;function JC(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function eS(e,t){let n=e.pos;for(;n<e.posMax&&!JC(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const tS=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function nS(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(tS);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=a.length-i.length,!0}function rS(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&st(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Cc=[];for(let e=0;e<256;e++)Cc.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Cc[e.charCodeAt(0)]=1});function oS(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!st(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&Cc[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function iS(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function sS(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Sd(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function aS(e){const t=e.tokens_meta,n=e.tokens_meta.length;Sd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Sd(e,t[r].delimiters)}const Ah={tokenize:sS,postProcess:aS};function uS(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Ad(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function cS(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ad(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ad(e,t[r].delimiters)}const Th={tokenize:uS,postProcess:cS};function lS(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,f=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let p=g+1;if(p<d&&e.src.charCodeAt(p)===40){for(c=!1,p++;p<d&&(n=e.src.charCodeAt(p),!(!st(n)&&n!==10));p++);if(p>=d)return!1;if(u=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?p=o.pos:s="",u=p;p<d&&(n=e.src.charCodeAt(p),!(!st(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&u!==p&&o.ok)for(a=o.str,p=o.pos;p<d&&(n=e.src.charCodeAt(p),!(!st(n)&&n!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=g+1):p=g+1,r||(r=e.src.slice(f,g)),i=e.env.references[Ps(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=g;const b=e.push("link_open","a",1),m=[["href",s]];b.attrs=m,a&&m.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function dS(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const g=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<f&&e.src.charCodeAt(i)===40){for(i++;i<f&&(n=e.src.charCodeAt(i),!(!st(n)&&n!==10));i++);if(i>=f)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<f&&(n=e.src.charCodeAt(i),!(!st(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<f&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<f&&(n=e.src.charCodeAt(i),!(!st(n)&&n!==10));i++);else u="";if(i>=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<f&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=p+1):i=p+1,o||(o=e.src.slice(g,p)),s=e.env.references[Ps(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(g,p);const b=[];e.md.inline.parse(r,e.md,e.env,b);const m=e.push("image","img",0),y=[["src",l],["alt",""]];m.attrs=y,m.children=b,m.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=f,!0}const fS=/^([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])?)*)$/,gS=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function pS(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(gS.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(fS.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function hS(e){return/^<a[>\s]/i.test(e)}function mS(e){return/^<\/a\s*>/i.test(e)}function bS(e){const t=e|32;return t>=97&&t<=122}function yS(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!bS(o))return!1;const i=e.src.slice(r).match(VC);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],hS(s.content)&&e.linkLevel++,mS(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const vS=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,xS=/^&([a-z][a-z0-9]{1,31});/i;function wS(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(vS);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=Ec(s)?ti(s):ti(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(xS);if(i){const s=zk(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function Td(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){const g=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+g,i[c]=g,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function _S(e){const t=e.tokens_meta,n=e.tokens_meta.length;Td(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Td(t[r].delimiters)}function ES(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const ca=[["text",eS],["linkify",nS],["newline",rS],["escape",oS],["backticks",iS],["strikethrough",Ah.tokenize],["emphasis",Th.tokenize],["link",lS],["image",dS],["autolink",pS],["html_inline",yS],["entity",wS]],la=[["balance_pairs",_S],["strikethrough",Ah.postProcess],["emphasis",Th.postProcess],["fragments_join",ES]];function mi(){this.ruler=new Vt;for(let e=0;e<ca.length;e++)this.ruler.push(ca[e][0],ca[e][1]);this.ruler2=new Vt;for(let e=0;e<la.length;e++)this.ruler2.push(la[e][0],la[e][1])}mi.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};mi.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};mi.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};mi.prototype.State=hi;function kS(e){const t={};e=e||{},t.src_Any=ph.source,t.src_Cc=hh.source,t.src_Z=bh.source,t.src_P=wc.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Ou(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function zs(e){return Object.prototype.toString.call(e)}function CS(e){return zs(e)==="[object String]"}function SS(e){return zs(e)==="[object Object]"}function AS(e){return zs(e)==="[object RegExp]"}function Dd(e){return zs(e)==="[object Function]"}function TS(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Dh={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function DS(e){return Object.keys(e||{}).reduce(function(t,n){return t||Dh.hasOwnProperty(n)},!1)}const OS={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},RS="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",IS="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function NS(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Od(){return function(e,t){t.normalize(e)}}function ss(e){const t=e.re=kS(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(RS),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,SS(u)){AS(u.validate)?c.validate=NS(u.validate):Dd(u.validate)?c.validate=u.validate:i(a,u),Dd(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=Od();return}if(CS(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:Od()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(TS).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Oh(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function Jt(e,t){if(!(this instanceof Jt))return new Jt(e,t);t||DS(e)&&(t=e,e={}),this.__opts__=Ou({},Dh,t),this.__schemas__=Ou({},OS,e),this.__compiled__={},this.__tlds__=IS,this.__tlds_replaced__=!1,this.re={},ss(this)}Jt.prototype.add=function(t,n){return this.__schemas__[t]=n,ss(this),this};Jt.prototype.set=function(t){return this.__opts__=Ou(this.__opts__,t),this};Jt.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Jt.prototype.pretest=function(t){return this.re.pretest.test(t)};Jt.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Jt.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(f,g){return f?g?f.index!==g.index?f.index<g.index?f:g:f.lastIndex>=g.lastIndex?f:g:f:g}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const f=[r[l[0]],i[l[1]],o[l[2]]],g=c(c(f[0],f[1]),f[2]);if(!g)break;if(g===f[0]?l[0]++:g===f[1]?l[1]++:l[2]++,g.index<d)continue;const p=new Oh(t,g.schema,g.index,g.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),d=g.lastIndex}return n.length?n:null};Jt.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new Oh(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};Jt.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),ss(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ss(this),this)};Jt.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Jt.prototype.onCompile=function(){};const go=2147483647,kn=36,Sc=1,ii=26,MS=38,LS=700,Rh=72,Ih=128,Nh="-",$S=/^xn--/,PS=/[^\0-\x7F]/,FS=/[\x2E\u3002\uFF0E\uFF61]/g,BS={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},da=kn-Sc,Cn=Math.floor,fa=String.fromCharCode;function ur(e){throw new RangeError(BS[e])}function zS(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Mh(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(FS,".");const o=e.split("."),i=zS(o,t).join(".");return r+i}function Lh(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const US=e=>String.fromCodePoint(...e),KS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:kn},Rd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},$h=function(e,t,n){let r=0;for(e=n?Cn(e/LS):e>>1,e+=Cn(e/t);e>da*ii>>1;r+=kn)e=Cn(e/da);return Cn(r+(da+1)*e/(e+MS))},Ph=function(e){const t=[],n=e.length;let r=0,o=Ih,i=Rh,s=e.lastIndexOf(Nh);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&ur("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=kn;;d+=kn){a>=n&&ur("invalid-input");const f=KS(e.charCodeAt(a++));f>=kn&&ur("invalid-input"),f>Cn((go-r)/l)&&ur("overflow"),r+=f*l;const g=d<=i?Sc:d>=i+ii?ii:d-i;if(f<g)break;const p=kn-g;l>Cn(go/p)&&ur("overflow"),l*=p}const c=t.length+1;i=$h(r-u,c,u==0),Cn(r/c)>go-o&&ur("overflow"),o+=Cn(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Fh=function(e){const t=[];e=Lh(e);const n=e.length;let r=Ih,o=0,i=Rh;for(const u of e)u<128&&t.push(fa(u));const s=t.length;let a=s;for(s&&t.push(Nh);a<n;){let u=go;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>Cn((go-o)/c)&&ur("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>go&&ur("overflow"),l===r){let d=o;for(let f=kn;;f+=kn){const g=f<=i?Sc:f>=i+ii?ii:f-i;if(d<g)break;const p=d-g,b=kn-g;t.push(fa(Rd(g+p%b,0))),d=Cn(p/b)}t.push(fa(Rd(d,0))),i=$h(o,c,a===s),o=0,++a}++o,++r}return t.join("")},qS=function(e){return Mh(e,function(t){return $S.test(t)?Ph(t.slice(4).toLowerCase()):t})},HS=function(e){return Mh(e,function(t){return PS.test(t)?"xn--"+Fh(t):t})},Bh={version:"2.3.1",ucs2:{decode:Lh,encode:US},decode:Ph,encode:Fh,toASCII:HS,toUnicode:qS},jS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},GS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},VS={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},WS={default:jS,zero:GS,commonmark:VS},YS=/^(vbscript|javascript|file|data):/,ZS=/^data:image\/(gif|png|jpeg|webp);/;function XS(e){const t=e.trim().toLowerCase();return YS.test(t)?ZS.test(t):!0}const zh=["http:","https:","mailto:"];function QS(e){const t=xc(e,!0);if(t.hostname&&(!t.protocol||zh.indexOf(t.protocol)>=0))try{t.hostname=Bh.toASCII(t.hostname)}catch{}return pi(vc(t))}function JS(e){const t=xc(e,!0);if(t.hostname&&(!t.protocol||zh.indexOf(t.protocol)>=0))try{t.hostname=Bh.toUnicode(t.hostname)}catch{}return mo(vc(t),mo.defaultChars+"%")}function sn(e,t){if(!(this instanceof sn))return new sn(e,t);t||_c(e)||(t=e||{},e="default"),this.inline=new mi,this.block=new Bs,this.core=new kc,this.renderer=new ko,this.linkify=new Jt,this.validateLink=XS,this.normalizeLink=QS,this.normalizeLinkText=JS,this.utils=nC,this.helpers=$s({},sC),this.options={},this.configure(e),t&&this.set(t)}sn.prototype.set=function(e){return $s(this.options,e),this};sn.prototype.configure=function(e){const t=this;if(_c(e)){const n=e;if(e=WS[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};sn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};sn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};sn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};sn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};sn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};sn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};sn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ga,Id;function e3(){if(Id)return ga;Id=1;var e=!0,t=!1,n=!1;ga=function(b,m){m&&(e=!m.enabled,t=!!m.label,n=!!m.labelAfter),b.core.ruler.after("inline","github-task-lists",function(y){for(var v=y.tokens,x=2;x<v.length;x++)i(v,x)&&(s(v[x],y.Token),r(v[x-2],"class","task-list-item"+(e?"":" enabled")),r(v[o(v,x-2)],"class","contains-task-list"))})};function r(b,m,y){var v=b.attrIndex(m),x=[m,y];v<0?b.attrPush(x):b.attrs[v]=x}function o(b,m){for(var y=b[m].level-1,v=m-1;v>=0;v--)if(b[v].level===y)return v;return-1}function i(b,m){return d(b[m])&&f(b[m-1])&&g(b[m-2])&&p(b[m])}function s(b,m){if(b.children.unshift(a(b,m)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),t)if(n){b.children.pop();var y="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+y+'">',b.children.push(l(b.content,y,m))}else b.children.unshift(u(m)),b.children.push(c(m))}function a(b,m){var y=new m("html_inline","",0),v=e?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?y.content='<input class="task-list-item-checkbox"'+v+'type="checkbox">':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(y.content='<input class="task-list-item-checkbox" checked=""'+v+'type="checkbox">'),y}function u(b){var m=new b("html_inline","",0);return m.content="<label>",m}function c(b){var m=new b("html_inline","",0);return m.content="</label>",m}function l(b,m,y){var v=new y("html_inline","",0);return v.content='<label class="task-list-item-label" for="'+m+'">'+b+"</label>",v.attrs=[{for:m}],v}function d(b){return b.type==="inline"}function f(b){return b.type==="paragraph_open"}function g(b){return b.type==="list_item_open"}function p(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return ga}var t3=e3();const n3=Ac(t3);var pa,Nd;function r3(){if(Nd)return pa;Nd=1;function e(R){return R instanceof Map?R.clear=R.delete=R.set=function(){throw new Error("map is read-only")}:R instanceof Set&&(R.add=R.clear=R.delete=function(){throw new Error("set is read-only")}),Object.freeze(R),Object.getOwnPropertyNames(R).forEach(W=>{const ce=R[W],me=typeof ce;(me==="object"||me==="function")&&!Object.isFrozen(ce)&&e(ce)}),R}class t{constructor(W){W.data===void 0&&(W.data={}),this.data=W.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(R){return R.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(R,...W){const ce=Object.create(null);for(const me in R)ce[me]=R[me];return W.forEach(function(me){for(const Se in me)ce[Se]=me[Se]}),ce}const o="</span>",i=R=>!!R.scope,s=(R,{prefix:W})=>{if(R.startsWith("language:"))return R.replace("language:","language-");if(R.includes(".")){const ce=R.split(".");return[`${W}${ce.shift()}`,...ce.map((me,Se)=>`${me}${"_".repeat(Se+1)}`)].join(" ")}return`${W}${R}`};class a{constructor(W,ce){this.buffer="",this.classPrefix=ce.classPrefix,W.walk(this)}addText(W){this.buffer+=n(W)}openNode(W){if(!i(W))return;const ce=s(W.scope,{prefix:this.classPrefix});this.span(ce)}closeNode(W){i(W)&&(this.buffer+=o)}value(){return this.buffer}span(W){this.buffer+=`<span class="${W}">`}}const u=(R={})=>{const W={children:[]};return Object.assign(W,R),W};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(W){this.top.children.push(W)}openNode(W){const ce=u({scope:W});this.add(ce),this.stack.push(ce)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(W){return this.constructor._walk(W,this.rootNode)}static _walk(W,ce){return typeof ce=="string"?W.addText(ce):ce.children&&(W.openNode(ce),ce.children.forEach(me=>this._walk(W,me)),W.closeNode(ce)),W}static _collapse(W){typeof W!="string"&&W.children&&(W.children.every(ce=>typeof ce=="string")?W.children=[W.children.join("")]:W.children.forEach(ce=>{c._collapse(ce)}))}}class l extends c{constructor(W){super(),this.options=W}addText(W){W!==""&&this.add(W)}startScope(W){this.openNode(W)}endScope(){this.closeNode()}__addSublanguage(W,ce){const me=W.root;ce&&(me.scope=`language:${ce}`),this.add(me)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(R){return R?typeof R=="string"?R:R.source:null}function f(R){return b("(?=",R,")")}function g(R){return b("(?:",R,")*")}function p(R){return b("(?:",R,")?")}function b(...R){return R.map(ce=>d(ce)).join("")}function m(R){const W=R[R.length-1];return typeof W=="object"&&W.constructor===Object?(R.splice(R.length-1,1),W):{}}function y(...R){return"("+(m(R).capture?"":"?:")+R.map(me=>d(me)).join("|")+")"}function v(R){return new RegExp(R.toString()+"|").exec("").length-1}function x(R,W){const ce=R&&R.exec(W);return ce&&ce.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(R,{joinWith:W}){let ce=0;return R.map(me=>{ce+=1;const Se=ce;let Ze=d(me),se="";for(;Ze.length>0;){const le=C.exec(Ze);if(!le){se+=Ze;break}se+=Ze.substring(0,le.index),Ze=Ze.substring(le.index+le[0].length),le[0][0]==="\\"&&le[1]?se+="\\"+String(Number(le[1])+Se):(se+=le[0],le[0]==="("&&ce++)}return se}).map(me=>`(${me})`).join(W)}const k=/\b\B/,A="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",T="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",L="\\b(0b[01]+)",P="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",O=(R={})=>{const W=/^#![ ]*\//;return R.binary&&(R.begin=b(W,/.*\b/,R.binary,/\b.*/)),r({scope:"meta",begin:W,end:/$/,relevance:0,"on:begin":(ce,me)=>{ce.index!==0&&me.ignoreMatch()}},R)},D={begin:"\\\\[\\s\\S]",relevance:0},I={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[D]},N={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[D]},z={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(R,W,ce={}){const me=r({scope:"comment",begin:R,end:W,contains:[]},ce);me.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Se=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return me.contains.push({begin:b(/[ ]+/,"(",Se,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),me},K=U("//","$"),F=U("/\\*","\\*/"),X=U("#","$"),j={scope:"number",begin:T,relevance:0},Q={scope:"number",begin:M,relevance:0},V={scope:"number",begin:L,relevance:0},q={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[D,{begin:/\[/,end:/\]/,relevance:0,contains:[D]}]},ee={scope:"title",begin:A,relevance:0},he={scope:"title",begin:_,relevance:0},te={begin:"\\.\\s*"+_,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:I,BACKSLASH_ESCAPE:D,BINARY_NUMBER_MODE:V,BINARY_NUMBER_RE:L,COMMENT:U,C_BLOCK_COMMENT_MODE:F,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:Q,C_NUMBER_RE:M,END_SAME_AS_BEGIN:function(R){return Object.assign(R,{"on:begin":(W,ce)=>{ce.data._beginMatch=W[1]},"on:end":(W,ce)=>{ce.data._beginMatch!==W[1]&&ce.ignoreMatch()}})},HASH_COMMENT_MODE:X,IDENT_RE:A,MATCH_NOTHING_RE:k,METHOD_GUARD:te,NUMBER_MODE:j,NUMBER_RE:T,PHRASAL_WORDS_MODE:z,QUOTE_STRING_MODE:N,REGEXP_MODE:q,RE_STARTERS_RE:P,SHEBANG:O,TITLE_MODE:ee,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:he});function Fe(R,W){R.input[R.index-1]==="."&&W.ignoreMatch()}function ze(R,W){R.className!==void 0&&(R.scope=R.className,delete R.className)}function rt(R,W){W&&R.beginKeywords&&(R.begin="\\b("+R.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",R.__beforeBegin=Fe,R.keywords=R.keywords||R.beginKeywords,delete R.beginKeywords,R.relevance===void 0&&(R.relevance=0))}function Qe(R,W){Array.isArray(R.illegal)&&(R.illegal=y(...R.illegal))}function Bt(R,W){if(R.match){if(R.begin||R.end)throw new Error("begin & end are not supported with match");R.begin=R.match,delete R.match}}function de(R,W){R.relevance===void 0&&(R.relevance=1)}const Re=(R,W)=>{if(!R.beforeMatch)return;if(R.starts)throw new Error("beforeMatch cannot be used with starts");const ce=Object.assign({},R);Object.keys(R).forEach(me=>{delete R[me]}),R.keywords=ce.keywords,R.begin=b(ce.beforeMatch,f(ce.begin)),R.starts={relevance:0,contains:[Object.assign(ce,{endsParent:!0})]},R.relevance=0,delete ce.beforeMatch},Ge=["of","and","for","in","not","or","if","then","parent","list","value"],mt="keyword";function Kt(R,W,ce=mt){const me=Object.create(null);return typeof R=="string"?Se(ce,R.split(" ")):Array.isArray(R)?Se(ce,R):Object.keys(R).forEach(function(Ze){Object.assign(me,Kt(R[Ze],W,Ze))}),me;function Se(Ze,se){W&&(se=se.map(le=>le.toLowerCase())),se.forEach(function(le){const De=le.split("|");me[De[0]]=[Ze,Tt(De[0],De[1])]})}}function Tt(R,W){return W?Number(W):en(R)?0:1}function en(R){return Ge.includes(R.toLowerCase())}const qt={},_t=R=>{console.error(R)},Ie=(R,...W)=>{console.log(`WARN: ${R}`,...W)},Ve=(R,W)=>{qt[`${R}/${W}`]||(console.log(`Deprecated as of ${R}. ${W}`),qt[`${R}/${W}`]=!0)},bt=new Error;function Dt(R,W,{key:ce}){let me=0;const Se=R[ce],Ze={},se={};for(let le=1;le<=W.length;le++)se[le+me]=Se[le],Ze[le+me]=!0,me+=v(W[le-1]);R[ce]=se,R[ce]._emit=Ze,R[ce]._multi=!0}function tn(R){if(Array.isArray(R.begin)){if(R.skip||R.excludeBegin||R.returnBegin)throw _t("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),bt;if(typeof R.beginScope!="object"||R.beginScope===null)throw _t("beginScope must be object"),bt;Dt(R,R.begin,{key:"beginScope"}),R.begin=S(R.begin,{joinWith:""})}}function Ht(R){if(Array.isArray(R.end)){if(R.skip||R.excludeEnd||R.returnEnd)throw _t("skip, excludeEnd, returnEnd not compatible with endScope: {}"),bt;if(typeof R.endScope!="object"||R.endScope===null)throw _t("endScope must be object"),bt;Dt(R,R.end,{key:"endScope"}),R.end=S(R.end,{joinWith:""})}}function jt(R){R.scope&&typeof R.scope=="object"&&R.scope!==null&&(R.beginScope=R.scope,delete R.scope)}function Jn(R){jt(R),typeof R.beginScope=="string"&&(R.beginScope={_wrap:R.beginScope}),typeof R.endScope=="string"&&(R.endScope={_wrap:R.endScope}),tn(R),Ht(R)}function nn(R){function W(se,le){return new RegExp(d(se),"m"+(R.case_insensitive?"i":"")+(R.unicodeRegex?"u":"")+(le?"g":""))}class ce{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(le,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,le]),this.matchAt+=v(le)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const le=this.regexes.map(De=>De[1]);this.matcherRe=W(S(le,{joinWith:"|"}),!0),this.lastIndex=0}exec(le){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(le);if(!De)return null;const gt=De.findIndex((tr,ln)=>ln>0&&tr!==void 0),ct=this.matchIndexes[gt];return De.splice(0,gt),Object.assign(De,ct)}}class me{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(le){if(this.multiRegexes[le])return this.multiRegexes[le];const De=new ce;return this.rules.slice(le).forEach(([gt,ct])=>De.addRule(gt,ct)),De.compile(),this.multiRegexes[le]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(le,De){this.rules.push([le,De]),De.type==="begin"&&this.count++}exec(le){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let gt=De.exec(le);if(this.resumingScanAtSamePosition()&&!(gt&>.index===this.lastIndex)){const ct=this.getMatcher(0);ct.lastIndex=this.lastIndex+1,gt=ct.exec(le)}return gt&&(this.regexIndex+=gt.position+1,this.regexIndex===this.count&&this.considerAll()),gt}}function Se(se){const le=new me;return se.contains.forEach(De=>le.addRule(De.begin,{rule:De,type:"begin"})),se.terminatorEnd&&le.addRule(se.terminatorEnd,{type:"end"}),se.illegal&&le.addRule(se.illegal,{type:"illegal"}),le}function Ze(se,le){const De=se;if(se.isCompiled)return De;[ze,Bt,Jn,Re].forEach(ct=>ct(se,le)),R.compilerExtensions.forEach(ct=>ct(se,le)),se.__beforeBegin=null,[rt,Qe,de].forEach(ct=>ct(se,le)),se.isCompiled=!0;let gt=null;return typeof se.keywords=="object"&&se.keywords.$pattern&&(se.keywords=Object.assign({},se.keywords),gt=se.keywords.$pattern,delete se.keywords.$pattern),gt=gt||/\w+/,se.keywords&&(se.keywords=Kt(se.keywords,R.case_insensitive)),De.keywordPatternRe=W(gt,!0),le&&(se.begin||(se.begin=/\B|\b/),De.beginRe=W(De.begin),!se.end&&!se.endsWithParent&&(se.end=/\B|\b/),se.end&&(De.endRe=W(De.end)),De.terminatorEnd=d(De.end)||"",se.endsWithParent&&le.terminatorEnd&&(De.terminatorEnd+=(se.end?"|":"")+le.terminatorEnd)),se.illegal&&(De.illegalRe=W(se.illegal)),se.contains||(se.contains=[]),se.contains=[].concat(...se.contains.map(function(ct){return er(ct==="self"?se:ct)})),se.contains.forEach(function(ct){Ze(ct,De)}),se.starts&&Ze(se.starts,le),De.matcher=Se(De),De}if(R.compilerExtensions||(R.compilerExtensions=[]),R.contains&&R.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return R.classNameAliases=r(R.classNameAliases||{}),Ze(R)}function Ln(R){return R?R.endsWithParent||Ln(R.starts):!1}function er(R){return R.variants&&!R.cachedVariants&&(R.cachedVariants=R.variants.map(function(W){return r(R,{variants:null},W)})),R.cachedVariants?R.cachedVariants:Ln(R)?r(R,{starts:R.starts?r(R.starts):null}):Object.isFrozen(R)?r(R):R}var Co="11.11.1";class G extends Error{constructor(W,ce){super(W),this.name="HTMLInjectionError",this.html=ce}}const re=n,ve=r,we=Symbol("nomatch"),$e=7,We=function(R){const W=Object.create(null),ce=Object.create(null),me=[];let Se=!0;const Ze="Could not find the language '{}', did you forget to load/include a language module?",se={disableAutodetect:!0,name:"Plain text",contains:[]};let le={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function De(oe){return le.noHighlightRe.test(oe)}function gt(oe){let Ee=oe.className+" ";Ee+=oe.parentNode?oe.parentNode.className:"";const Ye=le.languageDetectRe.exec(Ee);if(Ye){const ot=nr(Ye[1]);return ot||(Ie(Ze.replace("{}",Ye[1])),Ie("Falling back to no-highlight mode for this block.",oe)),ot?Ye[1]:"no-highlight"}return Ee.split(/\s+/).find(ot=>De(ot)||nr(ot))}function ct(oe,Ee,Ye){let ot="",yt="";typeof Ee=="object"?(ot=oe,Ye=Ee.ignoreIllegals,yt=Ee.language):(Ve("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ve("10.7.0",`Please use highlight(code, options) instead.
|
|
22
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),yt=oe,ot=Ee),Ye===void 0&&(Ye=!0);const dn={code:ot,language:yt};vi("before:highlight",dn);const rr=dn.result?dn.result:tr(dn.language,dn.code,Ye);return rr.code=dn.code,vi("after:highlight",rr),rr}function tr(oe,Ee,Ye,ot){const yt=Object.create(null);function dn(fe,_e){return fe.keywords[_e]}function rr(){if(!Be.keywords){Rt.addText(it);return}let fe=0;Be.keywordPatternRe.lastIndex=0;let _e=Be.keywordPatternRe.exec(it),Ke="";for(;_e;){Ke+=it.substring(fe,_e.index);const et=wn.case_insensitive?_e[0].toLowerCase():_e[0],Mt=dn(Be,et);if(Mt){const[$n,pm]=Mt;if(Rt.addText(Ke),Ke="",yt[et]=(yt[et]||0)+1,yt[et]<=$e&&(_i+=pm),$n.startsWith("_"))Ke+=_e[0];else{const hm=wn.classNameAliases[$n]||$n;xn(_e[0],hm)}}else Ke+=_e[0];fe=Be.keywordPatternRe.lastIndex,_e=Be.keywordPatternRe.exec(it)}Ke+=it.substring(fe),Rt.addText(Ke)}function xi(){if(it==="")return;let fe=null;if(typeof Be.subLanguage=="string"){if(!W[Be.subLanguage]){Rt.addText(it);return}fe=tr(Be.subLanguage,it,!0,Bc[Be.subLanguage]),Bc[Be.subLanguage]=fe._top}else fe=Vr(it,Be.subLanguage.length?Be.subLanguage:null);Be.relevance>0&&(_i+=fe.relevance),Rt.__addSublanguage(fe._emitter,fe.language)}function Wt(){Be.subLanguage!=null?xi():rr(),it=""}function xn(fe,_e){fe!==""&&(Rt.startScope(_e),Rt.addText(fe),Rt.endScope())}function Lc(fe,_e){let Ke=1;const et=_e.length-1;for(;Ke<=et;){if(!fe._emit[Ke]){Ke++;continue}const Mt=wn.classNameAliases[fe[Ke]]||fe[Ke],$n=_e[Ke];Mt?xn($n,Mt):(it=$n,rr(),it=""),Ke++}}function $c(fe,_e){return fe.scope&&typeof fe.scope=="string"&&Rt.openNode(wn.classNameAliases[fe.scope]||fe.scope),fe.beginScope&&(fe.beginScope._wrap?(xn(it,wn.classNameAliases[fe.beginScope._wrap]||fe.beginScope._wrap),it=""):fe.beginScope._multi&&(Lc(fe.beginScope,_e),it="")),Be=Object.create(fe,{parent:{value:Be}}),Be}function Pc(fe,_e,Ke){let et=x(fe.endRe,Ke);if(et){if(fe["on:end"]){const Mt=new t(fe);fe["on:end"](_e,Mt),Mt.isMatchIgnored&&(et=!1)}if(et){for(;fe.endsParent&&fe.parent;)fe=fe.parent;return fe}}if(fe.endsWithParent)return Pc(fe.parent,_e,Ke)}function cm(fe){return Be.matcher.regexIndex===0?(it+=fe[0],1):(Gs=!0,0)}function lm(fe){const _e=fe[0],Ke=fe.rule,et=new t(Ke),Mt=[Ke.__beforeBegin,Ke["on:begin"]];for(const $n of Mt)if($n&&($n(fe,et),et.isMatchIgnored))return cm(_e);return Ke.skip?it+=_e:(Ke.excludeBegin&&(it+=_e),Wt(),!Ke.returnBegin&&!Ke.excludeBegin&&(it=_e)),$c(Ke,fe),Ke.returnBegin?0:_e.length}function dm(fe){const _e=fe[0],Ke=Ee.substring(fe.index),et=Pc(Be,fe,Ke);if(!et)return we;const Mt=Be;Be.endScope&&Be.endScope._wrap?(Wt(),xn(_e,Be.endScope._wrap)):Be.endScope&&Be.endScope._multi?(Wt(),Lc(Be.endScope,fe)):Mt.skip?it+=_e:(Mt.returnEnd||Mt.excludeEnd||(it+=_e),Wt(),Mt.excludeEnd&&(it=_e));do Be.scope&&Rt.closeNode(),!Be.skip&&!Be.subLanguage&&(_i+=Be.relevance),Be=Be.parent;while(Be!==et.parent);return et.starts&&$c(et.starts,fe),Mt.returnEnd?0:_e.length}function fm(){const fe=[];for(let _e=Be;_e!==wn;_e=_e.parent)_e.scope&&fe.unshift(_e.scope);fe.forEach(_e=>Rt.openNode(_e))}let wi={};function Fc(fe,_e){const Ke=_e&&_e[0];if(it+=fe,Ke==null)return Wt(),0;if(wi.type==="begin"&&_e.type==="end"&&wi.index===_e.index&&Ke===""){if(it+=Ee.slice(_e.index,_e.index+1),!Se){const et=new Error(`0 width match regex (${oe})`);throw et.languageName=oe,et.badRule=wi.rule,et}return 1}if(wi=_e,_e.type==="begin")return lm(_e);if(_e.type==="illegal"&&!Ye){const et=new Error('Illegal lexeme "'+Ke+'" for mode "'+(Be.scope||"<unnamed>")+'"');throw et.mode=Be,et}else if(_e.type==="end"){const et=dm(_e);if(et!==we)return et}if(_e.type==="illegal"&&Ke==="")return it+=`
|
|
23
|
+
`,1;if(js>1e5&&js>_e.index*3)throw new Error("potential infinite loop, way more iterations than matches");return it+=Ke,Ke.length}const wn=nr(oe);if(!wn)throw _t(Ze.replace("{}",oe)),new Error('Unknown language: "'+oe+'"');const gm=nn(wn);let Hs="",Be=ot||gm;const Bc={},Rt=new le.__emitter(le);fm();let it="",_i=0,Er=0,js=0,Gs=!1;try{if(wn.__emitTokens)wn.__emitTokens(Ee,Rt);else{for(Be.matcher.considerAll();;){js++,Gs?Gs=!1:Be.matcher.considerAll(),Be.matcher.lastIndex=Er;const fe=Be.matcher.exec(Ee);if(!fe)break;const _e=Ee.substring(Er,fe.index),Ke=Fc(_e,fe);Er=fe.index+Ke}Fc(Ee.substring(Er))}return Rt.finalize(),Hs=Rt.toHTML(),{language:oe,value:Hs,relevance:_i,illegal:!1,_emitter:Rt,_top:Be}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:oe,value:re(Ee),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:Er,context:Ee.slice(Er-100,Er+100),mode:fe.mode,resultSoFar:Hs},_emitter:Rt};if(Se)return{language:oe,value:re(Ee),illegal:!1,relevance:0,errorRaised:fe,_emitter:Rt,_top:Be};throw fe}}function ln(oe){const Ee={value:re(oe),illegal:!1,relevance:0,_top:se,_emitter:new le.__emitter(le)};return Ee._emitter.addText(oe),Ee}function Vr(oe,Ee){Ee=Ee||le.languages||Object.keys(W);const Ye=ln(oe),ot=Ee.filter(nr).filter(Mc).map(Wt=>tr(Wt,oe,!1));ot.unshift(Ye);const yt=ot.sort((Wt,xn)=>{if(Wt.relevance!==xn.relevance)return xn.relevance-Wt.relevance;if(Wt.language&&xn.language){if(nr(Wt.language).supersetOf===xn.language)return 1;if(nr(xn.language).supersetOf===Wt.language)return-1}return 0}),[dn,rr]=yt,xi=dn;return xi.secondBest=rr,xi}function bi(oe,Ee,Ye){const ot=Ee&&ce[Ee]||Ye;oe.classList.add("hljs"),oe.classList.add(`language-${ot}`)}function Wr(oe){let Ee=null;const Ye=gt(oe);if(De(Ye))return;if(vi("before:highlightElement",{el:oe,language:Ye}),oe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",oe);return}if(oe.children.length>0&&(le.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(oe)),le.throwUnescapedHTML))throw new G("One of your code blocks includes unescaped HTML.",oe.innerHTML);Ee=oe;const ot=Ee.textContent,yt=Ye?ct(ot,{language:Ye,ignoreIllegals:!0}):Vr(ot);oe.innerHTML=yt.value,oe.dataset.highlighted="yes",bi(oe,Ye,yt.language),oe.result={language:yt.language,re:yt.relevance,relevance:yt.relevance},yt.secondBest&&(oe.secondBest={language:yt.secondBest.language,relevance:yt.secondBest.relevance}),vi("after:highlightElement",{el:oe,result:yt,text:ot})}function Jh(oe){le=ve(le,oe)}const em=()=>{yi(),Ve("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function tm(){yi(),Ve("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ic=!1;function yi(){function oe(){yi()}if(document.readyState==="loading"){Ic||window.addEventListener("DOMContentLoaded",oe,!1),Ic=!0;return}document.querySelectorAll(le.cssSelector).forEach(Wr)}function nm(oe,Ee){let Ye=null;try{Ye=Ee(R)}catch(ot){if(_t("Language definition for '{}' could not be registered.".replace("{}",oe)),Se)_t(ot);else throw ot;Ye=se}Ye.name||(Ye.name=oe),W[oe]=Ye,Ye.rawDefinition=Ee.bind(null,R),Ye.aliases&&Nc(Ye.aliases,{languageName:oe})}function rm(oe){delete W[oe];for(const Ee of Object.keys(ce))ce[Ee]===oe&&delete ce[Ee]}function om(){return Object.keys(W)}function nr(oe){return oe=(oe||"").toLowerCase(),W[oe]||W[ce[oe]]}function Nc(oe,{languageName:Ee}){typeof oe=="string"&&(oe=[oe]),oe.forEach(Ye=>{ce[Ye.toLowerCase()]=Ee})}function Mc(oe){const Ee=nr(oe);return Ee&&!Ee.disableAutodetect}function im(oe){oe["before:highlightBlock"]&&!oe["before:highlightElement"]&&(oe["before:highlightElement"]=Ee=>{oe["before:highlightBlock"](Object.assign({block:Ee.el},Ee))}),oe["after:highlightBlock"]&&!oe["after:highlightElement"]&&(oe["after:highlightElement"]=Ee=>{oe["after:highlightBlock"](Object.assign({block:Ee.el},Ee))})}function sm(oe){im(oe),me.push(oe)}function am(oe){const Ee=me.indexOf(oe);Ee!==-1&&me.splice(Ee,1)}function vi(oe,Ee){const Ye=oe;me.forEach(function(ot){ot[Ye]&&ot[Ye](Ee)})}function um(oe){return Ve("10.7.0","highlightBlock will be removed entirely in v12.0"),Ve("10.7.0","Please use highlightElement now."),Wr(oe)}Object.assign(R,{highlight:ct,highlightAuto:Vr,highlightAll:yi,highlightElement:Wr,highlightBlock:um,configure:Jh,initHighlighting:em,initHighlightingOnLoad:tm,registerLanguage:nm,unregisterLanguage:rm,listLanguages:om,getLanguage:nr,registerAliases:Nc,autoDetection:Mc,inherit:ve,addPlugin:sm,removePlugin:am}),R.debugMode=function(){Se=!1},R.safeMode=function(){Se=!0},R.versionString=Co,R.regex={concat:b,lookahead:f,either:y,optional:p,anyNumberOfTimes:g};for(const oe in Oe)typeof Oe[oe]=="object"&&e(Oe[oe]);return Object.assign(R,Oe),R},Ot=We({});return Ot.newInstance=()=>We({}),pa=Ot,Ot.HighlightJS=Ot,Ot.default=Ot,pa}var ha,Md;function o3(){if(Md)return ha;Md=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return ha=e,ha}var ma,Ld;function i3(){if(Ld)return ma;Ld=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},g=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=t.SHEBANG({binary:`(${g.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],v={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],S=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:y,built_in:[...x,...C,"set","shopt",...S,...k]},contains:[p,t.SHEBANG(),b,f,s,a,v,u,c,l,d,r]}}return ma=e,ma}var ba,$d;function s3(){if($d)return ba;$d=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:v.concat([{begin:/\(/,end:/\)/,keywords:y,contains:v.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(x,C,v,[f,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:l,keywords:y}}}return ba=e,ba}var ya,Pd;function a3(){if(Pd)return ya;Pd=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:m,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},k={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},A=[k,f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:A.concat([{begin:/\(/,end:/\)/,keywords:S,contains:A.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:S,relevance:0},{begin:p,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(_,T,k,A,[f,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:S,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return ya=e,ya}var va,Fd;function u3(){if(Fd)return va;Fd=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=t.inherit(d,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=t.inherit(g,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},y=t.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});g.contains=[m,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],p.contains=[y,b,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[l,m,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},C=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",S={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+C+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[v,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},S]}}return va=e,va}var xa,Bd;function c3(){if(Bd)return xa;Bd=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),f={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},g="and or not only",p=/@-?\w[\w]*(-\w+)*/,b="[a-zA-Z-][a-zA-Z0-9_-]*",m=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,f,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+b,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...m,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...m,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...m,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return xa=u,xa}var wa,zd;function l3(){if(zd)return wa;zd=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(l,{contains:[]}),g=t.inherit(d,{contains:[]});l.contains.push(g),d.contains.push(f);let p=[r,c];return[l,d,f,g].forEach(v=>{v.contains=v.contains.concat(p)}),p=p.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return wa=e,wa}var _a,Ud;function d3(){if(Ud)return _a;Ud=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return _a=e,_a}var Ea,Kd;function f3(){if(Kd)return Ea;Kd=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},g="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${g})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},A=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:r}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=A,m.contains=A;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:A}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(L).concat(l).concat(A)}}return Ea=e,Ea}var ka,qd;function g3(){if(qd)return ka;qd=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return ka=e,ka}var Ca,Hd;function p3(){if(Hd)return Ca;Hd=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return Ca=e,Ca}var Sa,jd;function h3(){if(jd)return Sa;jd=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,f=n.either(c,l,d),g=n.concat(f,"(\\s*\\.\\s*",f,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:g,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Sa=e,Sa}var Aa,Gd;function m3(){if(Gd)return Aa;Gd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},b={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},m={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[m,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[b,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,b]}}return Aa=i,Aa}var Ta,Vd;function b3(){if(Vd)return Ta;Vd=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,d=(he,{after:te})=>{const xe="</"+he[0].slice(1);return he.input.indexOf(xe,te)!==-1},f=e,g={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(he,te)=>{const xe=he[0].length+he.index,Oe=he.input[xe];if(Oe==="<"||Oe===","){te.ignoreMatch();return}Oe===">"&&(d(he,{after:xe})||te.ignoreMatch());let Fe;const ze=he.input.substring(xe);if(Fe=ze.match(/^\s*=/)){te.ignoreMatch();return}if((Fe=ze.match(/^\s+extends\s+/))&&Fe.index===0){te.ignoreMatch();return}}},m={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",v=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${x})((${v})|\\.)?|(${v}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${v})\\b|\\.)?|(${v})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},k={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,S]},L={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:f+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},P=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,A,_,T,{match:/\$\d+/},C];S.contains=P.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(P)});const O=[].concat(L,S.contains),D=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(O)}]),I={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:D},N={variants:[{match:[/class/,/\s+/,f,/\s+/,/extends/,/\s+/,l.concat(f,"(",l.concat(/\./,f),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,f],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},U={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,f,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(he){return l.concat("(?!",he.join("|"),")")}const j={match:l.concat(/\b/,X([...i,"super","import"].map(he=>`${he}\\s*\\(`)),f,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:l.concat(/\./,l.lookahead(l.concat(f,/(?![0-9A-Za-z$_(])/))),end:f,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,f,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ee={match:[/const|var|let/,/\s+/,f,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),U,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,A,_,T,L,{match:/\$\d+/},C,z,{scope:"attr",match:f+l.lookahead(":"),relevance:0},ee,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,c.REGEXP_MODE,{className:"function",begin:q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:p},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,c.inherit(c.TITLE_MODE,{begin:f,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+f,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},j,F,N,V,{match:/\$[(.]/}]}}return Ta=u,Ta}var Da,Wd;function y3(){if(Wd)return Da;Wd=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Da=e,Da}var Oa,Yd;function v3(){if(Yd)return Oa;Yd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},g={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},p=r,b=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=m;return y.variants[1].contains=[m],m.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,b,a,u,f,g,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,i.C_LINE_COMMENT_MODE,b],relevance:0},i.C_LINE_COMMENT_MODE,b,f,g,d,i.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,g]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
24
|
+
`},p]}}return Oa=o,Oa}var Ra,Zd;function x3(){if(Zd)return Ra;Zd=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),f=u,g="and or not only",p="[\\w-]+",b="("+p+"|@\\{"+p+"\\})",m=[],y=[],v=function(O){return{className:"string",begin:"~?"+O+".*?"+O}},x=function(O,D,I){return{className:O,begin:D,relevance:I}},C={$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},S={begin:"\\(",end:"\\)",contains:y,keywords:C,relevance:0};y.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,v("'"),v('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,S,x("variable","@@?"+p,10),x("variable","@\\{"+p+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const k=y.concat({begin:/\{/,end:/\}/,contains:m}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},_={begin:b+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:y}}]},T={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:C,returnEnd:!0,contains:y,relevance:0}},M={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:k}},L={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,A,x("keyword","all\\b"),x("variable","@\\{"+p+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",b,0),x("selector-id","#"+b),x("selector-class","\\."+b,0),x("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:k},{begin:"!important"},d.FUNCTION_DISPATCH]},P={begin:p+`:(:)?(${f.join("|")})`,returnBegin:!0,contains:[L]};return m.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,T,M,P,_,L,A,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:m}}return Ra=c,Ra}var Ia,Xd;function w3(){if(Xd)return Ia;Xd=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return Ia=e,Ia}var Na,Qd;function _3(){if(Qd)return Na;Qd=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return Na=e,Na}var Ma,Jd;function E3(){if(Jd)return Ma;Jd=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(m,y,v="\\1")=>{const x=v==="\\1"?v:n.concat(v,y);return n.concat(n.concat("(?:",m,")"),y,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,v,o)},p=(m,y,v)=>n.concat(n.concat("(?:",m,")"),y,/(?:\\.|[^\\\/])*?/,v,o),b=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:g("s|tr|y",n.either(...f,{capture:!0}))},{begin:g("s|tr|y","\\(","\\)")},{begin:g("s|tr|y","\\[","\\]")},{begin:g("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",n.either(...f,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}return Ma=e,Ma}var La,ef;function k3(){if(ef)return La;ef=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return La=e,La}var $a,tf;function C3(){if(tf)return $a;tf=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(I,N)=>{N.data._beginMatch=I[1]||I[2]},"on:end":(I,N)=>{N.data._beginMatch!==I[1]&&N.ignoreMatch()}},g=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
25
|
+
]`,b={scope:"string",variants:[d,l,f,g]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],S={keyword:v,literal:(I=>{const N=[];return I.forEach(z=>{N.push(z),z.toLowerCase()===z?N.push(z.toUpperCase()):N.push(z.toLowerCase())}),N})(y),built_in:x},k=I=>I.map(N=>N.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",k(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},_=n.concat(o,"\\b(?!\\()"),T={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},M={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:S,contains:[M,a,T,t.C_BLOCK_COMMENT_MODE,b,m,A]},P={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",k(v).join("\\b|"),"|",k(x).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(P);const O=[M,T,t.C_BLOCK_COMMENT_MODE,b,m,A],D={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...O]},...O,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:S,contains:[D,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,P,T,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:S,contains:["self",D,a,T,t.C_BLOCK_COMMENT_MODE,b,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},b,m]}}return $a=e,$a}var Pa,nf;function S3(){if(nf)return Pa;nf=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Pa=e,Pa}var Fa,rf;function A3(){if(rf)return Fa;rf=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Fa=e,Fa}var Ba,of;function T3(){if(of)return Ba;of=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},g="[0-9](_?[0-9])*",p=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,b=`\\b|${o.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${p}))[eE][+-]?(${g})[jJ]?(?=${b})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${g})[jJ](?=${b})`}]},y={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,m,f,t.HASH_COMMENT_MODE]}]};return l.contains=[f,m,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,v,f]}]}}return Ba=e,Ba}var za,sf;function D3(){if(sf)return za;sf=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return za=e,za}var Ua,af;function O3(){if(af)return Ua;af=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Ua=e,Ua}var Ka,uf;function R3(){if(uf)return Ka;uf=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:d}},{className:"punctuation",begin:"->"},s]}}return Ka=e,Ka}var qa,cf;function I3(){if(cf)return qa;cf=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,f=i,g="@[a-z-]+",p="and or not only",m={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+f.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},m,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,m,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:g,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:g,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},m,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return qa=u,qa}var Ha,lf;function N3(){if(lf)return Ha;lf=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Ha=e,Ha}var ja,df;function M3(){if(df)return ja;df=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],g=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,b=[...l,...c].filter(k=>!d.includes(k)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:n.concat(/\b/,n.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(k){return n.concat(/\b/,n.either(...k.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:x(g),relevance:0};function S(k,{exceptions:A,when:_}={}){const T=_;return A=A||[],k.map(M=>M.match(/\|\d+$/)||A.includes(M)?M:T(M)?`${M}|0`:M)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:S(b,{when:k=>k.length<3}),literal:s,type:u,built_in:f},contains:[{scope:"type",match:x(a)},C,v,m,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return ja=e,ja}var Ga,ff;function L3(){if(ff)return Ga;ff=1;function e(_){return _?typeof _=="string"?_:_.source:null}function t(_){return n("(?=",_,")")}function n(..._){return _.map(M=>e(M)).join("")}function r(_){const T=_[_.length-1];return typeof T=="object"&&T.constructor===Object?(_.splice(_.length-1,1),T):{}}function o(..._){return"("+(r(_).capture?"":"?:")+_.map(L=>e(L)).join("|")+")"}const i=_=>n(/\b/,_,/\w$/.test(_)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],f=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),b=o(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),m=n(p,b,"*"),y=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=o(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(y,v,"*"),C=n(/[A-Z]/,v,"*"),S=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],k=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(_){const T={match:/\s+/,relevance:0},M=_.COMMENT("/\\*","\\*/",{contains:["self"]}),L=[_.C_LINE_COMMENT_MODE,M],P={match:[/\./,o(...s,...a)],className:{2:"keyword"}},O={match:n(/\./,o(...c)),relevance:0},D=c.filter(we=>typeof we=="string").concat(["_|0"]),I=c.filter(we=>typeof we!="string").concat(u).map(i),N={variants:[{className:"keyword",match:o(...I,...a)}]},z={$pattern:o(/\b\w+/,/#\w+/),keyword:D.concat(f),literal:l},U=[P,O,N],K={match:n(/\./,o(...g)),relevance:0},F={className:"built_in",match:n(/\b/,o(...g),/(?=\()/)},X=[K,F],j={match:/->/,relevance:0},Q={className:"operator",relevance:0,variants:[{match:m},{match:`\\.(\\.|${b})+`}]},V=[j,Q],q="([0-9]_*)+",ee="([0-9a-fA-F]_*)+",he={className:"number",relevance:0,variants:[{match:`\\b(${q})(\\.(${q}))?([eE][+-]?(${q}))?\\b`},{match:`\\b0x(${ee})(\\.(${ee}))?([pP][+-]?(${q}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},te=(we="")=>({className:"subst",variants:[{match:n(/\\/,we,/[0\\tnr"']/)},{match:n(/\\/,we,/u\{[0-9a-fA-F]{1,8}\}/)}]}),xe=(we="")=>({className:"subst",match:n(/\\/,we,/[\t ]*(?:[\r\n]|\r\n)/)}),Oe=(we="")=>({className:"subst",label:"interpol",begin:n(/\\/,we,/\(/),end:/\)/}),Fe=(we="")=>({begin:n(we,/"""/),end:n(/"""/,we),contains:[te(we),xe(we),Oe(we)]}),ze=(we="")=>({begin:n(we,/"/),end:n(/"/,we),contains:[te(we),Oe(we)]}),rt={className:"string",variants:[Fe(),Fe("#"),Fe("##"),Fe("###"),ze(),ze("#"),ze("##"),ze("###")]},Qe=[_.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[_.BACKSLASH_ESCAPE]}],Bt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Qe},de=we=>{const $e=n(we,/\//),We=n(/\//,we);return{begin:$e,end:We,contains:[...Qe,{scope:"comment",begin:`#(?!.*${We})`,end:/$/}]}},Re={scope:"regexp",variants:[de("###"),de("##"),de("#"),Bt]},Ge={match:n(/`/,x,/`/)},mt={className:"variable",match:/\$\d+/},Kt={className:"variable",match:`\\$${v}+`},Tt=[Ge,mt,Kt],en={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:k,contains:[...V,he,rt]}]}},qt={scope:"keyword",match:n(/@/,o(...S),t(o(/\(/,/\s+/)))},_t={scope:"meta",match:n(/@/,x)},Ie=[en,qt,_t],Ve={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:C,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(C)),relevance:0}]},bt={begin:/</,end:/>/,keywords:z,contains:[...L,...U,...Ie,j,Ve]};Ve.contains.push(bt);const Dt={match:n(x,/\s*:/),keywords:"_|0",relevance:0},tn={begin:/\(/,end:/\)/,relevance:0,keywords:z,contains:["self",Dt,...L,Re,...U,...X,...V,he,rt,...Tt,...Ie,Ve]},Ht={begin:/</,end:/>/,keywords:"repeat each",contains:[...L,Ve]},jt={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},Jn={begin:/\(/,end:/\)/,keywords:z,contains:[jt,...L,...U,...V,he,rt,...Ie,Ve,tn],endsParent:!0,illegal:/["']/},nn={match:[/(func|macro)/,/\s+/,o(Ge.match,x,m)],className:{1:"keyword",3:"title.function"},contains:[Ht,Jn,T],illegal:[/\[/,/%/]},Ln={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ht,Jn,T],illegal:/\[|%/},er={match:[/operator/,/\s+/,m],className:{1:"keyword",3:"title"}},Co={begin:[/precedencegroup/,/\s+/,C],className:{1:"keyword",3:"title"},contains:[Ve],keywords:[...d,...l],end:/}/},G={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},re={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},ve={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:z,contains:[Ht,...U,{begin:/:/,end:/\{/,keywords:z,contains:[{scope:"title.class.inherited",match:C},...U],relevance:0}]};for(const we of rt.variants){const $e=we.contains.find(Ot=>Ot.label==="interpol");$e.keywords=z;const We=[...U,...X,...V,he,rt,...Tt];$e.contains=[...We,{begin:/\(/,end:/\)/,contains:["self",...We]}]}return{name:"Swift",keywords:z,contains:[...L,nn,Ln,G,re,ve,er,Co,{beginKeywords:"import",end:/$/,contains:[...L],relevance:0},Re,...U,...X,...V,he,rt,...Tt,...Ie,Ve,tn]}}return Ga=A,Ga}var Va,gf;function $3(){if(gf)return Va;gf=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),g={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},b={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},y=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},g,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,m,s,a],v=[...y];return v.pop(),v.push(u),p.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return Va=e,Va}var Wa,pf;function P3(){if(pf)return Wa;pf=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,f=(te,{after:xe})=>{const Oe="</"+te[0].slice(1);return te.input.indexOf(Oe,xe)!==-1},g=e,p={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(te,xe)=>{const Oe=te[0].length+te.index,Fe=te.input[Oe];if(Fe==="<"||Fe===","){xe.ignoreMatch();return}Fe===">"&&(f(te,{after:Oe})||xe.ignoreMatch());let ze;const rt=te.input.substring(Oe);if(ze=rt.match(/^\s*=/)){xe.ignoreMatch();return}if((ze=rt.match(/^\s+extends\s+/))&&ze.index===0){xe.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",x=`\\.(${v})`,C="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",S={className:"number",variants:[{begin:`(\\b(${C})((${x})|\\.)?|(${x}))[eE][+-]?(${v})\\b`},{begin:`\\b(${C})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"css"}},T={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"graphql"}},M={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,k]},P={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},O=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,_,T,M,{match:/\$\d+/},S];k.contains=O.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(O)});const D=[].concat(P,k.contains),I=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(D)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:I},z={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,d.concat(g,"(",d.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(te){return d.concat("(?!",te.join("|"),")")}const Q={match:d.concat(/\b/,j([...i,"super","import"].map(te=>`${te}\\s*\\(`)),g,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},V={begin:d.concat(/\./,d.lookahead(d.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},ee="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",he={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ee)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,_,T,M,P,{match:/\$\d+/},S,U,{scope:"attr",match:g+d.lookahead(":"),relevance:0},he,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[P,l.REGEXP_MODE,{className:"function",begin:ee,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:b},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,l.inherit(l.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},V,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},Q,X,z,q,{match:/\$[(.]/}]}}function c(l){const d=l.regex,f=u(l),g=e,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},m={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},v=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(v),literal:n,built_in:a.concat(p),"variable.language":s},C={className:"meta",begin:"@"+g},S=(T,M,L)=>{const P=T.contains.findIndex(O=>O.label===M);if(P===-1)throw new Error("can not find mode to replace");T.contains.splice(P,1,L)};Object.assign(f.keywords,x),f.exports.PARAMS_CONTAINS.push(C);const k=f.contains.find(T=>T.scope==="attr"),A=Object.assign({},k,{match:d.concat(g,d.lookahead(/\s*\?:/))});f.exports.PARAMS_CONTAINS.push([f.exports.CLASS_REFERENCE,k,A]),f.contains=f.contains.concat([C,b,m,A]),S(f,"shebang",l.SHEBANG()),S(f,"use_strict",y);const _=f.contains.find(T=>T.label==="func.def");return _.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return Wa=c,Wa}var Ya,hf;function F3(){if(hf)return Ya;hf=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,f,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}return Ya=e,Ya}var Za,mf;function B3(){if(mf)return Za;mf=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return Za=e,Za}var Xa,bf;function z3(){if(bf)return Xa;bf=1;var e=r3();return e.registerLanguage("xml",o3()),e.registerLanguage("bash",i3()),e.registerLanguage("c",s3()),e.registerLanguage("cpp",a3()),e.registerLanguage("csharp",u3()),e.registerLanguage("css",c3()),e.registerLanguage("markdown",l3()),e.registerLanguage("diff",d3()),e.registerLanguage("ruby",f3()),e.registerLanguage("go",g3()),e.registerLanguage("graphql",p3()),e.registerLanguage("ini",h3()),e.registerLanguage("java",m3()),e.registerLanguage("javascript",b3()),e.registerLanguage("json",y3()),e.registerLanguage("kotlin",v3()),e.registerLanguage("less",x3()),e.registerLanguage("lua",w3()),e.registerLanguage("makefile",_3()),e.registerLanguage("perl",E3()),e.registerLanguage("objectivec",k3()),e.registerLanguage("php",C3()),e.registerLanguage("php-template",S3()),e.registerLanguage("plaintext",A3()),e.registerLanguage("python",T3()),e.registerLanguage("python-repl",D3()),e.registerLanguage("r",O3()),e.registerLanguage("rust",R3()),e.registerLanguage("scss",I3()),e.registerLanguage("shell",N3()),e.registerLanguage("sql",M3()),e.registerLanguage("swift",L3()),e.registerLanguage("yaml",$3()),e.registerLanguage("typescript",P3()),e.registerLanguage("vbnet",F3()),e.registerLanguage("wasm",B3()),e.HighlightJS=e,e.default=e,Xa=e,Xa}var U3=z3();const yf=Ac(U3),vn=new sn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&yf.getLanguage(t))try{const n=yf.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),K3=/^<\/?(?:details|summary)>$/i,q3=/^<details\s+open\s*>$/i,H3=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function j3(e){return K3.test(e)||q3.test(e)||H3.test(e)}function Uh(e){const t=vn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=j3(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}vn.renderer.rules.html_block=(e,t)=>Uh(e[t].content);vn.renderer.rules.html_inline=(e,t)=>Uh(e[t].content);const G3=vn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),vf=vn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),V3=vn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Kh(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function W3(e){return e.replace(/:\d+(?::\d+)?$/,"")}function Y3(e){const n=W3(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function Z3(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&Y3(e)}function Qa(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function no(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}vn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=Kh(u[1],s,i?.projectId))}return G3(e,t,n,r,o)};vn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&Z3(a[1])){const c=a[1];return Qa(s,"href"),Qa(s,"target"),Qa(s,"rel"),no(s,"role","button"),no(s,"tabindex","0"),no(s,"data-file-link","true"),no(s,"data-file-path",c),i.fileLinkTitle&&(no(s,"title",i.fileLinkTitle),no(s,"aria-label",i.fileLinkTitle)),vf(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Kh(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return vf(e,t,n,r,o)};vn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}">${u}</div>`}return V3(e,t,n,r,o)};vn.use(n3,{enabled:!1,label:!1});function Us(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),vn.render(e,n)}function X3(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const Q3="modulepreload",J3=function(e){return"/"+e},xf={},eA=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=J3(c),c in xf)return;xf[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":Q3,l||(f.as="script"),f.crossOrigin="",f.href=c,u&&f.setAttribute("nonce",u),document.head.appendChild(f),l)return new Promise((g,p)=>{f.addEventListener("load",g),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Ja=null,wf=Promise.resolve();const Ru=new WeakMap,Li=new WeakMap;let ao=null;async function tA(){return Ja||(Ja=eA(()=>import("./mermaid.core-DDfmGYIx.js").then(e=>e.bp),[]).then(e=>e.default)),Ja}function nA(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function eu(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function rA(e){const t=(Ru.get(e)??0)+1;return Ru.set(e,t),t}function tu(e,t){return Ru.get(e)===t}async function oA(e){const t=wf.then(e,e);wf=t.catch(()=>{}),await t}function iA(e,t,n){return Math.min(n,Math.max(t,e))}function nu(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function _f(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function sA(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:_f(e.getAttribute("width"))??0,height:_f(e.getAttribute("height"))??0}}function Po(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function qh(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function aA(e,t){if(qh(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function uA(e,t){ao?.close();const n=t.parentNode,r=t.nextSibling,o=document.createElement("div");o.className="mermaid-overlay",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label",E("mermaid.viewerLabel"));const i=document.createElement("div");i.className="mermaid-overlay__toolbar";const s=Po("mermaid-overlay__button",E("mermaid.zoomOut"),"-"),a=Po("mermaid-overlay__button",E("mermaid.zoomIn"),"+"),u=Po("mermaid-overlay__button",E("mermaid.reset"),"1:1"),c=Po("mermaid-overlay__button",E("mermaid.close"),"x");i.append(s,a,u,c);const l=document.createElement("div");l.className="mermaid-overlay__viewport";const d=document.createElement("div");d.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),d.appendChild(t),l.appendChild(d),o.append(i,l),document.body.appendChild(o);let f=1,g=0,p=0,b=!1,m=0,y=0,v=0,x=0;const C=()=>{d.style.transform=`translate(${nu(g)}px, ${nu(p)}px) scale(${nu(f)})`},S=(O,D,I)=>{const N=l.getBoundingClientRect(),z=D===void 0?N.width/2:D-N.left,U=I===void 0?N.height/2:I-N.top,K=N.width/2,F=N.height/2,X=f;f=iA(O,.2,8),g=z-K-(z-K-g)/X*f,p=U-F-(U-F-p)/X*f,C()},k=()=>{const{width:O,height:D}=sA(t);f=1,g=O>0?-O/2:0,p=D>0?-D/2:0,C()},A=()=>{if(document.removeEventListener("keydown",P),t.classList.remove("mermaid-overlay__svg"),n?.isConnected){const O=r?.parentNode===n?r:null;n.insertBefore(t,O)}o.remove(),ao?.close===A&&(ao=null)},_=O=>{O.preventDefault();const D=O.deltaY>0?.9:1.1;S(f*D,O.clientX,O.clientY)},T=O=>{O.button===0&&(b=!0,m=O.clientX,y=O.clientY,v=g,x=p,l.setPointerCapture(O.pointerId),l.classList.add("is-dragging"))},M=O=>{b&&(g=v+O.clientX-m,p=x+O.clientY-y,C())},L=O=>{b&&(b=!1,l.classList.remove("is-dragging"),l.hasPointerCapture(O.pointerId)&&l.releasePointerCapture(O.pointerId))},P=O=>{O.key==="Escape"&&A()};return s.addEventListener("click",()=>S(f/1.2)),a.addEventListener("click",()=>S(f*1.2)),u.addEventListener("click",k),c.addEventListener("click",A),l.addEventListener("wheel",_,{passive:!1}),l.addEventListener("pointerdown",T),l.addEventListener("pointermove",M),l.addEventListener("pointerup",L),l.addEventListener("pointercancel",L),document.addEventListener("keydown",P),ao={host:e,sourceSvg:t,close:A},k(),c.focus(),A}function cA(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=aA(n,e);if(!r)return;const{host:o}=r,i=Li.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=Po("mermaid-fullscreen-button",E("mermaid.maximize"),"⤢"),a=()=>{const c=qh(n)&&n.isConnected?n:o.querySelector("svg");c&&uA(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{ao?.host===o&&ao.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),Li.get(o)?.button===s&&Li.delete(o)};Li.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function lA(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=rA(e),n=await tA();if(!tu(e,t))return()=>{};if(await eu(),!tu(e,t))return()=>{};let r=()=>{};function o(){r(),r=cA(e)}async function i(c){const l=c.filter(d=>d.isConnected&&e.contains(d));l.length!==0&&await oA(async()=>{if(!tu(e,t))return;const d=l.filter(g=>g.isConnected&&e.contains(g));if(d.length===0)return;const f=nA();n.initialize({startOnLoad:!1,theme:f}),r(),r=()=>{},d.forEach(g=>{const p=g.getAttribute("data-mermaid-source");p&&(g.removeAttribute("data-processed"),g.textContent=p)});try{await n.run({nodes:d}),await eu(),o()}catch(g){console.error("[mermaid] render error:",g)}})}const s=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await i(s),await eu(),o();const a=()=>void i(Array.from(e.querySelectorAll(".mermaid"))),u=window.matchMedia("(prefers-color-scheme: dark)");return u.addEventListener("change",a),()=>{r(),u.removeEventListener("change",a)}}function dA(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function fA(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function gA(e,t,n={}){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!fA(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=dA(u.startContainer,e),f=E("selection.noSection"),g=d&&d.textContent?.trim()||f;i=c,t({text:c,rect:l,sectionPath:g})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const pA=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,hA=/^##\s+/,mA=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,bA=/^\d+\.\s+(.*\S)\s*$/,yA=/^\s*$/,Ef=/\s*[((]推荐[))]\s*$/,kf=/\s*(自由文本)\s*$/,vA=/^\[(choice|confirm)\]\s*/i,xA=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,wA=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function _A(e){const t=e.split(`
|
|
26
|
+
`);let n=0;for(;n<t.length&&!pA.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(hA.test(i))break;const s=SA(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>EA(i,s))}function EA(e,t){const n=vA.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=kf.test(o),s=i?o.replace(kf,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=kA(e.bodyLines);return{id:Cf(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=CA(e.bodyLines,t,s),u=i||a.length===0;return{id:Cf(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function kA(e){let t,n;for(const r of e){const o=r.trim(),i=xA.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=wA.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function CA(e,t,n){const r=[];let o=0;for(const i of e){if(yA.test(i))continue;const s=AA(i);if(s===null)continue;const a=Ef.test(s),u=a?s.replace(Ef,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:TA(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function SA(e){const t=mA.exec(e);return t?t[1]:null}function AA(e){const t=bA.exec(e);return t?t[1]:null}function Cf(e,t){return`q-${e}-${Hh(t)}`}function TA(e,t,n){return`q-${e}-o-${t}-${Hh(n)}`}function Hh(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var DA=B('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const OA=36,RA=140,IA=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-OA-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-RA-8);return{top:i,left:s,visible:!0}};return h(Y,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=DA();return o.$$mousedown=i=>i.preventDefault(),w(o,h(Ae,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return E("selectionMenu.annotate")}}),null),w(o,h(Ae,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return E("selectionMenu.explain")}}),null),pe(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Ho(o,"top",i.e=s),a!==i.t&&Ho(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};an(["mousedown"]);var NA=B('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-auto rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),MA=B('<p class="text-destructive ">');const LA=500,ar=8,$A=e=>{const[t,n]=$(""),[r,o]=$(!1),[i,s]=$(null),[a,u]=$(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const f=a()||260,g=window.innerHeight,p=d.rect.bottom+ar,b=d.rect.top-ar-f;let m;p+f<=g-ar?m=p:b>=ar?m=b:m=Math.max(ar,g-f-ar);const y=Math.min(Math.max(ar,d.rect.left),window.innerWidth-LA-ar);return{top:m,left:y}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(f){s(f.message)}finally{o(!1)}}}return h(Y,{get when(){return ae(()=>!!e.open)()&&e.snap},get children(){var d=NA(),f=d.firstChild,g=f.firstChild,p=f.nextSibling,b=p.firstChild,m=b.nextSibling,y=m.nextSibling,v=y.nextSibling,x=v.nextSibling;x.nextSibling;var C=p.nextSibling,S=C.firstChild;return d.$$mousedown=k=>k.stopPropagation(),pr(k=>{queueMicrotask(()=>{k.offsetHeight!==a()&&u(k.offsetHeight)})},d),w(g,()=>E("annotate.title")),w(b,()=>e.snap?.sectionPath),w(p,()=>E("annotate.inSection"),y),w(p,()=>(e.snap?.text??"").slice(0,200),x),C.addEventListener("submit",l),w(C,h(ho,{rows:3,get value(){return t()},onInput:k=>n(k.currentTarget.value),get placeholder(){return E("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),S),w(C,(()=>{var k=ae(()=>!!i());return()=>k()&&(()=>{var A=MA();return w(A,i),A})()})(),S),w(S,h(Ae,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return E("common.cancel")}}),null),w(S,h(Ae,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return ae(()=>!!r())()?E("common.submitting"):E("annotate.submit")}}),null),pe(k=>{var A=`${c().top}px`,_=`${c().left}px`;return A!==k.e&&Ho(d,"top",k.e=A),_!==k.t&&Ho(d,"left",k.t=_),k},{e:void 0,t:void 0}),d}})};an(["mousedown"]);var PA=B('<label class="flex cursor-pointer items-start gap-1.5 ml-5"><input type=checkbox class=mt-1><span class="flex flex-col"><span class=font-medium></span><span class="text-sm text-muted-foreground">'),FA=B("<div><span class=text-muted-foreground></span><code class=font-mono>"),BA=B('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),zA=B('<div class="flex flex-col gap-1 text-sm">'),UA=B('<p class="text-destructive ">'),KA=B('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><fieldset class="m-0 flex flex-col gap-1.5 border-0 p-0"><legend class="mb-1 font-medium"></legend></fieldset><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">'),qA=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=append-kind><span>');const HA={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},jA=e=>{const[t,n]=$("fix"),[r,o]=$(!1),[i,s]=$(""),[a,u]=$(!1),[c,l]=$(null),[d,f]=$(null);J(()=>{if(!e.open){f(null);return}const m=e.anchorEl;if(!m)return;const y=m.getBoundingClientRect(),x=Math.max(16,Math.min(y.left,window.innerWidth-384-16));f({top:y.bottom+8,left:x})}),J(()=>{if(!e.open)return;const m=y=>{y.key==="Escape"&&(y.preventDefault(),b())};window.addEventListener("keydown",m),ne(()=>window.removeEventListener("keydown",m))});function g(){n("fix"),o(!1),s(""),l(null)}async function p(m){m.preventDefault();const y=i().trim();if(!y){l(E("appendTask.descRequired"));return}u(!0),l(null);try{await e.onSubmit({kind:t(),description:y,sectionPath:e.sectionPath,quote:e.quote,debug:t()==="fix"?r():void 0}),g(),e.onCancel()}catch(v){l(v.message)}finally{u(!1)}}function b(){e.onCancel()}return h(Y,{get when(){return e.open},get children(){var m=KA(),y=m.firstChild,v=y.firstChild,x=v.firstChild,C=x.nextSibling,S=v.nextSibling,k=S.firstChild,A=k.firstChild,_=k.nextSibling,T=_.firstChild,M=_.nextSibling;return m.$$mousedown=b,y.$$mousedown=L=>L.stopPropagation(),w(x,()=>E("appendTask.title")),w(C,()=>E("appendTask.hint")),S.addEventListener("submit",p),w(A,()=>E("appendTask.type")),w(k,()=>["feat","refct","fix"].map(L=>(()=>{var P=qA(),O=P.firstChild,D=O.nextSibling;return O.addEventListener("change",()=>n(L)),O.value=L,w(D,()=>E(HA[L])),pe(()=>O.disabled=a()),pe(()=>O.checked=t()===L),P})()),null),w(S,h(Y,{get when(){return t()==="fix"},get children(){var L=PA(),P=L.firstChild,O=P.nextSibling,D=O.firstChild,I=D.nextSibling;return P.addEventListener("change",N=>o(N.currentTarget.checked)),w(D,()=>E("appendTask.debugMode")),w(I,()=>E("appendTask.debugModeHint")),pe(()=>P.disabled=a()),pe(()=>P.checked=r()),L}}),_),w(T,()=>E("appendTask.description")),w(_,h(ho,{rows:5,get value(){return i()},onInput:L=>s(L.currentTarget.value),get placeholder(){return E("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(S,h(Y,{get when(){return e.sectionPath||e.quote},get children(){var L=zA();return w(L,h(Y,{get when(){return e.sectionPath},get children(){var P=FA(),O=P.firstChild,D=O.nextSibling;return w(O,()=>E("appendTask.refSection")),w(D,()=>e.sectionPath),P}}),null),w(L,h(Y,{get when(){return e.quote},get children(){var P=BA();return w(P,()=>e.quote?.slice(0,200)),P}}),null),L}}),M),w(S,h(Y,{get when(){return c()},get children(){var L=UA();return w(L,c),L}}),M),w(M,h(Ae,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return E("common.cancel")}}),null),w(M,h(Ae,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[h(ys,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>ae(()=>!!a())()?E("common.submitting"):E("appendTask.submit"))]}}),null),pe(L=>{var P=E("appendTask.title"),O=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0,D=a();return P!==L.e&&je(y,"aria-label",L.e=P),L.t=gs(y,O,L.t),D!==L.a&&(k.disabled=L.a=D),L},{e:void 0,t:void 0,a:void 0}),m}})};an(["mousedown"]);const Fo="__freeform__",GA={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},VA="accept";function WA(e){return e!==VA}function YA(e,t,n){const r=GA[t],o=(n??"").trim();if(WA(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function ZA(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===Fo?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var XA=B('<p class="text-destructive mx-3 mt-1 ">'),QA=B('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-accent"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),JA=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-option-freeform flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span>'),Sf=B('<p class="m-0 break-words"><strong></strong>:'),eT=B("<div>"),Af=B('<ul class="m-0 ml-5 flex list-none flex-col gap-1 border-l border-border pl-2">'),tT=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-confirm-accept flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span></span></label></li><li><label class="qcp-confirm-reject flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="font-medium text-destructive">'),nT=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),rT=B('<em class="text-accent text-sm not-italic"> '),ru=B('<li><label class="flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="min-w-0 break-words">'),oT=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function jh(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function iT(e){const t=jh(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function sT(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-amber-500":"border-border":"border-border"}const aT=e=>{const t=()=>{const m={};for(const y of e.questions){if(y.kind==="confirm"){m[y.id]={note:"",confirmTop:"accept"};continue}const v=y.options.find(x=>x.recommended);m[y.id]={selectedOptionLabel:v?.label??y.options[0]?.label,note:""}}return m},[n,r]=$(t()),[o,i]=$(!1),[s,a]=$(null);function u(m,y){r(v=>({...v,[m]:{...v[m],...y}}))}function c(m,y){u(m,{selectedOptionLabel:y})}function l(m,y){u(m,{note:y})}function d(m,y){y==="accept"?u(m,{confirmTop:y,confirmIntent:void 0,confirmDrop:void 0}):u(m,{confirmTop:y})}function f(m,y){y==="dropGoal"?u(m,{confirmIntent:y}):u(m,{confirmIntent:y,confirmDrop:void 0})}function g(m,y){u(m,{confirmDrop:y})}const p=ie(()=>{const m=n();let y=0;for(const v of e.questions){const x=m[v.id];if(!x){y+=1;continue}if(v.kind==="confirm"){iT(x)||(y+=1);continue}const C=x.note??"";v.isFreeform||x.selectedOptionLabel===Fo?C.trim()||(y+=1):x.selectedOptionLabel||(y+=1)}return y});async function b(){i(!0),a(null);try{const m=n(),y=[];for(const x of e.questions){const C=m[x.id]??{note:""};if(x.kind==="confirm"){const k=jh(C);if(!k)continue;const A=YA(x,k,C.note);if(!A){a(E("questionConfirm.reasonRequired"));return}y.push(A);continue}const S=ZA(x,C);S&&y.push(S)}const v={answers:y,freeformAnnotations:e.freeforms.map(x=>({sectionPath:x.sectionPath,quote:x.quote,note:x.note}))};if(v.answers.length===0&&v.freeformAnnotations.length===0){a(E("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(m){a(m.message)}finally{i(!1)}}return(()=>{var m=QA(),y=m.firstChild,v=y.firstChild,x=v.firstChild,C=x.nextSibling,S=C.firstChild,k=S.nextSibling;k.nextSibling;var A=y.nextSibling;return w(x,()=>E("questionConfirm.title")),w(C,()=>E("questionConfirm.unanswered"),S),w(k,p),w(C,()=>e.questions.length,null),w(y,h(Ae,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[h(ys,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>ae(()=>!!o())()?E("common.submitting"):ae(()=>!!e.running)()?E("questionConfirm.running"):E("questionConfirm.submitAll"))]}}),null),w(m,h(Y,{get when(){return s()},get children(){var _=XA();return w(_,s),_}}),A),w(A,h(lt,{get each(){return e.questions},children:_=>{const T=()=>n()[_.id]??{note:""},M=()=>_.kind!=="confirm"&&(_.isFreeform||T().selectedOptionLabel===Fo),L=()=>_.kind==="confirm"&&T().confirmTop==="reject";return(()=>{var P=nT(),O=P.firstChild;return w(O,()=>_.text),w(P,h(Y,{get when(){return _.kind==="choice"},get children(){var D=JA(),I=D.firstChild,N=I.firstChild,z=N.firstChild,U=z.nextSibling;return w(D,h(lt,{get each(){return _.options},children:K=>(()=>{var F=ru(),X=F.firstChild,j=X.firstChild,Q=j.nextSibling;return j.addEventListener("change",()=>c(_.id,K.label)),w(Q,()=>K.label,null),w(Q,h(Y,{get when(){return K.recommended},get children(){var V=rT();return V.firstChild,w(V,()=>E("questionConfirm.recommended"),null),V}}),null),pe(()=>je(j,"name",`q-${_.id}`)),pe(()=>j.checked=T().selectedOptionLabel===K.label),F})()}),I),z.addEventListener("change",()=>c(_.id,Fo)),w(U,()=>E("questionConfirm.freeformLabel")),pe(()=>je(z,"name",`q-${_.id}`)),pe(()=>z.checked=T().selectedOptionLabel===Fo),D}}),null),w(P,h(Y,{get when(){return _.kind==="confirm"},get children(){return[(()=>{var D=eT();return w(D,h(Y,{get when(){return _.plan},get children(){var I=Sf(),N=I.firstChild;return N.nextSibling,w(N,()=>E("questionConfirm.confirmPlanLabel")),w(I,()=>_.plan,null),I}}),null),w(D,h(Y,{get when(){return _.impact},get children(){var I=Sf(),N=I.firstChild;return N.nextSibling,w(N,()=>E("questionConfirm.confirmImpactLabel")),w(I,()=>_.impact,null),I}}),null),pe(()=>Nt(D,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${sT(_.impact)}`)),D})(),(()=>{var D=tT(),I=D.firstChild,N=I.firstChild,z=N.firstChild,U=z.nextSibling,K=I.nextSibling,F=K.firstChild,X=F.firstChild,j=X.nextSibling;return z.addEventListener("change",()=>d(_.id,"accept")),w(U,()=>E("questionConfirm.decisionAccept")),X.addEventListener("change",()=>d(_.id,"reject")),w(j,()=>E("questionConfirm.decisionReject")),w(D,h(Y,{get when(){return T().confirmTop==="reject"},get children(){var Q=Af();return w(Q,h(lt,{get each(){return[["alternative",E("questionConfirm.intentAlternative")],["constraint",E("questionConfirm.intentConstraint")],["dropGoal",E("questionConfirm.intentDropGoal")]]},children:([V,q])=>(()=>{var ee=ru(),he=ee.firstChild,te=he.firstChild,xe=te.nextSibling;return te.addEventListener("change",()=>f(_.id,V)),w(xe,q),pe(()=>je(te,"name",`q-${_.id}-intent`)),pe(()=>te.checked=T().confirmIntent===V),ee})()}),null),w(Q,h(Y,{get when(){return T().confirmIntent==="dropGoal"},get children(){var V=Af();return w(V,h(lt,{get each(){return[["current",E("questionConfirm.dropGoalCurrent")],["spec",E("questionConfirm.dropGoalSpec")]]},children:([q,ee])=>(()=>{var he=ru(),te=he.firstChild,xe=te.firstChild,Oe=xe.nextSibling;return xe.addEventListener("change",()=>g(_.id,q)),w(Oe,ee),pe(()=>je(xe,"name",`q-${_.id}-drop`)),pe(()=>xe.checked=T().confirmDrop===q),he})()})),V}}),null),Q}}),null),pe(Q=>{var V=`q-${_.id}`,q=`q-${_.id}`;return V!==Q.e&&je(z,"name",Q.e=V),q!==Q.t&&je(X,"name",Q.t=q),Q},{e:void 0,t:void 0}),pe(()=>z.checked=T().confirmTop==="accept"),pe(()=>X.checked=T().confirmTop==="reject"),D})()]}}),null),w(P,h(Y,{get when(){return M()},get children(){return h(ho,{class:"qcp-note",rows:2,get placeholder(){return E("questionConfirm.notePlaceholder")},get value(){return T().note},onInput:D=>l(_.id,D.currentTarget.value)})}}),null),w(P,h(Y,{get when(){return L()},get children(){return h(ho,{class:"qcp-reject-reason",rows:2,get placeholder(){return E("questionConfirm.reasonPlaceholder")},get value(){return T().note},onInput:D=>l(_.id,D.currentTarget.value)})}}),null),P})()}}),null),w(A,h(lt,{get each(){return e.freeforms},children:_=>(()=>{var T=oT(),M=T.firstChild,L=M.firstChild,P=M.nextSibling,O=P.firstChild,D=O.nextSibling,I=D.nextSibling,N=I.nextSibling,z=N.nextSibling;z.nextSibling;var U=P.nextSibling;return U.firstChild,w(L,()=>E("questionConfirm.selectionAnnotation")),w(M,h(Ae,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(_.id),"aria-label":"remove",get children(){return h(Kr,{class:"h-4 w-4"})}}),null),w(O,()=>_.sectionPath),w(P,()=>E("questionConfirm.quoteConnector"),I),w(P,()=>_.quote.slice(0,200),z),w(U,()=>_.note,null),T})()}),null),pe(()=>je(x,"title",E("questionConfirm.title"))),m})()};var uT=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),Tf=B("<p class=text-muted-foreground>"),cT=B('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><select><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select><time>'),lT=B('<p class="text-destructive ">'),dT=B('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const fT={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},gT=120,Df=3,pT=150,hT=e=>new Promise(t=>setTimeout(t,e));async function mT(e,t,n){for(let r=0;r<=Df;r+=1)try{return await Ce.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<Df&&await hT(pT)}return n??null}const bT=()=>{const e=ui(),t=vo(),[n,r]=$(0),[o,i]=$(!1),[s,a]=$(""),[u]=Gt(()=>[t(),e.id,n()],async([V,q],ee)=>mT(V,q,ee.value)),[c]=Gt(()=>[t(),e.id,n()],async([V,q])=>{try{return await Ce.getDebug(V,q)}catch{return{exists:!1,text:""}}}),[l,d]=$(null),[f,g]=$(!1),[p,b]=$(null),[m,y]=$(null),[v,x]=$(null),[C,S]=$([]),[k,A]=$(!1),[_,T]=$(null);let M;const L=ie(()=>{const V=u();return V?_A(V.body):[]}),P=ie(()=>`@.yorz/specs/${e.id}/spec.md`),O=ie(()=>!u()||o()?!1:L().length>0||C().length>0);J(()=>{const V=e.id,q=t();if(!V||!q)return;let ee;const he=iv(q,V,{onUpdated:()=>{ee&&clearTimeout(ee),ee=setTimeout(()=>void Gf(()=>r(te=>te+1)),gT)}});ne(()=>{ee&&clearTimeout(ee),he()})}),J(()=>{const V=e.id,q=t();!V||!q||Ce.getSpecSession(q,V).then(({sessionId:ee,running:he})=>{ee&&(a(ee),i(he),so(ee))}).catch(()=>{})}),J(()=>{const V=t(),q=s();if(!V||!q)return;const ee=Cg(V,{onStatus:he=>{he.sessionId===q&&i(he.running)}});ne(ee)}),J(()=>{const V=t(),q=s();if(!V||!q)return;const ee=ws(V,q,{onEvent:he=>{(he.type==="turn-completed"||he.type==="error")&&i(!1)}});ne(ee)}),J(()=>{const V=v();if(!V)return;const q=gA(V,d);ne(q)}),vs(()=>k()||f()),J(()=>{const V=v(),q=u();if(!V||!q)return;const ee=t();let he=!0,te;const xe=Us(q.body,{specId:q.id,projectId:ee||void 0});pk(V,`<article>${xe}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Oe,Fe)=>!(Oe.classList?.contains("mermaid")&&Oe.getAttribute("data-mermaid-source")===Fe.getAttribute?.("data-mermaid-source"))}),lA(V).then(Oe=>{if(!he){Oe();return}te=Oe}),ne(()=>{he=!1,te?.()})});async function D(){y(null),i(!0);try{const V=t(),{sessionId:q}=await Ce.runAgent(V,e.id);a(q),so(q)}catch(V){i(!1),y(V.message)}}async function I(V){y(null);try{await Ce.setStage(t(),e.id,V),r(q=>q+1)}catch(q){y(q.message)}}async function N(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(P()),It.success(E("specDetail.specPathCopied"))}catch{It.error(E("specDetail.specPathCopyFailed"))}}function z(V){b(V),g(!0)}async function U(V){const q=p();q&&S(ee=>[...ee,{id:`f-${Date.now()}-${ee.length}`,sectionPath:q.sectionPath,quote:q.text,note:V}])}function K(V){S(q=>q.filter(ee=>ee.id!==V))}async function F(V){await Ce.submitQuestionAnswers(t(),e.id,V),S([]),await D()}function X(){T(l()),A(!0)}async function j(V){const q=t(),ee=await Ce.appendItem(q,e.id,V);ee.sessionId&&(i(!0),a(ee.sessionId),so(ee.sessionId))}async function Q(V){i(!0);try{const q=t(),{sessionId:ee}=await Ce.explain(q,e.id,V.text);a(ee),so(ee)}catch(q){i(!1),y(q.message)}}return(()=>{var V=uT();return w(V,h(fs,{get fallback(){return(()=>{var q=Tf();return w(q,()=>E("common.loading")),q})()},get children(){return h(Y,{get when(){return u()},get fallback(){return(()=>{var q=Tf();return w(q,()=>E("specDetail.notFound")),q})()},children:q=>[(()=>{var ee=cT(),he=ee.firstChild,te=he.firstChild,xe=he.nextSibling,Oe=xe.firstChild,Fe=xe.nextSibling,ze=Fe.firstChild,rt=ze.nextSibling;return w(te,h(Ls,{get items(){return[{label:E("breadcrumb.specList"),href:Ft("")},{label:q().id}]}}),null),w(te,h(Ae,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return E("specDetail.copySpecPath")},get"aria-label"(){return E("specDetail.copySpecPath")},onClick:()=>void N(),get children(){return h(V1,{class:"h-3.5 w-3.5"})}}),null),w(he,h(Cs,{}),null),w(Oe,()=>q().frontmatter.summary||E("common.pendingAgent")),ze.addEventListener("change",Qe=>I(Qe.currentTarget.value)),w(rt,()=>Tg(q().frontmatter.updated_at)),w(Fe,h(Ae,{variant:"outline",size:"sm",class:"append-btn",ref(Qe){var Bt=M;typeof Bt=="function"?Bt(Qe):M=Qe},onClick:X,get children(){return E("specDetail.appendTask")}}),null),w(Fe,h(Tn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return Ft(`specs/${q().id}/review`)},get children(){return E("specDetail.review")}}),null),w(Fe,h(Y,{get when(){return c()?.exists},get children(){return h(Tn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return Ft(`specs/${q().id}/debug`)},get children(){return E("specDetail.debug")}})}}),null),w(Fe,h(Y,{get when(){return o()},get children(){return h(Qg,{variant:"secondary",get children(){return E("specDetail.running")}})}}),null),pe(Qe=>{var Bt=`cursor-pointer appearance-none rounded-full border-0 px-2.5 py-0.5 text-sm font-semibold uppercase text-white ${fT[q().frontmatter.stage]??"bg-muted"}`,de=E("specDetail.forceStage");return Bt!==Qe.e&&Nt(ze,Qe.e=Bt),de!==Qe.t&&je(ze,"title",Qe.t=de),Qe},{e:void 0,t:void 0}),pe(()=>ze.value=q().frontmatter.stage),ee})(),h(Y,{get when(){return m()},get children(){var ee=lT();return w(ee,m),ee}}),(()=>{var ee=dT(),he=ee.firstChild;return w(ee,h(Y,{get when(){return O()},get children(){return h(aT,{get questions(){return L()},get freeforms(){return C()},get running(){return o()},onRemoveFreeform:K,onSubmit:F})}}),he),pr(x,he),ee})(),h(IA,{get snap(){return ae(()=>!!f())()?null:l()},onAnnotate:z,onExplain:Q}),h($A,{get open(){return f()},get snap(){return p()},onCancel:()=>g(!1),onSubmit:U}),h(jA,{get open(){return k()},get sectionPath(){return _()?.sectionPath},get quote(){return _()?.text},anchorEl:M,onCancel:()=>A(!1),onSubmit:j})]})}})),V})()},yT=e=>{const[t,n]=ue(e,["class"]);return h(Zp,H({get class(){return ut("shrink-0 bg-border data-[orientation=horizontal]:h-[1px] data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-[1px]",t.class)}},n))};var vT=B("<span>"),xT=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),wT=B('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),_T=B('<p class=" text-muted-foreground">'),ET=B('<p class="text-destructive ">'),kT=B('<p class=" text-muted-foreground">(runId: <code></code>)'),Of=B("<p class=text-muted-foreground>"),CT=B('<section data-testid=review-report-pane class="flex min-h-0 min-w-0 flex-[6] flex-col gap-2">'),ST=B('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane><div class="flex flex-wrap items-center gap-2"></div><div class="flex gap-4"><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode>'),AT=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),TT=B('<label class="flex cursor-pointer items-center gap-2 px-2 py-0.5 "><input type=checkbox><span></span><span class="truncate font-mono text-sm">'),DT=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">');const OT={commit:"review.commit",discard:"review.discard",stash:"review.stash"},$i={review:"review.reviewing",commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},Pi={review:"review.reviewChanges",commit:"review.commit",discard:"review.discard",stash:"review.stash"},RT={M:"text-yellow-600",A:"text-green-600",D:"text-red-600","??":"text-blue-600",R:"text-purple-600"},IT=()=>{const e=ui(),t=vo(),[n]=Gt(()=>[t(),e.id],([de,Re])=>Ce.getSpec(de,Re)),[r,o]=$(0),[i]=Gt(()=>[t(),e.id,r()],async([de,Re])=>Ce.getReview(de,Re)),[s,a]=$([]),[u,c]=$("manual"),[l,d]=$(new Set),[f,g]=$(""),[p,b]=$(!1),[m,y]=$(null),[v,x]=$(null),[C,S]=$(null),[k,A]=$(null),[_,T]=$(null),[M,L]=$(""),[P,O]=$(null);function D(de){return L(de),new Promise(Re=>O(()=>Re))}function I(de){const Re=P();Re&&(O(null),Re(de))}let N,z=null;ne(()=>z?.()),ne(()=>I(!1)),vs();function U(de){de&&(de.style.height="auto",de.style.height=`${de.scrollHeight}px`)}const K=ie(()=>{const de=i()?.text??"";return de.trim()?Us(de,{specId:e.id,projectId:t()}):""}),F=ie(()=>i.loading||!!K()),X=ie(()=>NT(i()?.text??"")),j=ie(()=>{const de=e.id.split("."),Re=de.length>=2?de[1]:"feat",Ge=n()?.frontmatter.summary??"";return Ge?`${Re}: ${Ge}`:`${Re}: update`});J(()=>{const de=j();de&&!p()&&g(de)}),J(dt(f,()=>{U(N)})),pn(()=>U(N)),J(()=>{const de=t(),Re=e.id;if(!de||!Re)return;const Ge=uv(de,Re,mt=>{a(mt),d(Kt=>{const Tt=new Set(mt.map(qt=>qt.path)),en=new Set;for(const qt of Kt)Tt.has(qt)&&en.add(qt);return en})});ne(()=>Ge())});function Q(de){return _()===de}const V=ie(()=>_()),q=ie(()=>v()!==null||V()!==null||m()!==null);function ee(de,Re){z?.(),T(de),z=ws(t(),Re,{onEvent:Ge=>{(Ge.type==="turn-completed"||Ge.type==="error")&&(T(null),de==="review"&&o(mt=>mt+1),z?.(),z=null)}})}function he(){return u()==="agent"?s().map(de=>de.path):[...l()]}async function te(de){if(q())return;S(null);const Re=he();if(Re.length===0){S(E("review.selectAtLeastOne"));return}if(!(de==="discard"&&!await D(E("review.confirmDiscard")))){y(de);try{if(de==="commit"){const Ge=f().trim();if(!Ge){S(E("review.enterCommitMsg"));return}await Ce.directCommit(t(),e.id,{message:Ge,paths:Re})}else de==="discard"?await Ce.directDiscard(t(),e.id,{paths:Re}):de==="stash"&&await Ce.directStash(t(),e.id,{message:f().trim()||`yorz:${e.id}`,paths:Re})}catch(Ge){S(Ge.message)}finally{y(null)}}}async function xe(de){if(!q()&&(S(null),!(de==="discard"&&!await D(E("review.confirmDiscardAll"))))){x(de);try{const Re=de==="review"?await Ce.triggerReview(t(),e.id):await Ce.gitOp(t(),e.id,de);A({kind:de,runId:Re.runId}),so(Re.sessionId),ee(de,Re.sessionId)}catch(Re){S(Re.message)}finally{x(null)}}}async function Oe(de){u()==="manual"?await te(de):await xe(de)}function Fe(de){return Q(de)||v()===de||m()===de}function ze(de){d(Re=>{const Ge=new Set(Re);return Ge.has(de)?Ge.delete(de):Ge.add(de),Ge})}function rt(){s().every(de=>l().has(de.path))?d(new Set):d(new Set(s().map(de=>de.path)))}const Qe=ie(()=>s().length>0&&s().every(de=>l().has(de.path))),Bt=ie(()=>u()==="manual"&&l().size===0);return(()=>{var de=AT();return w(de,h(fs,{get fallback(){return(()=>{var Re=Of();return w(Re,()=>E("common.loading")),Re})()},get children(){return[(()=>{var Re=xT(),Ge=Re.firstChild,mt=Ge.firstChild,Kt=Ge.nextSibling;return w(Ge,h(Ls,{get items(){return[{label:E("breadcrumb.specList"),href:Ft("")},{label:e.id,href:Ft(`specs/${e.id}`)},{label:E("specDetail.review")}]}}),mt),w(mt,()=>n()?.frontmatter.summary||E("common.pendingAgent")),w(Kt,h(Y,{get when(){return X()},get children(){var Tt=vT();return w(Tt,()=>E("review.lastReview",{time:X()})),Tt}}),null),w(Kt,h(Cs,{}),null),Re})(),(()=>{var Re=ST(),Ge=Re.firstChild,mt=Ge.firstChild,Kt=mt.nextSibling,Tt=Kt.firstChild,en=Tt.firstChild,qt=Tt.nextSibling,_t=qt.firstChild;return w(mt,h(Ae,{variant:"default",size:"sm",get disabled(){return q()||Bt()},onClick:()=>Oe("commit"),get children(){return[h(Y,{get when(){return Fe("commit")},get children(){return h(qn,{class:"mr-1 h-3 w-3 animate-spin"})}}),ae(()=>ae(()=>!!Fe("commit"))()?E($i.commit):E(Pi.commit))]}}),null),w(mt,h(Ae,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return q()||Bt()},onClick:()=>Oe("discard"),get children(){return[h(Y,{get when(){return Fe("discard")},get children(){return h(qn,{class:"mr-1 h-3 w-3 animate-spin"})}}),ae(()=>ae(()=>!!Fe("discard"))()?E($i.discard):E(Pi.discard))]}}),null),w(mt,h(Ae,{variant:"ghost",size:"sm",get disabled(){return q()||Bt()},onClick:()=>Oe("stash"),get children(){return[h(Y,{get when(){return Fe("stash")},get children(){return h(qn,{class:"mr-1 h-3 w-3 animate-spin"})}}),ae(()=>ae(()=>!!Fe("stash"))()?E($i.stash):E(Pi.stash))]}}),null),w(mt,h(yT,{orientation:"vertical",class:"h-6"}),null),w(mt,h(Ae,{variant:"ghost",size:"sm",get title(){return E("review.reviewHint")},get disabled(){return q()||s().length===0},onClick:()=>xe("review"),get children(){return[h(Y,{get when(){return Fe("review")},get children(){return h(qn,{class:"mr-1 h-3 w-3 animate-spin"})}}),ae(()=>ae(()=>!!Fe("review"))()?E($i.review):E(Pi.review))]}}),null),w(Ge,h(ho,{ref(Ie){var Ve=N;typeof Ve=="function"?Ve(Ie):N=Ie},get placeholder(){return E("review.commitPlaceholder")},get value(){return f()},onInput:Ie=>{b(!0),g(Ie.currentTarget.value),U(N)},get disabled(){return q()},rows:2,class:"resize-none"}),Kt),en.addEventListener("change",()=>c("manual")),w(Tt,()=>E("review.manualSelect"),null),_t.addEventListener("change",()=>c("agent")),w(qt,()=>E("review.agentSelect"),null),w(Ge,h(Y,{get when(){return ae(()=>u()==="manual")()&&s().length>0},get children(){var Ie=wT(),Ve=Ie.firstChild,bt=Ve.firstChild;return w(Ve,h(Ae,{variant:"ghost",size:"sm",onClick:rt,get disabled(){return q()},get children(){return ae(()=>!!Qe())()?E("review.deselectAll"):E("review.selectAll")}}),bt),w(bt,()=>E("review.fileCount",{selected:l().size,total:s().length})),w(Ie,h(lt,{get each(){return s()},children:Dt=>(()=>{var tn=TT(),Ht=tn.firstChild,jt=Ht.nextSibling,Jn=jt.nextSibling;return Ht.addEventListener("change",()=>ze(Dt.path)),w(jt,()=>Dt.status),w(Jn,()=>Dt.path),pe(nn=>{var Ln=q(),er=`inline-block w-6 text-center text-sm font-bold ${RT[Dt.status]??""}`;return Ln!==nn.e&&(Ht.disabled=nn.e=Ln),er!==nn.t&&Nt(jt,nn.t=er),nn},{e:void 0,t:void 0}),pe(()=>Ht.checked=l().has(Dt.path)),tn})()}),null),Ie}}),null),w(Ge,h(Y,{get when(){return ae(()=>u()==="manual")()&&s().length===0},get children(){var Ie=_T();return w(Ie,()=>E("review.noChanges")),Ie}}),null),w(Ge,h(Y,{get when(){return C()},get children(){var Ie=ET();return w(Ie,C),Ie}}),null),w(Ge,h(Y,{get when(){return k()},get children(){var Ie=kT(),Ve=Ie.firstChild,bt=Ve.nextSibling;return w(Ie,()=>E("review.dispatched"),Ve),w(Ie,(()=>{var Dt=ae(()=>k().kind==="review");return()=>Dt()?E("review.reviewChanges"):E(OT[k().kind])})(),Ve),w(bt,()=>k().runId.slice(0,8)),Ie}}),null),w(Re,h(Y,{get when(){return F()},get children(){var Ie=CT();return w(Ie,h(Y,{get when(){return i.loading},get fallback(){return(()=>{var Ve=DT();return pe(()=>Ve.innerHTML=K()),Ve})()},get children(){var Ve=Of();return w(Ve,()=>E("common.loading")),Ve}})),Ie}}),null),pe(Ie=>{var Ve=`flex min-h-0 min-w-0 flex-col gap-3 ${F()?"flex-[4]":"flex-1"}`,bt=q(),Dt=q();return Ve!==Ie.e&&Nt(Ge,Ie.e=Ve),bt!==Ie.t&&(en.disabled=Ie.t=bt),Dt!==Ie.a&&(_t.disabled=Ie.a=Dt),Ie},{e:void 0,t:void 0,a:void 0}),pe(()=>en.checked=u()==="manual"),pe(()=>_t.checked=u()==="agent"),Re})()]}}),null),w(de,h(on,{get open(){return P()!==null},onOpenChange:Re=>{Re||I(!1)},get children(){return h($r,{class:"max-w-sm",get children(){return[h(Fr,{get children(){return[h(Pr,{get children(){return E("review.discardTitle")}}),h(dc,{get children(){return M()}})]}}),h(Br,{get children(){return[h(Ae,{variant:"outline",onClick:()=>I(!1),get children(){return E("common.cancel")}}),h(Ae,{variant:"destructive",onClick:()=>I(!0),get children(){return E("review.confirmDiscardAction")}})]}})]}})}}),null),de})()};function NT(e){if(!e)return"";const t=e.split(/\r?\n/);for(let n=0;n<t.length;n++){const r=/^##\s+(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s*$/.exec(t[n]??"");if(r)return r[1]??""}return""}var MT=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),Rf=B("<p class=text-muted-foreground>"),LT=B('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),$T=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),PT=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),FT=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const BT=()=>{const e=ui(),t=vo();vs();const[n]=Gt(()=>[t(),e.id],([i,s])=>Ce.getSpec(i,s)),[r]=Gt(()=>[t(),e.id],([i,s])=>Ce.getDebug(i,s)),o=ie(()=>{const i=X3(r()?.text??"");return i.trim()?Us(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=$T();return w(i,h(fs,{get fallback(){return(()=>{var s=Rf();return w(s,()=>E("common.loading")),s})()},get children(){return[(()=>{var s=MT(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,h(Ls,{get items(){return[{label:E("breadcrumb.specList"),href:Ft("")},{label:e.id,href:Ft(`specs/${e.id}`)},{label:E("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||E("common.pendingAgent")),w(c,h(Cs,{})),s})(),(()=>{var s=LT();return w(s,h(Y,{get when(){return r.loading},get fallback(){return h(Y,{get when(){return o()},get fallback(){return(()=>{var a=FT();return w(a,()=>E("specDebug.empty")),a})()},get children(){var a=PT();return pe(()=>a.innerHTML=o()),a}})},get children(){var a=Rf();return w(a,()=>E("common.loading")),a}})),s})()]}})),i})()};function If(){return{text:"",nextOffset:0,truncated:!1}}function zT(e){return{text:e.text,nextOffset:e.offset+Iu(e.text),truncated:e.truncated}}function UT(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+Iu(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+Iu(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function Nf(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function Iu(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}var KT=B('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),qT=B("<p class=text-muted-foreground>"),HT=B('<span class="text-xs text-muted-foreground">: '),jT=B('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),GT=B('<p class="m-0 mt-2 text-xs text-muted-foreground">'),VT=B('<p class="m-0 mt-2 text-xs text-destructive">'),WT=B('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const YT=80,ZT=96,Mf=4e5,XT=()=>{const e=ui(),t=vo(),[n,{mutate:r}]=Gt(()=>[t(),e.runId],async([k,A])=>k&&A?Ce.getCommandRun(k,A):null),[o,i]=$(If()),[s,a]=$(null),[u,c]=$(!1),[l,d]=$(Date.now());let f,g=!0,p=null,b=null,m=!1;const y=setInterval(()=>d(Date.now()),1e3);ne(()=>clearInterval(y));function v(k){p=Nf(k,Mf),b===null&&(b=window.setTimeout(()=>{b=null,p&&(i(p),p=null,g&&f&&(f.scrollTop=f.scrollHeight))},YT))}ne(()=>{b!==null&&window.clearTimeout(b)});async function x(k,A){if(!m){m=!0;try{const _=await Ce.readCommandOutput(k,A),T=Nf(zT(_),Mf);p=null,i(T),a(null),f&&(f.scrollTop=f.scrollHeight)}catch(_){a(_.message)}finally{m=!1}}}J(()=>{const k=t(),A=e.runId;if(!k||!A)return;i(If()),x(k,A);const _=av(k,A,{onOutput:T=>{const M=p??o(),L=UT(M,T);L.needsRefetch?x(k,A):v(L.state)},onRun:T=>r(T),onError:T=>a(T)});ne(_)});function C(){f&&(g=f.scrollHeight-f.scrollTop-f.clientHeight<=ZT)}async function S(){const k=t(),A=n();if(!(!k||!A)){c(!0);try{const _=await Ce.stopCommandRun(k,A.runId);r(_.run),It.success(E("commands.stopped"))}catch(_){It.error(_.message)}finally{c(!1)}}}return(()=>{var k=KT(),A=k.firstChild,_=A.firstChild;return w(A,h(Ae,{as:Tn,get href(){return Ft("")},variant:"ghost",size:"sm",get children(){return[h(A1,{class:"mr-1 h-4 w-4"}),ae(()=>E("commands.back"))]}}),_),w(_,()=>E("commands.detailTitle")),w(k,h(Y,{get when(){return n()},get fallback(){return(()=>{var T=qT();return w(T,()=>s()??E("common.loading")),T})()},children:T=>[(()=>{var M=jT(),L=M.firstChild,P=L.nextSibling,O=P.nextSibling,D=O.firstChild,I=O.nextSibling,N=I.firstChild;return w(M,h(Y,{get when(){return T().status==="running"},get children(){return h(Ae,{variant:"destructive",size:"sm",get disabled(){return u()},onClick:()=>void S(),get children(){return[h(_g,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>ae(()=>!!u())()?E("commands.stopping"):E("commands.stop"))]}})}}),L),w(M,h(ah,{get status(){return T().status}}),L),w(L,()=>T().name),w(P,()=>T().cli),w(O,()=>E("commands.duration"),D),w(O,()=>uh(T().startedAt,T().endedAt,l()),null),w(M,h(Y,{get when(){return T().status!=="running"},get children(){var z=HT(),U=z.firstChild;return w(z,()=>E("commands.exitCode"),U),w(z,()=>T().exitCode??T().signal??"—",null),z}}),I),w(I,()=>E("commands.logFile"),N),w(I,()=>T().logFile,null),M})(),h(Y,{get when(){return o().truncated},get children(){var M=GT();return w(M,()=>E("commands.outputTruncated")),M}}),h(Y,{get when(){return s()},get children(){var M=VT();return w(M,s),M}}),(()=>{var M=WT();M.addEventListener("scroll",C);var L=f;return typeof L=="function"?pr(L,M):f=M,w(M,()=>o().text||E("commands.outputEmpty")),M})()]}),null),k})()};var QT=B('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add <path>');const Gh=()=>(()=>{var e=QT(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>E("welcome.title")),w(r,()=>E("welcome.description")),w(o,()=>E("welcome.addHint"),i),e})();var JT=B('<p class="p-8 text-muted-foreground">');const e6=()=>{const[e]=Gt(()=>Ce.listProjects());return h(Y,{get when(){return!e.loading},get fallback(){return(()=>{var t=JT();return w(t,()=>E("common.loading")),t})()},get children(){return h(Y,{get when(){return(e()??[]).length>0},get fallback(){return h(Gh,{})},get children(){return(()=>{const n=(e()??[])[0];return n?h(Tb,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var Lf=B('<label class="flex flex-col gap-1 font-medium"><span>'),t6=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),n6=B('<p class=" text-muted-foreground">'),r6=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=project-config-agent><span>'),o6=B('<p class=" text-destructive">');const Io=".yorz/specs",i6=e=>{const[t,n]=$("inherit"),[r,o]=$(""),[i,s]=$(""),[a,u]=$(Io),[c,l]=$(Io),[d,f]=$(!1),[g,p]=$(!1),[b,m]=$(null);J(()=>{e.open&&(m(null),f(!0),(async()=>{try{const k=await Ce.getProjectConfig(e.projectId);y(k)}catch(k){m(k.message)}finally{f(!1)}})())});function y(k){n(k.agent.kind),k.agent.kind==="custom"?(o(k.agent.cmd),s(k.agent.args.join(" "))):(o(""),s(""));const A=k.specsDir||Io;u(A),l(A)}function v(k){return k.split(/\s+/).map(A=>A.trim()).filter(Boolean)}function x(){const k=t();if(k==="inherit")return{kind:"inherit"};if(k==="claude")return{kind:"claude"};if(k==="opencode")return{kind:"opencode"};if(k==="codex")return{kind:"codex"};const A=r().trim();return A?{kind:"custom",cmd:A,args:v(i())}:{error:E("projectConfig.cmdRequired")}}function C(k){return E(k==="inherit"?"projectConfig.inheritGlobal":k==="custom"?"projectConfig.custom":k==="codex"?"projectConfig.agentCodex":k==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function S(k){k.preventDefault(),m(null);const A=x();if("error"in A){m(A.error);return}const _=a().trim()||Io;if(_.split(/[\\/]/).some(T=>T==="..")){m(E("projectConfig.invalidPath"));return}p(!0);try{await Ce.updateProjectConfig(e.projectId,{agent:A,specsDir:_});let T=E("projectConfig.saved");_!==c()&&(T+=E("projectConfig.oldSpecsHint")),e.onSaved?.(T),e.onClose()}catch(T){m(T.message)}finally{p(!1)}}return h(on,{get open(){return e.open},onOpenChange:k=>!k&&e.onClose(),get children(){return h($r,{class:"max-w-[480px]",get children(){return[h(Fr,{get children(){return h(Pr,{get children(){return[ae(()=>E("projectConfig.title"))," · ",ae(()=>e.projectName)]}})}}),h(Y,{get when(){return!d()},get fallback(){return(()=>{var k=n6();return w(k,()=>E("common.loading")),k})()},get children(){var k=t6(),A=k.firstChild,_=A.firstChild,T=A.nextSibling,M=T.firstChild,L=M.nextSibling;return k.addEventListener("submit",S),w(_,()=>E("projectConfig.agent")),w(A,()=>["inherit","claude","opencode","codex","custom"].map(P=>(()=>{var O=r6(),D=O.firstChild,I=D.nextSibling;return D.addEventListener("change",()=>n(P)),D.value=P,w(I,()=>C(P)),pe(()=>D.disabled=g()),pe(()=>D.checked=t()===P),O})()),null),w(k,h(Y,{get when(){return t()==="custom"},get children(){return[(()=>{var P=Lf(),O=P.firstChild;return w(O,()=>E("projectConfig.cmd")),w(P,h(Nr,{type:"text",get value(){return r()},onInput:D=>o(D.currentTarget.value),get placeholder(){return E("projectConfig.cmdPlaceholder")},get disabled(){return g()}}),null),P})(),(()=>{var P=Lf(),O=P.firstChild;return w(O,()=>E("projectConfig.args")),w(P,h(Nr,{type:"text",get value(){return i()},onInput:D=>s(D.currentTarget.value),placeholder:"--flag value",get disabled(){return g()}}),null),P})()]}}),T),w(M,()=>E("projectConfig.specsDir")),w(T,h(Nr,{type:"text",get value(){return a()},onInput:P=>u(P.currentTarget.value),placeholder:Io,get disabled(){return g()}}),L),w(L,()=>E("projectConfig.specsDirHint")),w(k,(()=>{var P=ae(()=>!!b());return()=>P()&&(()=>{var O=o6();return w(O,b),O})()})(),null),w(k,h(Br,{get children(){return[h(Ae,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return g()},get children(){return E("common.cancel")}}),h(Ae,{type:"submit",get disabled(){return g()},get children(){return ae(()=>!!g())()?E("common.saving"):E("projectConfig.save")}})]}}),null),k}})]}})}})};var s6=B('<span class=" font-semibold tracking-wide">'),a6=B('<div class="flex items-center gap-1">'),u6=B('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),c6=B('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),l6=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),d6=B("<aside><header></header><footer>"),f6=B('<p class="px-2.5 py-2 text-muted-foreground">'),g6=B('<span class="block truncate">'),p6=B('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),h6=B('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),m6=B('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),b6=B('<li class="group relative flex items-center">'),y6=B('<span class="inline-block font-semibold">'),v6=B('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),x6=B('<p class="mt-1 text-sm text-destructive break-words">'),w6=B('<p class="break-all font-semibold">');const Vh="yorz.projectsSidebar.collapsed",Wh="yorz.projectsSidebar.width",Tc=220,_6=.2,E6=160,k6=640;function C6(){try{return typeof window<"u"&&window.localStorage.getItem(Vh)==="1"}catch{return!1}}function S6(e){try{typeof window<"u"&&window.localStorage.setItem(Vh,e?"1":"0")}catch{}}function Ks(e){return Number.isFinite(e)?Math.min(k6,Math.max(E6,Math.round(e))):Tc}function ou(){return typeof window>"u"?Tc:Ks(window.innerWidth*_6)}function A6(){try{if(typeof window>"u")return Tc;const e=window.localStorage.getItem(Wh);if(!e)return ou();const t=Number(e);return Number.isFinite(t)?Ks(t):ou()}catch{return ou()}}function T6(e){try{typeof window<"u"&&window.localStorage.setItem(Wh,String(Ks(e)))}catch{}}function $f(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}const D6=()=>{const[e,t]=$(C6()),[n,r]=$(A6()),[o,{refetch:i}]=Gt(()=>Ce.listProjects()),[s,a]=$(null),[u,c]=$(null),[l,d]=$(null),[f,g]=$(!1),[p,b]=$(!1),m=ai(),y=hs(),v=ie(()=>{const I=y.pathname.match(/^\/([^/]+)/);return I&&I[1]!=="api"?I[1]:""}),x=()=>e()||lr();function C(){if(lr()){Xi();return}const I=!e();t(I),S6(I)}let S=null,k=null,A=null;pn(()=>{const I=Ag(()=>{i()});ne(I)});function _(I){x()||(I.preventDefault(),S={startX:I.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),k=N=>{if(!S)return;const z=N.clientX-S.startX,U=Ks(S.startW+z);S.raf==null&&(S.raf=requestAnimationFrame(()=>{S&&(S.raf=null,r(U))}))},A=()=>{S?.raf!=null&&cancelAnimationFrame(S.raf),S=null,document.body.classList.remove("is-resizing"),k&&document.removeEventListener("mousemove",k),A&&document.removeEventListener("mouseup",A),k=null,A=null,T6(n())},document.addEventListener("mousemove",k),document.addEventListener("mouseup",A))}ne(()=>{k&&document.removeEventListener("mousemove",k),A&&document.removeEventListener("mouseup",A),document.body.classList.remove("is-resizing")});function T(I,N){N.preventDefault(),N.stopPropagation(),c(I)}function M(I,N="success"){N==="error"?It.error(I):It.success(I)}function L(I,N){N.preventDefault(),N.stopPropagation(),g(!1),d(I)}async function P(){const I=l();if(I){b(!0);try{f()&&I.worktree?await Ce.removeProjectWithFiles(I.id):await Ce.removeProject(I.id),await i(),v()===I.id&&m("/"),d(null)}catch(N){const z=N.message;z.includes("409")?(It.error(E("sidebar.uncommittedChanges")),d(null)):(a(z),It.error(z))}finally{b(!1)}}}function O(){i()}const D=()=>x()?void 0:{width:`${n()}px`};return(()=>{var I=d6(),N=I.firstChild,z=N.nextSibling;return w(N,h(Y,{get when(){return!x()},get fallback(){return h(Ae,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:C,get title(){return E("sidebar.expand")},get children(){return h(wg,{class:"h-4 w-4"})}})},get children(){return[(()=>{var U=s6();return w(U,()=>E("sidebar.title")),U})(),(()=>{var U=a6();return w(U,h(Ae,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:O,get disabled(){return o.loading},get title(){return E("sidebar.refreshList")},get children(){return h(Oy,{get class(){return`h-3.5 w-3.5 ${o.loading?"animate-spin":""}`}})}}),null),w(U,h(Ae,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:C,get title(){return E("sidebar.collapse")},get children(){return h(xg,{class:"h-4 w-4"})}}),null),U})()]}})),w(I,h(Y,{get when(){return o()!==void 0},get fallback(){return(()=>{var U=f6();return w(U,()=>E("common.loading")),U})()},get children(){var U=u6();return w(U,h(lt,{get each(){return o()??[]},children:K=>{const F=()=>v()===K.id;return(()=>{var X=b6();return w(X,h(Tn,{get href(){return`/${encodeURIComponent(K.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${F()?"bg-accent text-accent-foreground font-semibold":"hover:bg-muted"} ${x()?"px-0 text-center":""}`},get title(){return K.path},get children(){return h(Y,{get when(){return!x()},get fallback(){return(()=>{var j=y6();return w(j,()=>(K.name[0]??"?").toUpperCase()),j})()},get children(){return[(()=>{var j=g6();return w(j,()=>$f(K)),j})(),h(Y,{get when(){return K.worktree},get children(){var j=p6();return w(j,h(J1,{class:"h-3 w-3"}),null),w(j,()=>E("sidebar.worktreeBadge"),null),pe(()=>je(j,"title",`worktree of ${K.worktree.mainPath}`)),j}})]}})}}),null),w(X,h(Y,{get when(){return!x()},get children(){return[(()=>{var j=h6();return j.$$click=Q=>T(K,Q),w(j,h(Cy,{class:"h-3.5 w-3.5"})),pe(Q=>{var V=E("sidebar.configure",{name:K.name}),q=E("sidebar.projectConfig");return V!==Q.e&&je(j,"aria-label",Q.e=V),q!==Q.t&&je(j,"title",Q.t=q),Q},{e:void 0,t:void 0}),j})(),(()=>{var j=m6();return j.$$click=Q=>void L(K,Q),w(j,h(Kr,{class:"h-3.5 w-3.5"})),pe(Q=>{var V=E("sidebar.removeProject",{name:K.name}),q=E("sidebar.deleteProject");return V!==Q.e&&je(j,"aria-label",Q.e=V),q!==Q.t&&je(j,"title",Q.t=q),Q},{e:void 0,t:void 0}),j})()]}}),null),X})()}})),U}}),z),w(z,h(Y,{get when(){return!x()},get fallback(){return(()=>{var U=v6();return w(U,h(H1,{class:"h-3.5 w-3.5"})),pe(()=>je(U,"title",`${E("sidebar.addHint")}${E("sidebar.addCmd")}`)),U})()},get children(){var U=c6(),K=U.firstChild;return w(U,()=>E("sidebar.addHint"),K),w(K,()=>E("sidebar.addCmd")),U}}),null),w(z,(()=>{var U=ae(()=>!!s());return()=>U()&&(()=>{var K=x6();return w(K,s),pe(()=>je(K,"title",s())),K})()})(),null),w(I,h(Y,{get when(){return!x()},get children(){var U=l6();return U.$$mousedown=_,pe(()=>je(U,"aria-label",E("sidebar.resizeHint"))),U}}),null),w(I,h(Y,{get when(){return u()},children:U=>h(i6,{open:!0,get projectId(){return U().id},get projectName(){return U().name},onClose:()=>c(null),onSaved:K=>M(K)})}),null),w(I,h(on,{get open(){return l()!==null},onOpenChange:U=>!U&&!p()&&d(null),get children(){return h($r,{class:"max-w-sm",get children(){return[h(Fr,{get children(){return[h(Pr,{get children(){return E("sidebar.deleteProject")}}),h(dc,{get children(){return E("sidebar.deleteDesc")}})]}}),h(Y,{get when(){return l()},children:U=>[(()=>{var K=w6();return w(K,()=>$f(U())),K})(),h(Y,{get when(){return U().worktree},get children(){return h(rs,{get checked(){return f()},onChange:K=>g(K),class:"flex items-center gap-2 text-destructive",get children(){return[h(os,{}),h(ns,{get children(){return E("sidebar.deleteFiles")}})]}})}})]}),h(Br,{get children(){return[h(Ae,{variant:"outline",onClick:()=>d(null),get disabled(){return p()},get children(){return E("common.cancel")}}),h(Ae,{variant:"destructive",onClick:()=>void P(),get disabled(){return p()},get children(){return ae(()=>!!p())()?E("common.deleting"):E("common.confirmDelete")}})]}})]}})}}),null),pe(U=>{var K=`relative flex flex-col border-r bg-card shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,F=D(),X=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,j=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return K!==U.e&&Nt(I,U.e=K),U.t=gs(I,F,U.t),X!==U.a&&Nt(N,U.a=X),j!==U.o&&Nt(z,U.o=j),U},{e:void 0,t:void 0,a:void 0,o:void 0}),I})()};an(["mousedown","click"]);var O6=["second","minute","hour","day","week","month","year"];function R6(e,t){if(t===0)return["just now","right now"];var n=O6[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var I6=["秒","分钟","小时","天","周","个月","年"];function N6(e,t){if(t===0)return["刚刚","片刻后"];var n=I6[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Nu={},qs=function(e,t){Nu[e]=t},M6=function(e){return Nu[e]||Nu.en_US},iu=[60,60,24,7,365/7/12,12];function L6(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function $6(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=iu[o]&&o<iu.length;o++)e/=iu[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function P6(e,t){var n=new Date;return(+n-+L6(e))/1e3}var F6=function(e,t,n){var r=P6(e);return $6(r,M6(t))};qs("en_US",R6);qs("zh_CN",N6);var Fi={},Pf;function B6(){if(Pf)return Fi;Pf=1,Object.defineProperty(Fi,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Fi.default=t,Fi}var z6=B6();const U6=Ac(z6),Ff=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function K6(e,t){return Ff[t]??Ff[0]}const q6=`
|
|
27
|
+
|
|
28
|
+
`;function H6(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function j6(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=H6(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:q6+i.text}:i),r=!0}else t.push(i)}}return t}function G6(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function V6(e){const t=[];let n=null;const r=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const o of e){if(o.kind==="context"){n=null;const a=t[t.length-1];a?.kind==="context"?a.contexts.push(o):t.push({kind:"context",contexts:[o]});continue}if(o.kind==="text"&&o.role==="user"){n=null;const a=t[t.length-1];a?.kind==="user"?a.text+=o.text:t.push({kind:"user",text:o.text});continue}const i=r(),s=i.segments[i.segments.length-1];if(o.kind==="text"){s?.kind==="text"?s.text+=o.text:i.segments.push({kind:"text",text:o.text});continue}s?.kind==="tools"?o.result!==void 0&&o.name===void 0?G6(s.tools,o.result):s.tools.push({...o}):i.segments.push({kind:"tools",tools:[{...o}]})}return t.filter(o=>o.kind!=="assistant"||o.segments.length>0)}var W6=B("<div>");const Y6=e=>{const[t,n]=ue(e,["class"]);return(()=>{var r=W6();return Vn(r,H({get class(){return ut("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},Dc=Ms;Ms.Trigger;const Oc=e=>{const[t,n]=ue(e,["class"]);return h(Ms.Content,H({get class(){return ut("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var Z6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),X6=B('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),Q6=B('<div class="font-mono text-xs font-semibold">'),J6=B('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),eD=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),tD=B("<div class=space-y-1>");const nD=e=>{const[t,n]=$(!1);return h(Dc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=Z6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,h(Bu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>E("chat.toolCollapsed",{count:e.tools.length})),r})(),h(Oc,{get children(){var r=X6();return w(r,h(lt,{get each(){return e.tools},children:o=>(()=>{var i=tD();return w(i,h(Y,{get when(){return o.name},get children(){var s=Q6();return w(s,()=>o.name),s}}),null),w(i,h(Y,{get when(){return o.input!==void 0},get children(){var s=J6();return w(s,()=>rD(o.input)),s}}),null),w(i,h(Y,{get when(){return o.result!==void 0},get children(){var s=eD();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function rD(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}an(["click"]);var oD=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),iD=B('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),sD=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const aD=e=>{const[t,n]=$(!1);return h(Dc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=oD(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,h(Bu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>E("chat.agentContextCollapsed",{count:e.contexts.length})),pe(()=>je(r,"title",E("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),h(Oc,{get children(){var r=iD();return w(r,h(lt,{get each(){return e.contexts},children:o=>(()=>{var i=sD();return w(i,()=>o.text),i})()})),r}})]}})};an(["click"]);bn.Description;bn.ErrorMessage;bn.ItemDescription;const uD=bn.ItemInput,cD=bn.ItemLabel;bn.Label;const lD=bn,dD=bn.Item,fD=e=>{const[t,n]=ue(e,["class"]);return h(bn.ItemControl,H({get class(){return ut("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return h(bn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var gD=B('<span class="font-semibold tracking-wide">'),Bf=B("<span>"),pD=B('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),hD=B('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),mD=B("<div class=mb-1.5>"),bD=B('<p class="mb-1 text-xs text-destructive">'),yD=B('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto m-2 mt-0"></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),vD=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),xD=B("<aside><header>"),wD=B('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),_D=B('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),ED=B("<p class=text-muted-foreground>"),kD=B('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),CD=B('<div class="mb-2 min-w-0 rounded bg-muted px-2 py-1.5 [overflow-wrap:anywhere]">'),SD=B('<div class="markdown chat-md">');const su="yorz.layout.col2.collapsed",Mu="yorz.layout.col2.width",zf="yorz.chat.sessionList.collapsed",Yh="yorz.chat.sessionList.rows",AD="yorz.chat.sessionList.limit",TD="yorz.chat.sessionList.showHistory",Zh=[3,5,10],DD=28,Rc=340,OD=.4,Xh=260,RD=960,ID=.8,ND=96,MD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,LD=1500,$D=80;function PD(e){return new Promise(t=>setTimeout(t,e))}qs("en",K6);qs("zh-CN",U6);function FD(){return typeof window>"u"?RD:Math.max(Xh,Math.round(window.innerWidth*ID))}function as(e){return Number.isFinite(e)?Math.min(FD(),Math.max(Xh,Math.round(e))):Rc}function au(){return typeof window>"u"?Rc:as(window.innerWidth*OD)}function Uf(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function BD(){try{if(typeof window>"u")return Rc;const e=window.localStorage.getItem(Mu);if(!e)return au();const t=Number(e);return Number.isFinite(t)?as(t):au()}catch{return au()}}function Uo(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function ro(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Lu(e){return Zh.includes(e)}function zD(){const e=Number(Uo(Yh,""));if(Lu(e))return e;const t=Number(Uo(AD,""));return Lu(t)?t:Uo(TD,"0")==="1"?10:3}const UD=()=>{let e,t;const{lng:n}=ep(),r=lh({projectId:()=>kt()||""}),[o,i]=$(Uo(su,"0")==="1"),[s,a]=$(BD()),[u,c]=$(Uo(zf,"0")!=="1"),[l,d]=$(zD()),[f,g]=$(""),[p,b]=$([]),m=ie(()=>V6(p())),[y,v]=$(""),[x,C]=$(!0),[S,k]=$(Date.now()),[A,_]=$(!1),[T,M]=$({}),L=new Set,[P,O]=$(0);let D="";const I=new Map;function N(G){let re=I.get(G);if(!re){let ve=()=>{};re={promise:new Promise($e=>{ve=$e}),resolve:ve},I.set(G,re)}return re.promise}function z(G){N(G),I.get(G)?.resolve()}function U(G){L.delete(G)&&O(re=>re+1)}const[K,{refetch:F}]=Gt(()=>kt()||void 0,G=>Ce.listSessions(G));J(()=>{const G=K();if(!G)return;const re=f();let ve=!1;for(const we of G)!we.running&&L.delete(we.id)&&we.id===re&&(ve=!0);ve&&O(we=>we+1),M(we=>{const $e={};for(const We of G)$e[We.id]=!!We.running;return re&&!(re in $e)&&we[re]===!0&&($e[re]=!0),$e})}),J(dt(kt,()=>{g(""),M({}),jt(),D="",_(!1),L.clear(),O(G=>G+1),I.clear(),r.reset()})),J(()=>{const G=kt();if(!G)return;const re=Cg(G,{onStatus:ve=>{M(we=>({...we,[ve.sessionId]:ve.running})),ve.running||F()}});ne(re)});const X=G=>T()[G]===!0,j=ie(()=>{const G=f();return G?X(G):!1}),Q=ie(()=>(K()??[]).filter(G=>X(G.id)).length),V=ie(()=>K()??[]);function q(G){!G||G===f()||(g(G),F())}J(()=>{const G=Qy();G&&(Jy(),q(G),o()&&(i(!1),ro(su,"0")))});const ee=()=>o()||lr();function he(){if(lr()){Xi();return}const G=!o();i(G),ro(su,G?"1":"0")}function te(G){c(G),ro(zf,G?"0":"1")}function xe(G){const re=Number(G);Lu(re)&&(d(re),ro(Yh,String(re)))}function Oe(G){return E(G===3?"chat.sessionListRows3":G===5?"chat.sessionListRows5":"chat.sessionListRows10")}function Fe(G){const re=G.title.trim();return re&&re!==G.id&&!MD.test(re)?re:G.id}pn(()=>{const G=()=>{const re=as(s());re!==s()&&(a(re),ro(Mu,String(re)))};window.addEventListener("resize",G),ne(()=>window.removeEventListener("resize",G))}),pn(()=>{const G=window.setInterval(()=>k(Date.now()),6e4);ne(()=>window.clearInterval(G))});let ze=null,rt=null,Qe=null;function Bt(G){ee()||(G.preventDefault(),ze={startX:G.clientX,startW:s(),raf:null},document.body.classList.add("is-resizing"),rt=re=>{if(!ze)return;const ve=as(ze.startW+(re.clientX-ze.startX));ze.raf==null&&(ze.raf=requestAnimationFrame(()=>{ze&&(ze.raf=null,a(ve))}))},Qe=()=>{ze?.raf!=null&&cancelAnimationFrame(ze.raf),ze=null,document.body.classList.remove("is-resizing"),rt&&document.removeEventListener("mousemove",rt),Qe&&document.removeEventListener("mouseup",Qe),rt=null,Qe=null,ro(Mu,String(s()))},document.addEventListener("mousemove",rt),document.addEventListener("mouseup",Qe))}ne(()=>{rt&&document.removeEventListener("mousemove",rt),Qe&&document.removeEventListener("mouseup",Qe),document.body.classList.remove("is-resizing")}),J(()=>{const G=kt(),re=f();if(P(),!G||!re)return;let ve=!1;C(!0),L.has(re)?D!==re&&(jt(),D=re):(D=re,jt(),Ce.getSessionMessages(G,re).then($e=>{ve||jt(j6($e))}).catch(()=>{}));const we=ws(G,re,{onReady:()=>z(re),onEvent:$e=>{$e.type==="text"?Dt($e.delta):$e.type==="tool-use"?Ht({kind:"tool",name:$e.name,input:$e.input}):$e.type==="tool-result"?Ht({kind:"tool",result:$e.text}):$e.type==="turn-completed"?(bt(),U(re),M(We=>({...We,[re]:!1}))):$e.type==="error"?(tn(`
|
|
29
|
+
${E("chat.errorMessage",{message:$e.message})}
|
|
30
|
+
`),M(We=>({...We,[re]:!1}))):$e.type==="session-started"&&$e.sessionId!==re&&(L.has(re)&&L.add($e.sessionId),D===re&&(D=$e.sessionId),M(We=>({...We,[re]:!1,[$e.sessionId]:!0})),g($e.sessionId),F())}});ne(()=>{ve=!0,I.delete(re),we()})}),J(()=>{p(),x()&&requestAnimationFrame(Re)});function de(G){return G.scrollHeight-G.scrollTop-G.clientHeight<=ND}function Re(){e&&(e.scrollTop=e.scrollHeight)}function Ge(){e&&C(de(e))}function mt(G){return S(),!Number.isFinite(G)||G<=0?"":F6(G,n())}function Kt(G){return!Number.isFinite(G)||G<=0?"":new Date(G).toLocaleString(n())}async function Tt(G){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(G),It.success(E("chat.filePathCopied"))}catch{It.error(E("chat.filePathCopyFailed"))}}function en(G){const re=Uf(G.target);if(!re||e&&!e.contains(re))return;const ve=re.dataset.filePath;ve&&(G.preventDefault(),Tt(ve))}function qt(G){if(G.key!=="Enter"&&G.key!==" ")return;const re=Uf(G.target);if(!re||e&&!e.contains(re))return;const ve=re.dataset.filePath;ve&&(G.preventDefault(),Tt(ve))}let _t="",Ie=null;function Ve(G,re){const ve=G[G.length-1];return ve&&ve.kind==="text"&&ve.role==="assistant"?[...G.slice(0,-1),{...ve,text:ve.text+re}]:[...G,{kind:"text",role:"assistant",text:re}]}function bt(){Ie!=null&&(clearTimeout(Ie),Ie=null);const G=_t;_t="",G&&b(re=>Ve(re,G))}function Dt(G){_t+=G,Ie==null&&(Ie=window.setTimeout(bt,$D))}function tn(G){bt(),b(re=>Ve(re,G))}function Ht(G){bt(),b(re=>[...re,G])}function jt(G=[]){Ie!=null&&(clearTimeout(Ie),Ie=null),_t="",b(re=>G.length===0&&re.length===0?re:G)}ne(()=>{Ie!=null&&clearTimeout(Ie)});function Jn(){!kt()||!f()||(g(""),jt(),D="",C(!0),r.reset())}async function nn(){const G=kt(),re=f(),ve=y().trim();if(!G||!ve||A()||j()||r.hasPending())return;if(v(""),C(!0),!re){await Ln(G,ve);return}const we=r.draftId()??void 0;Ht({kind:"text",role:"user",text:ve}),M($e=>({...$e,[re]:!0}));try{await Ce.sendSessionMessage(G,re,ve,we),r.reset()}catch($e){tn(`
|
|
31
|
+
${E("chat.errorMessage",{message:$e.message})}
|
|
32
|
+
`),M(We=>({...We,[re]:!1}))}}async function Ln(G,re){_(!0);try{let ve;try{ve=(await Ce.createSession(G,{})).sessionId}catch(We){v(re),tn(`
|
|
33
|
+
${E("chat.errorMessage",{message:We.message})}
|
|
34
|
+
`);return}L.add(ve);const we=r.draftId()??void 0,$e=N(ve);jt([{kind:"text",role:"user",text:re}]),D=ve,M(We=>({...We,[ve]:!0})),g(ve),await Promise.race([$e,PD(LD)]);try{await Ce.sendSessionMessage(G,ve,re,we),r.reset()}catch(We){tn(`
|
|
35
|
+
${E("chat.errorMessage",{message:We.message})}
|
|
36
|
+
`),M(Ot=>({...Ot,[ve]:!1}))}F()}finally{_(!1)}}async function er(){const G=kt(),re=f();!G||!re||(await Ce.abortSession(G,re).catch(()=>{}),M(ve=>({...ve,[re]:!1})))}function Co(G){G.defaultPrevented||G.isComposing||G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),nn())}return(()=>{var G=xD(),re=G.firstChild;return w(re,h(Y,{get when(){return!ee()},get fallback(){return h(Ae,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:he,get title(){return E("chat.expand")},get children(){return h(wg,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ve=gD();return w(ve,()=>E("chat.title")),ve})(),h(Ae,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:he,get title(){return E("chat.collapse")},get children(){return h(xg,{class:"h-4 w-4"})}})]}})),w(G,h(Y,{get when(){return!ee()},get children(){var ve=yD(),we=ve.firstChild,$e=we.nextSibling,We=$e.firstChild,Ot=We.firstChild,R=We.nextSibling;w(ve,h(Y,{get when(){return kt()},get children(){return h(Y6,{class:"m-2 rounded-lg shadow-none",get children(){return h(Dc,{get open(){return u()},onOpenChange:te,get children(){return[(()=>{var me=pD(),Se=me.firstChild,Ze=Se.nextSibling;return Se.$$click=()=>te(!u()),w(Se,h(Y,{get when(){return Q()>0},get fallback(){return(()=>{var se=Bf();return w(se,()=>E("chat.sessionsLabelPlain")),se})()},get children(){var se=Bf();return w(se,()=>E("chat.sessionsLabel",{count:Q()})),se}})),w(me,h(lD,{class:"flex shrink-0 items-center gap-2",get value(){return String(l())},onChange:xe,get"aria-label"(){return E("chat.sessionListRows")},get children(){return h(lt,{each:Zh,children:se=>h(dD,{get value(){return String(se)},class:"flex items-center gap-1",get children(){return[h(uD,{}),h(fD,{class:"h-3 w-3"}),h(cD,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return Oe(se)}})]}})})}}),Ze),Ze.$$click=()=>te(!u()),w(Ze,h(Bu,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${u()?"":"-rotate-90"}`}})),pe(se=>{var le=u()?E("chat.collapseSessions"):E("chat.expandSessions"),De=u()?E("chat.collapseSessions"):E("chat.expandSessions");return le!==se.e&&je(Se,"title",se.e=le),De!==se.t&&je(Ze,"title",se.t=De),se},{e:void 0,t:void 0}),me})(),h(Oc,{get children(){var me=hD();return w(me,h(Y,{get when(){return V().length>0},get fallback(){return(()=>{var Se=wD();return w(Se,()=>E("chat.noRunningSessions")),Se})()},get children(){return h(lt,{get each(){return V()},children:Se=>(()=>{var Ze=_D(),se=Ze.firstChild,le=se.firstChild,De=le.firstChild,gt=De.nextSibling;gt.nextSibling;var ct=le.nextSibling,tr=ct.nextSibling;return se.$$click=()=>q(Se.id),w(se,h(Y,{get when(){return X(Se.id)},get children(){return h(qn,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),le),w(le,()=>Se.kind,gt),w(ct,()=>Fe(Se)),w(tr,()=>mt(Se.updatedAt)),pe(ln=>{var Vr=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${f()===Se.id?"bg-background font-semibold":"hover:bg-background"}`,bi=X(Se.id)?E("chat.sessionTitleRunning",{kind:Se.kind,id:Se.id}):E("chat.sessionTitle",{kind:Se.kind,id:Se.id}),Wr=Kt(Se.updatedAt);return Vr!==ln.e&&Nt(se,ln.e=Vr),bi!==ln.t&&je(se,"title",ln.t=bi),Wr!==ln.a&&je(tr,"title",ln.a=Wr),ln},{e:void 0,t:void 0,a:void 0}),Ze})()})}})),pe(Se=>Ho(me,"max-height",`${l()*DD+4}px`)),me}})]}})}})}}),we),we.addEventListener("scroll",Ge),we.$$keydown=qt,we.$$click=en;var W=e;typeof W=="function"?pr(W,we):e=we,w(we,h(Y,{get when(){return m().length>0},get fallback(){return(()=>{var me=ED();return w(me,(()=>{var Se=ae(()=>!!f());return()=>Se()?E("chat.empty"):E("chat.draftEmpty")})()),me})()},get children(){return h(lt,{get each(){return m()},children:me=>h(Y,{get when(){return me.kind==="context"?me:null},get fallback(){return h(Y,{get when(){return me.kind==="assistant"?me:null},get fallback(){return(()=>{var Se=kD();return w(Se,()=>me.text),Se})()},children:Se=>(()=>{var Ze=CD();return w(Ze,h(lt,{get each(){return Se().segments},children:se=>h(Y,{get when(){return se.kind==="tools"?se:null},get fallback(){return(()=>{var le=SD();return pe(()=>le.innerHTML=Us(se.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:E("chat.copyFilePath")})),le})()},children:le=>h(nD,{get tools(){return le().tools}})})})),Ze})()})},children:Se=>h(aD,{get contexts(){return Se().contexts}})})})}})),w($e,h(Y,{get when(){return r.count()>0},get children(){var me=mD();return w(me,h(gh,{ctrl:r,compact:!0})),me}}),We),w($e,h(Y,{get when(){return r.error()},get children(){var me=bD();return w(me,()=>r.error()),me}}),We),w(We,h(dh,{get projectId(){return kt()||""},get value(){return y()},onValueChange:v,onKeyDown:Co,get onPaste(){return r.onPaste},get placeholder(){return ae(()=>!kt())()?E("chat.noSessionPlaceholder"):ae(()=>!!f())()?E("chat.inputPlaceholder"):E("chat.draftPlaceholder")},get disabled(){return!kt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),Ot),w(We,h(Ae,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!kt()||r.count()>=fo},get title(){return E("newSpec.importAttachment")},get children(){return h(_y,{class:"h-4 w-4"})}}),Ot),Hi(Ot,"change",r.onFileInputChange);var ce=t;return typeof ce=="function"?pr(ce,Ot):t=Ot,je(Ot,"accept",ch),w(R,h(Ae,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:Jn,get disabled(){return!kt()||!f()},get title(){return E("chat.newSession")},get children(){return h(bs,{class:"h-4 w-4"})}}),null),w(R,h(Y,{get when(){return j()},get fallback(){return h(Ae,{size:"sm",onClick:()=>void nn(),get disabled(){return!kt()||!y().trim()||A()||r.hasPending()},get children(){return[h(ys,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>E("chat.send"))]}})},get children(){return h(Ae,{variant:"outline",size:"sm",onClick:()=>void er(),get title(){return E("chat.abort")},get children(){return[h(_g,{class:"mr-1 h-3.5 w-3.5"}),ae(()=>E("chat.abort"))]}})}}),null),ve}}),null),w(G,h(Y,{get when(){return!ee()},get children(){var ve=vD();return ve.$$mousedown=Bt,ve}}),null),pe(ve=>{var we=`relative flex flex-col border-r bg-card text-base shrink-0 ${ee()?"w-9 transition-[width] duration-150":""}`,$e=ee()?void 0:{width:`${s()}px`},We=`flex items-center border-b ${ee()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return we!==ve.e&&Nt(G,ve.e=we),ve.t=gs(G,$e,ve.t),We!==ve.a&&Nt(re,ve.a=We),ve},{e:void 0,t:void 0,a:void 0}),G})()};an(["click","keydown","mousedown"]);var KD=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2">'),qD=B("<p class=text-muted-foreground>"),HD=B('<label class="flex cursor-pointer items-center gap-1.5"><input type=radio name=global-config-agent-default><span>'),jD=B("<p class=text-destructive>");const GD={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}}},VD=e=>{const[t,n]=$("claude"),[r,o]=$(!1),[i,s]=$(!1),[a,u]=$(!1),[c,l]=$(!1),[d,f]=$(null);J(()=>{e.open&&(f(null),u(!0),(async()=>{try{g(await Ce.getGlobalConfig())}catch(m){f(m.message),g(GD)}finally{u(!1)}})())});function g(m){n(m.agent.defaultKind),o(!!m.notifications.sessionEnd.banner),s(!!m.notifications.sessionEnd.sound)}async function p(m){m.preventDefault(),f(null),l(!0);try{await Ce.updateGlobalConfig({agent:{defaultKind:t()},notifications:{sessionEnd:{banner:r(),sound:i()}}}),e.onSaved?.(E("globalConfig.saved")),e.onClose()}catch(y){f(y.message)}finally{l(!1)}}function b(m){return E(m==="codex"?"projectConfig.agentCodex":m==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}return h(on,{get open(){return e.open},onOpenChange:m=>!m&&e.onClose(),get children(){return h($r,{class:"max-w-[440px]",get children(){return[h(Fr,{get children(){return h(Pr,{get children(){return E("globalConfig.title")}})}}),h(Y,{get when(){return!a()},get fallback(){return(()=>{var m=qD();return w(m,()=>E("common.loading")),m})()},get children(){var m=KD(),y=m.firstChild,v=y.firstChild,x=y.nextSibling,C=x.firstChild,S=C.nextSibling;return m.addEventListener("submit",k=>void p(k)),w(v,()=>E("globalConfig.agentDefault")),w(y,()=>["claude","opencode","codex"].map(k=>(()=>{var A=HD(),_=A.firstChild,T=_.nextSibling;return _.addEventListener("change",()=>n(k)),_.value=k,w(T,()=>b(k)),pe(()=>_.disabled=c()),pe(()=>_.checked=t()===k),A})()),null),w(C,()=>E("globalConfig.sessionEnd")),w(S,h(rs,{get checked(){return r()},onChange:k=>o(k),get disabled(){return c()},class:"flex items-center gap-2",get children(){return[h(os,{}),h(ns,{get children(){return E("globalConfig.banner")}})]}}),null),w(S,h(rs,{get checked(){return i()},onChange:k=>s(k),get disabled(){return c()},class:"flex items-center gap-2",get children(){return[h(os,{}),h(ns,{get children(){return E("globalConfig.sound")}})]}}),null),w(m,(()=>{var k=ae(()=>!!d());return()=>k()&&(()=>{var A=jD();return w(A,d),A})()})(),null),w(m,h(Br,{get children(){return[h(Ae,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return c()},get children(){return E("common.cancel")}}),h(Ae,{type:"submit",get disabled(){return c()},get children(){return ae(()=>!!c())()?E("common.saving"):E("globalConfig.save")}})]}}),null),m}})]}})}})};var WD=B('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const YD=e=>{const t=hs(),{lng:n,changeLanguage:r}=ep(),[o,i]=$(!1),s=ie(()=>t.pathname===Ft("specs/new"));function a(u){u!==n()&&(r(u),window.location.reload())}return J(()=>{const u=t.pathname.match(/^\/([^/]+)/);ev(u&&u[1]!=="api"?u[1]:"")}),(()=>{var u=WD(),c=u.firstChild,l=c.firstChild,d=c.nextSibling,f=d.firstChild;return w(c,h(Tn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),l),w(l,h(Y,{get when(){return kt()},get children(){return h(Ae,{as:Tn,get href(){return Ft("specs/new")},get target(){return s()?"_blank":void 0},get rel(){return s()?"noopener":void 0},variant:"default",size:"sm",get children(){return[h(bs,{class:"mr-1 h-4 w-4"}),ae(()=>E("shell.newSpec"))]}})}}),null),w(l,h(cc,{placement:"bottom-end",get children(){return[h(uc,{as:Ae,variant:"ghost",size:"icon",get title(){return E("shell.settingsMenu")},get children(){return h(my,{class:"h-4 w-4"})}}),h(lc,{get children(){return[h(Dr,{class:"font-medium text-muted-foreground",disabled:!0,get children(){return[h(uy,{class:"mr-2 h-4 w-4"}),ae(()=>E("shell.languageSwitch"))]}}),h(Dr,{onSelect:()=>a("zh-CN"),get children(){return[h(fl,{get class(){return`mr-2 h-4 w-4 ${n()==="zh-CN"?"opacity-100":"opacity-0"}`}}),ae(()=>E("shell.langZh"))]}}),h(Dr,{onSelect:()=>a("en"),get children(){return[h(fl,{get class(){return`mr-2 h-4 w-4 ${n()==="en"?"opacity-100":"opacity-0"}`}}),ae(()=>E("shell.langEn"))]}}),h(Jp,{}),h(Dr,{onSelect:()=>i(!0),get children(){return[h(Ly,{class:"mr-2 h-4 w-4"}),ae(()=>E("shell.globalConfig"))]}})]}})]}}),null),w(d,h(D6,{}),f),w(d,h(UD,{}),f),w(f,()=>e.children),w(u,h(O2,{position:"top-center"}),null),w(u,h(VD,{get open(){return o()},onClose:()=>i(!1),onSaved:g=>It.success(g)}),null),u})()},Qh=document.getElementById("app");if(!Qh)throw new Error("missing #app root");Um(()=>h(Sb,{root:YD,get children(){return[h(or,{path:"/",component:e6}),h(or,{path:"/:projectId",component:mE}),h(or,{path:"/:projectId/commands/:runId",component:XT}),h(or,{path:"/:projectId/specs/new",component:ek}),h(or,{path:"/:projectId/specs/:id",component:bT}),h(or,{path:"/:projectId/specs/:id/review",component:IT}),h(or,{path:"/:projectId/specs/:id/debug",component:BT}),h(or,{path:"*",component:Gh})]}}),Qh);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{eA as _,Ac as g};
|