1var e=Object.defineProperty,t=(t,r,n)=>((t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n)(t,"symbol"!=typeof r?r+"":r,n);import{M as r,i as n,s,g as i,u as o,a,r as l,j as c,d,c as h}from"./index-CTUgqakz.js";import{u}from"./usePageMeta-BF1nj4XA.js";import{X as p,C as f}from"./x-CjryHcAq.js";import{c as m}from"./createLucideIcon-BKyP4MVl.js";import{L as g,T as O}from"./triangle-alert-CbMVQsPX.js";import{p as x,f as b,c as v,a as y,r as w,b as S}from"./stripe-C_ghCIsW.js";import{E as k,C as j,R as Q,D as P,a as $,M as _,b as C,c as T}from"./refresh-cw-C-T19hVZ.js";import{M as N,b as E,G as A,F as z,V as Z,I as R,d as X,a as M,S as D,C as L,B as Y,L as I,c as q}from"./sliding-number-CIHt5nee.js";import{Z as V}from"./zap-CoUygG0h.js";import{C as W}from"./chevron-down-D2UVsmfD.js";import{S as B,C as F}from"./star-BYkYb4FC.js";import{P as G}from"./play-DM3T4h-o.js";import{S as U}from"./search-CM2_XDE_.js";import"./proxy--AF1RYhV.js";import"./use-spring-BwIyQN9G.js";import"./use-motion-value-Bin7rNAF.js"; 2/** 3 * @license lucide-react v0.577.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const H=m("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]),K=m("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]),J=m("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),ee=m("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]),te=m("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),re=m("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),ne=m("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]),se=m("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]),ie=m("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]),oe=m("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),ae=m("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),le=m("component",[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]]),ce=m("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),de=m("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),he=m("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),ue=m("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),pe=m("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),fe=m("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),me=m("headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]),ge=m("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Oe=m("infinity",[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]]),xe=m("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),be=m("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]),ve=m("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),ye=m("maximize-2",[["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"}]]),we=m("message-square-warning",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]]),Se=m("minimize-2",[["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"}]]),ke=m("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),je=m("pencil",[["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"}]]),Qe=m("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Pe=m("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]),$e=m("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),_e=m("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
7y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),Ce=m("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),Te=m("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),Ne=m("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]),Ee=m("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),Ae=m("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),ze=m("toggle-right",[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),Ze=m("trash-2",[["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"}]]),Re=m("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Xe=m("upload",[["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"}]]),Me=e=>{let t;const r=new Set,n=(e,n)=>{const s="function"==typeof e?e(t):e;if(!Object.is(s,t)){const e=t;t=(null!=n?n:"object"!=typeof s||null===s)?s:Object.assign({},t,s),r.forEach(r=>r(t,e))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e))},o=t=e(n,s,i);return i},De=e=>e;const Le=e=>{const t=(e=>e?Me(e):Me)(e),n=e=>function(e,t=De){const n=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},Ye="__demo__",Ie=[{id:"demo-hero",name:"Framer Hero",position:0,js:"",html:'<section class="hero_section">\n\n \x3c!-- Ghost block : @keyframes interdits dans le CSS Convertex --\x3e\n <div class="w-embed"><style>\n @keyframes heroScrollUp {\n from { transform: translateY(0); }\n to { transform: translateY(-33.333%); }\n }\n @keyframes heroScrollDown {\n from { transform: translateY(-33.333%); }\n to { transform: translateY(0); }\n }\n .hero_col.is-up { animation: heroScrollUp 18s linear infinite; }\n .hero_col.is-down { animation: heroScrollDown 18s linear infinite; }\n .hero_col.is-up.is-slow { animation-duration: 24s; }\n .hero_col.is-down.is-slow { animation-duration: 24s; }\n /* Pause au hover pour UX */\n .hero_gallery-wrap:hover .hero_col { animation-play-state: paused; }\n </style></div>\n \n \x3c!-- HEADER --\x3e\n <div class="hero_header">\n <a href="https://www.framer.com/state-of-sites-2026/" class="hero_announcement" target="_blank">\n <div class="hero_announcement-inner">\n <div class="hero_announcement-label">State of Sites \'26</div>\n <div class="hero_announcement-sep">â¢</div>\n <div class="hero_announcement-cta">Unlock the report now</div>\n </div>\n </a>\n <div class="hero_copy">\n <h1 class="hero_heading">Eat, Build<br>Sleep, Repeat</h1>\n \n </div>\n <div class="hero_cta-group">\n <a href="https://framer.com/r/signup" class="hero_cta is-primary">Start for free</a>\n <a href="/ai/" class="hero_cta is-secondary">Start with AI</a>\n </div>\n </div>\n \n \x3c!-- GALLERY WRAPPER --\x3e\n <div class="hero_gallery-wrap">\n <div class="hero_gallery-track">\n \n \x3c!-- Col 1 â monte --\x3e\n <div class="hero_col is-up">\n <div class="hero_card"><img src="https://framerusercontent.com/images/3Wul3zB87cbFlm05OhXiZaxxXg.jpg?width=720&height=660" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/vr4TXGHUM5WvKKKpdSi7NKoU.jpg?width=720&height=600" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/OiLWEMPHjsMaE1LpfCX7OYHI.jpg?width=720&height=800" alt="Website made in Framer" loading="lazy"></div>\n \x3c!-- Répétition pour boucle seamless --\x3e\n <div class="hero_card"><img src="https://framerusercontent.com/images/3Wul3zB87cbFlm05OhXiZaxxXg.jpg?width=720&height=660" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/vr4TXGHUM5WvKKKpdSi7NKoU.jpg?width=720&height=600" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/OiLWEMPHjsMaE1LpfCX7OYHI.jpg?width=720&height=800" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 2 â descend lent --\x3e\n <div class="hero_col is-down is-slow">\n <div class="hero_card"><img src="https://framerusercontent.com/images/3RGrfrckophlAobhfZlqf1MDPd0.jpg?width=720&height=720" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/hZ3ztUHQQ9Tn50mg184gLvKcy4E.jpg?width=720&height=1020" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/Tkq5qQlGiu0yhgjP3SrSQz7eog.jpg?width=720&height=840" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/3RGrfrckophlAobhfZlqf1MDPd0.jpg?width=720&height=720" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/hZ3ztUHQQ9Tn50mg184gLvKcy4E.jpg?width=720&height=1020" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/Tkq5qQlGiu0yhgjP3SrSQz7eog.jpg?width=720&height=840" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 3 â narrow, monte --\x3e\n <div class="hero_col is-narrow is-up is-slow">\n <div class="hero_card"><img src="https://framerusercontent.com/images/8VfS5zuMmDchIpaCf767I8rX7Y.jpg?width=480&height=1040" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/KCk7nP2M4mP1QclNxHPIrT1FvcA.jpg?width=480&height=1040" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/6SXUv7jMAEkw8PabtmC6TXNIiM.jpg?width=480&height=1040" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/8VfS5zuMmDchIpaCf767I8rX7Y.jpg?width=480&height=1040" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/KCk7nP2M4mP1QclNxHPIrT1FvcA.jpg?width=480&height=1040" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/6SXUv7jMAEkw8PabtmC6TXNIiM.jpg?width=480&height=1040" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 4 â monte --\x3e\n <div class="hero_col is-up">\n <div class="hero_card"><img src="https://framerusercontent.com/images/PruQlxKuftAZHgOh7hJT3jaUbs.jpg?width=720&height=660" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/d4YjsL7yalSYZREJ1IdNPmw.jpg?width=720&height=840" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/W1Q88PlQfYXaGug9EBkmai9By4.jpg?width=720&height=960" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/PruQlxKuftAZHgOh7hJT3jaUbs.jpg?width=720&height=660" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/d4YjsL7yalSYZREJ1IdNPmw.jpg?width=720&height=840" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/W1Q88PlQfYXaGug9EBkmai9By4.jpg?width=720&height=960" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 5 â descend --\x3e\n <div class="hero_col is-down">\n <div class="hero_card"><img src="https://framerusercontent.com/images/uS0nUv30GToaflDaraI9qVUIwU.png?width=1068&height=1080" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/gmhdX4XPuJvQqId9jDmFHb7cFE.jpg?width=720&height=780" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/4pTVxnxo0Bvii8xP7hCmmozqx7s.jpg?width=720&height=840" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/uS0nUv30GToaflDaraI9qVUIwU.png?width=1068&height=1080" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/gmhdX4XPuJvQqId9jDmFHb7cFE.jpg?width=720&height=780" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/4pTVxnxo0Bvii8xP7hCmmozqx7s.jpg?width=720&height=840" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 6 â narrow, descend lent --\x3e\n <div class="hero_col is-narrow is-down is-slow">\n <div class="hero_card"><img src="https://framerusercontent.com/images/Hp4KG1pwKb6cl66bNB9b2pYWQ3Y.jpg?width=480&height=987" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/c8yQcxKjBlCZWoqWoRoBRvjcKo.jpg?width=400&height=864" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/cx71XZYYWfIozOc1rn55Bw.jpg?width=480&height=1039" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/Hp4KG1pwKb6cl66bNB9b2pYWQ3Y.jpg?width=480&height=987" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/c8yQcxKjBlCZWoqWoRoBRvjcKo.jpg?width=400&height=864" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/cx71XZYYWfIozOc1rn55Bw.jpg?width=480&height=1039" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 7 â monte lent --\x3e\n <div class="hero_col is-up is-slow">\n <div class="hero_card"><img src="https://framerusercontent.com/images/HnQI4uTAjbgziEmMMInd3R6o9c.jpg?width=720&height=600" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/iR48olgey2UZQ9FFhsWFne27Ag.jpg?width=720&height=900" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/JUWRJbfPWXb05lTNw0q4p1jewc.jpg?width=720&height=540" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/HnQI4uTAjbgziEmMMInd3R6o9c.jpg?width=720&height=600" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/iR48olgey2UZQ9FFhsWFne27Ag.jpg?width=720&height=900" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/JUWRJbfPWXb05lTNw0q4p1jewc.jpg?width=720&height=540" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 8 â descend --\x3e\n <div class="hero_col is-down">\n <div class="hero_card"><img src="https://framerusercontent.com/images/0DoFvQInPiH34TWUk6DzVA9JQ.jpg?width=720&height=852" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/irsyTM7kM1DWjcg6fJkQQ1O04s.jpg?width=720&height=578" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/0DqWFfs9zfVYPO7PZd8O8bsRtE.jpg?width=720&height=1290" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/0DoFvQInPiH34TWUk6DzVA9JQ.jpg?width=720&height=852" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/irsyTM7kM1DWjcg6fJkQQ1O04s.jpg?width=720&height=578" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/0DqWFfs9zfVYPO7PZd8O8bsRtE.jpg?width=720&height=1290" alt="" loading="lazy"></div>\n </div>\n \n \x3c!-- Col 9 â monte --\x3e\n <div class="hero_col is-up">\n <div class="hero_card"><img src="https://framerusercontent.com/images/07eSDIMcoh8sIIeP3LRZ0LKH9Ek.jpg?width=720&height=1080" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/iB2sti3JTa52BB06KGSFSXQq4cI.jpg?width=720&height=900" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/0EFFqlzBjEuDJK5Iy3xbQEed4rY.jpg?width=720&height=540" alt="Website made in Framer" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/07eSDIMcoh8sIIeP3LRZ0LKH9Ek.jpg?width=720&height=1080" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/iB2sti3JTa52BB06KGSFSXQq4cI.jpg?width=720&height=900" alt="" loading="lazy"></div>\n <div class="hero_card"><img src="https://framerusercontent.com/images/0EFFqlzBjEuDJK5Iy3xbQEed4rY.jpg?width=720&height=540" alt="" loading="lazy"></div>\n </div>\n \n </div>\n \n \x3c!-- Gradient mask --\x3e\n <div class="hero_gallery-mask"></div>\n \n \x3c!-- Logos --\x3e\n <div class="hero_companies">\n <div class="hero_companies-logos">\n <div class="hero_logo-wrap"><div class="hero_logo-text">Dribbble</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">11ElevenLabs</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">zapier</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text is-light">perplexity</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">Cal.com</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">mixpanel</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">miro</div></div>\n <div class="hero_logo-wrap"><div class="hero_logo-text">DoorDash</div></div>\n </div>\n </div>\n \n </div>\n \n </section>',css:'@font-face {\n font-family: "GT Walsheim Framer Medium";\n src: url("https://framerusercontent.com/assets/qBBPUgWmzI9eeGPfhfEkF1M8Q8.woff2") format("woff2");\n font-display: swap;\n font-style: normal;\n font-weight: 500;\n }\n \n * {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n }\n \n /* ==============================\n SECTION;\n ============================== */\n .hero_section {\n background-color: #000000;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 100px;\n width: 100%;\n padding: 80px 0 0;\n position: relative;\n overflow: hidden;\n }\n \n /* ==============================\n HEADER;\n ============================== */\n .hero_header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 20px;\n width: 100%;\n max-width: 1200px;\n padding: 0 40px;\n }\n \n .hero_announcement {\
7n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #000000;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 100px;\n padding: 6px 16px;\n text-decoration: none;\n transition: border-color 0.2s ease;\n }\n \n .hero_announcement:hover {\n border-color: rgba(255, 255, 255, 0.4);\n }\n \n .hero_announcement-inner {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n \n .hero_announcement-label {\n font-family: "Inter", sans-serif;\n font-size: 0.875rem;\n font-weight: 500;\n color: #ffffff;\n white-space: nowrap;\n }\n \n .hero_announcement-sep {\n font-family: "Inter", sans-serif;\n font-size: 0.75rem;\n color: rgba(255, 255, 255, 0.35);\n }\n \n .hero_announcement-cta {\n font-family: "Inter", sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.55);\n white-space: nowrap;\n }\n \n .hero_copy {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 15px;\n width: 100%;\n }\n \n .hero_heading {\n font-family: "GT Walsheim Framer Medium", sans-serif;\n font-size: 6.875rem;\n font-weight: 500;\n line-height: 0.85;\n letter-spacing: -0.05em;\n color: #ffffff;\n text-align: center;\n margin-bottom: 2rem;\n }\n \n .hero_cta-group {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n \n .hero_cta {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 100px;\n padding: 10px 20px;\n font-family: "Inter", sans-serif;\n font-size: 0.9375rem;\n font-weight: 500;\n line-height: 1;\n text-decoration: none;\n transition: opacity 0.2s ease;\n }\n \n .hero_cta:hover {\n opacity: 0.8;\n }\n \n .hero_cta.is-primary {\n background-color: #ffffff;\n color: #000000;\n }\n \n .hero_cta.is-secondary {\n background-color: rgba(255, 255, 255, 0.15);\n color: #ffffff;\n }\n \n /* ==============================\n GALLERY;\n - Hauteur fixe + overflow hidden = colonnes coupées;\n - Le track est centré ; les colonnes extérieures débordent;\n symétriquement hors de l\'écran;\n ============================== */\n .hero_gallery-wrap {\n position: relative;\n width: 100%;\n height: 1200px;\n overflow: hidden;\n }\n \n .hero_gallery-track {\n /* On centre le track dans le wrapper.\n Les colonnes qui dépassent la largeur d\'écran;\n sont simplement cachées par overflow:hidden */\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: flex-start;\n gap: 10px;\n /* Largeur totale fixe = 9 cols à 360px + 2 cols à 160px + gaps\n = (7 à 360) + (2 à 160) + (8 à 10) = 2520 + 320 + 80 = 2920px */\n width: 2920px;\n }\n \n /* Colonnes larges (360px) */\n .hero_col {\n width: 360px;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n will-change: transform;\n }\n \n /* Colonnes étroites (160px) */\n .hero_col.is-narrow {\n width: 160px;\n }\n \n /* Cards */\n .hero_card {\n border-radius: 12px;\n overflow: hidden;\n width: 100%;\n border: 1px solid rgba(255, 255, 255, 0.1);\n background-color: #111111;\n flex-shrink: 0;\n }\n \n .hero_card img {\n display: block;\n width: 100%;\n height: auto;\n object-fit: cover;\n object-position: center top;\n }\n \n /* Masque gradient haut + bas â fondu vers noir des deux côtés */\n .hero_gallery-mask {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(to bottom, #000000 0%, rgba(0,0,0,0) 15%, rgba(0,0,0,0) 70%, #000000 100%);\n pointer-events: none;\n z-index: 2;\n }\n \n /* ==============================\n LOGOS;\n Par-dessus le masque gradient;\n ============================== */\n .hero_companies {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 80px 20px;\n z-index: 3;\n }\n \n .hero_companies-logos {\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 150px));\n grid-template-rows: repeat(2, 25px);\n gap: 30px 10px;\n place-items: center;\n max-width: 600px;\n width: 100%;\n }\n \n .hero_logo-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 25px;\n opacity: 0.75;\n }\n \n .hero_logo-text {\n font-family: "Inter", sans-serif;\n font-size: 0.9375rem;\n font-weight: 600;\n color: #ffffff;\n white-space: nowrap;\n letter-spacing: -0.01em;\n }\n \n .hero_logo-text.is-light {\n font-weight: 400;\n }\n \n /* ==============================\n RESPONSIVE â Tablet ⤠991px;\n On réduit le track à l\'échelle via scale();\n au lieu de casser les colonnes;\n ============================== */\n @media (max-width: 991px) {\n .hero_section {\n gap: 80px;\n padding: 60px 0 0;\n }\n \n .hero_header {\n padding: 0 20px;\n gap: 15px;\n }\n \n .hero_heading {\n font-size: 5.25rem;\n }\n \n .hero_gallery-wrap {\n /* On réduit la hauteur proportionnellement au scale */\n height: 920px;\n }\n \n .hero_gallery-track {\n /* scale(0.77) : 2920 à 0.77 â 2249px â couvre les écrans ~992px */\n transform: translateX(-50%) scale(0.77);\n transform-origin: top center;\n }\n \n .hero_companies-logos {\n grid-template-columns: repeat(4, minmax(0, 120px));\n gap: 24px 8px;\n }\n \n }\n \n /* ==============================\n RESPONSIVE â Mobile Landscape ⤠767px;\n ============================== */\n @media (max-width: 767px) {\n .hero_heading {\n font-size: 3.375rem;\n letter-spacing: -0.04em;\n }\n \n .hero_cta-group {\n gap: 5px;\n }\n \n .hero_gallery-wrap {\n height: 680px;\n }\n \n .hero_gallery-track {\n transform: translateX(-50%) scale(0.55);\n transform-origin: top center;\n }\n \n .hero_companies {\n padding: 60px 20px;\n }\n \n .hero_companies-logos {\n grid-template-columns: repeat(3, minmax(0, 110px));\n grid-template-rows: auto;\n gap: 20px 10px;\n }\n \n }\n \n /* ==============================\n RESPONSIVE â Mobile Portrait ⤠479px;\n ============================== */\n @media (max-width: 479px) {\n .hero_heading {\n font-size: 2.7
75rem;\n letter-spacing: -0.04em;\n }\n \n .hero_gallery-wrap {\n height: 520px;\n }\n \n .hero_gallery-track {\n transform: translateX(-50%) scale(0.4);\n transform-origin: top center;\n }\n \n .hero_companies-logos {\n grid-template-columns: repeat(2, minmax(0, 130px));\n gap: 18px 10px;\n }\n \n }'},{id:"demo-cards",name:"Apple Bento",position:1,js:"",html:'<section class="section_promos">\n <div class="padding-global">\n <div class="container-large">\n <div class="w-layout-grid promos_grid">\n \n <div class="promos_card">\n <a href="/fr/apple-watch-series-11/" class="promos_card-link" aria-label="Apple Watch Series 11"></a>\n <div class="promos_card-content">\n <div class="promos_logo is-watch-series-11"></div>\n <p class="promos_subhead">L\'Apple Watch ultime pour votre santé.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/apple-watch-series-11/" class="button is-small" aria-label="En savoir plus, Apple Watch Series 11">En savoir plus</a>\n <a href="/fr/shop/goto/buy_watch/apple_watch_series_11" class="button is-secondary is-small" aria-label="Acheter, Apple Watch Series 11">Acheter</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/fr/home/includes/promos/apple-watch-series-11/promo_apple_watch_series_11__b63hxviqvonm_large_2x.jpg" alt="Apple Watch Series 11, or rose, boîtier en aluminium" class="promos_image is-watch-series-11" loading="lazy" />\n </div>\n </div>\n \n <div class="promos_card is-dark">\n <a href="/fr/macbook-pro/" class="promos_card-link" aria-label="MacBook Pro"></a>\n <div class="promos_card-content">\n <h3 class="promos_heading is-dark">MacBook Pro</h3>\n <p class="promos_subhead is-dark">Maintenant avec les puces M5, M5 Pro et M5 Max.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/macbook-pro/" class="button is-small" aria-label="En savoir plus, MacBook Pro">En savoir plus</a>\n <a href="/fr/shop/goto/buy_mac/macbook_pro" class="button is-secondary-light is-small" aria-label="Acheter, MacBook Pro">Acheter</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/v/home/cm/images/promos/macbook-pro/promo_macbook_pro__e3xqrygvp9ea_large_2x.jpg" alt="MacBook Pro positionné en forme de V" class="promos_image is-macbook-pro" loading="lazy" />\n </div>\n </div>\n \n <div class="promos_card">\n <a href="/fr/airpods-pro/" class="promos_card-link" aria-label="AirPods Pro 3"></a>\n <div class="promos_card-content">\n <h3 class="promos_heading">AirPods Pro 3</h3>\n <p class="promos_subhead">La meilleure Réduction active du bruit intraâauriculaire au monde.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/airpods-pro/" class="button is-small" aria-label="En savoir plus, AirPods Pro 3">En savoir plus</a>\n <a href="/fr/shop/goto/buy_airpods/airpods_pro_3" class="button is-secondary is-small" aria-label="Acheter, AirPods Pro 3">Acheter</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/v/home/cm/images/promos/airpods-pro-3/promo_airpodspro_3__f6xmza7bglei_large_2x.jpg" alt="AirPods Pro 3, écouteurs sans fil, coloris blanc" class="promos_image is-airpods-pro" loading="lazy" />\n </div>\n </div>\n \n <div class="promos_card is-dark">\n <a href="/fr/ipad-pro/" class="promos_card-link" aria-label="iPad Pro"></a>\n <div class="promos_card-content">\n <h3 class="promos_heading is-dark">iPad Pro</h3>\n <p class="promos_subhead is-dark">Performances d\'IA avanÂcées et capacités hors normes.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/ipad-pro/" class="button is-small" aria-label="En savoir plus sur l\'iPad Pro">En savoir plus</a>
7\n <a href="/fr/shop/goto/buy_ipad/ipad_pro" class="button is-secondary-light is-small" aria-label="Acheter un iPad Pro">Acheter</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/v/home/cm/images/promos/ipad-pro/promo_ipad_pro__c529dk533k4m_large_2x.jpg" alt="Deux iPad Pro, face avant, orientation portrait" class="promos_image is-ipad-pro" loading="lazy" />\n </div>\n </div>\n \n <div class="promos_card is-dark">\n <a href="/fr/apple-watch-ultra-3/" class="promos_card-link" aria-label="Apple Watch Ultra 3"></a>\n <div class="promos_card-content">\n <div class="promos_logo is-watch-ultra-3"></div>\n <p class="promos_subhead is-dark">Puissance. Record.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/apple-watch-ultra-3/" class="button is-small" aria-label="En savoir plus, Apple Watch Ultra 3">En savoir plus</a>\n <a href="/fr/shop/goto/buy_watch/apple_watch_ultra_3" class="button is-secondary-light is-small" aria-label="Acheter, Apple Watch Ultra 3">Acheter</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/fr/home/includes/promos/apple-watch-ultra-3/promo_apple_watch_ultra3__bwvslhbxx99e_large_2x.jpg" alt="Apple Watch Ultra 3, boîtier en titane naturel" class="promos_image is-watch-ultra-3" loading="lazy" />\n </div>\n </div>\n \n <div class="promos_card">\n <a href="/fr/shop/goto/trade_in" class="promos_card-link" aria-label="Apple Trade In"></a>\n <div class="promos_card-content">\n <div class="promos_logo is-trade-in"></div>\n <p class="promos_subhead">Ãconomisez de 175 ⬠à 680 ⬠sur votre prochain achat en faisant reprendre un iPhone 13 ou plus récent.</p>\n <div class="promos_button-wrapper">\n <a href="/fr/shop/goto/trade_in" class="button is-small" aria-label="Obtenir une estimation">Obtenir une estimation</a>\n </div>\n </div>\n <div class="promos_image-wrapper">\n <img src="https://www.apple.com/v/home/cm/images/promos/iphone-tradein/promo_iphone_tradein__bugw15ka691e_large_2x.jpg" alt="Ãchange iPhone, une main tenant un iPhone 13 effectue un échange avec un iPhone 17 Pro" class="promos_image is-trade-in" loading="lazy" />\n </div>\n </div>\n \n </div>\n </div>\n </div>\n </section>',css:'/* ========================================\nCORE STRUCTURE;\n======================================== */\n\n.padding-global {\n padding-left: 2.5rem;\n padding-right: 2.5rem;\n }\n \n .container-large {\n max-width: 80rem;\n margin-left: auto;\n margin-right: auto;\n width: 100%;\n }\n \n /* ========================================\n SECTION PROMOS;\n ======================================== */\n \n .section_promos {\n background-color: #ffffff;\n }\n \n /* Grid â 2 colonnes avec gap 12px comme l\'original */\n .promos_grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.75rem;\n }\n \n /* ========================================\n CARD;\n ======================================== */\n \n .promos_card {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 36.25rem;\n background-color: #f5f5f7;\n }\n \n .promos_card.is-dark {\n background-color: #161617;\n }\n \n /* Lien invisible qui couvre toute la card */\n .promos_card-link {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 3;\n text-decoration: none;\n }\n \n /* ========================================\n CARD CONTENT (textes + boutons);\n ======================================== */\n \n .promos_card-content {\n position: relative;\n z-index: 4;\n pointer-events: none;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;
7\n align-items: center;\n padding-top: 3.3125rem;\n }\n \n /* Heading texte (MacBook Pro, AirPods, iPad) */\n .promos_heading {\n font-family: "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 2.5rem;\n font-weight: 600;\n line-height: 1.1;\n letter-spacing: 0em;\n color: #1d1d1f;\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n max-width: 26.875rem;\n }\n \n .promos_heading.is-dark {\n color: #f5f5f7;\n }\n \n /* Logo images (Watch Series 11, Watch Ultra 3, Trade In) */\n .promos_logo {\n display: block;\n margin-left: auto;\n margin-right: auto;\n background-position: center center;\n background-repeat: no-repeat;\n }\n \n .promos_logo.is-watch-series-11 {\n width: 18.6875rem;\n height: 2.25rem;\n background-size: 18.6875rem 2.25rem;\n background-image: url("https://www.apple.com/v/home/cm/images/logos/apple-watch-series-11/promo_logo_apple_watch_series_11__d9br21pxygya_large_2x.png");\n }\n \n .promos_logo.is-watch-ultra-3 {\n width: 17.5rem;\n height: 2.125rem;\n background-size: 17.5rem 2.125rem;\n background-image: url("https://www.apple.com/v/home/cm/images/logos/apple-watch-ultra-3/promo_logo_apple_watch_ultra3__dehvqgn07cgi_large_2x.png");\n }\n \n .promos_logo.is-trade-in {\n width: 9.6875rem;\n height: 2rem;\n background-size: 9.6875rem 2rem;\n background-image: url("https://www.apple.com/v/home/cm/images/logos/iphone-tradein/promo_logo_iphone_tradein__7y3gtai5az66_large_2x.png");\n }\n \n /* Subhead */\n .promos_subhead {\n font-family: "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 1.3125rem;\n font-weight: 400;\n line-height: 1.19048;\n letter-spacing: 0.011em;\n color: #1d1d1f;\n text-align: center;\n margin-top: 0.625rem;\n margin-left: auto;\n margin-right: auto;\n max-width: 26.875rem;\n }\n \n .promos_subhead.is-dark {\n color: #f5f5f7;\n }\n \n /* Button wrapper */\n .promos_button-wrapper {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 0.625rem;\n margin-top: 1.0625rem;\n pointer-events: all;\n }\n \n /* ========================================\n BUTTONS;\n ======================================== */\n \n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding-top: 0.4375rem;\n padding-bottom: 0.4375rem;\n padding-left: 0.9375rem;\n padding-right: 0.9375rem;\n background-color: #0071e3;\n color: #ffffff;\n border-radius: 980px;\n border-width: 1px;\n border-style: solid;\n border-color: transparent;\n font-family: "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.42859;\n letter-spacing: -0.016em;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: background-color 0.2s ease;\n }\n \n .button:hover {\n background-color: #0077ed;\n }\n \n .button.is-small {\n font-size: 0.875rem;\n padding-top: 0.4375rem;\n padding-bottom: 0.4375rem;\n padding-left: 0.9375rem;\n padding-right: 0.9375rem;\n }\n \n /* Bouton outline sur fond clair */\n .button.is-secondary {\n background-color: transparent;\n color: #0066cc;\n border-color: #0066cc;\n }\n \n .button.is-secondary:hover {\n background-color: #0066cc;\n color: #ffffff;\n }\n \n /* Bouton outline sur fond sombre */\n .button.is-secondary-light {\n background-color: transparent;\n color: #2997ff;\n border-color: #2997ff;\n }\n \n .button.is-secondary-light:hover {\n background-color: #2997ff;\n color: #ffffff;\n }\n \n /* ========================================\n IMAGE WRAPPER & IMAGES;\n ======================================== */\n \n .promos_image-wrapper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n overflow: hidden;\n }\n \n .promos_image {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n max-width: none;\n border: 0;\n margin: 0;\n padding: 0;\n }\n \n /* Tailles spécifiques des images produit */\n .promos_image.is-watch-series-11 {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n .promos_image.is-macbook-pro {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n .promos_image.is-airpods-pro {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n .promos_image.is-ipad-pro {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n .promos_image.is-watch-ultra-3 {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n .promos_image.is-trade-in {\n width: 78.875rem;\n height: 36.25rem;\n }\n \n /* ========================================\n RESPONSIVE â Tablet (991px);\n ======================================== */\n \n @media (max-width: 991px) {\n .padding-global {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n }\n \n .promos_grid {\n grid-template-columns: 1fr;\n }\n \n .promos_card {\n height: 30.625rem;\n }\n \n .promos_heading {\n font-size: 2rem;\n line-height: 1.125;\n letter-spacing: 0.002em;\n max-width: 20.625rem;\n }
7\n \n .promos_subhead {\n font-size: 1.1875rem;\n line-height: 1.21053;\n letter-spacing: 0.012em;\n max-width: 20.625rem;\n }\n \n .promos_card-content {\n padding-top: 2.625rem;\n }\n \n .promos_logo.is-watch-series-11 {\n width: 14.5625rem;\n height: 1.8125rem;\n background-size: 14.5625rem 1.8125rem;\n }\n \n .promos_logo.is-watch-ultra-3 {\n width: 13.5625rem;\n height: 1.6875rem;\n background-size: 13.5625rem 1.6875rem;\n }\n \n .promos_logo.is-trade-in {\n width: 7.9375rem;\n height: 1.6875rem;\n background-size: 7.9375rem 1.6875rem;\n }\n \n .promos_image.is-watch-series-11 {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n .promos_image.is-macbook-pro {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n .promos_image.is-airpods-pro {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n .promos_image.is-ipad-pro {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n .promos_image.is-watch-ultra-3 {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n .promos_image.is-trade-in {\n width: 32.25rem;\n height: 30.625rem;\n }\n \n }\n \n /* ========================================\n RESPONSIVE â Mobile Portrait (479px);\n ======================================== */\n \n @media (max-width: 479px) {\n .padding-global {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n \n .promos_card {\n height: 31.25rem;\n }\n \n .promos_card-content {\n padding-top: 2.3125rem;\n }\n \n .promos_heading {\n max-width: 90%;\n }\n \n .promos_subhead {\n max-width: 90%;\n }\n \n .promos_image.is-watch-series-11 {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n .promos_image.is-macbook-pro {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n .promos_image.is-airpods-pro {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n .promos_image.is-ipad-pro {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n .promos_image.is-watch-ultra-3 {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n .promos_image.is-trade-in {\n width: 45.875rem;\n height: 31.25rem;\n }\n \n }'},{id:"demo-pricing",name:"Pricing Table",position:2,js:"// Toggle Monthly / Yearly billing\ndocument.addEventListener('DOMContentLoaded', function () {\n var isYearly = false;\n \n var toggleTrack = document.getElementById('billing-toggle');\n var labelMonthly = document.getElementById('label-monthly');\n var labelYearly = document.getElementById('label-yearly');\n var yearlyPrices = document.querySelectorAll('.pricing_price-wrap.is-yearly');\n var monthlyPrices = document.querySelectorAll('.pricing_price-wrap.is-monthly');\n \n // S'assurer que les prix annuels sont bien cachés au départ\n yearlyPrices.forEach(function (el) {\n el.style.display = 'none';\n });\n \n toggleTrack.addEventListener('click', function () {\n isYearly = !isYearly;\n \n if (isYearly) {\n // Passer en Yearly\n toggleTrack.classList.add('is-yearly');\n labelMonthly.classList.remove('is-active');\n labelYearly.classList.add('is-active');\n monthlyPrices.forEach(function (el) { el.style.display = 'none'; });\n yearlyPrices.forEach(function (el) { el.style.display = 'flex'; });\n } else {\n // Revenir en Monthly\n toggleTrack.classList.remove('is-yearly');\n labelMonthly.classList.add('is-active');\n labelYearly.classList.remove('is-active');\n yearlyPrices.forEach(function (el) { el.style.display = 'none'; });\n monthlyPrices.forEach(function (el) { el.style.display = 'flex'; });\n }\n });\n });",html:'<div class="page-wrapper">\n <main class="main-wrapper">\n \n \x3c!-- PRICING SECTION --\x3e\n <section class="section_pricing">\n <div class="padding-global padding-section-large">\n <div class="container-large">\n \n \x3c!-- Section Header --\x3e\n <div class="pricing_header-wrapper">\n <h2 class="pricing_heading">Flexible pricing for every stage</h2>\n <p class="pricing_subheading">Fintech is its potential to promote financial inclusion. In many parts of the world, millions of people lack access to traditional banking services.</p>\n </div>\n \n \x3c!-- Toggle Monthly / Yearly --\x3e\n <div class="pricing_toggle-wrapper">\n <div class="pricing_toggle-label is-active" id="label-monthly">Monthly</div>\n <div class="pricing_toggle-track" id="billing-toggle">\n <div class="pricing_toggle-ball"></div>\n </div>\n <div class="pricing_toggle-label" id="label-yearly">Yearly</div>\n </div>\n \n \x3c!-- Pricing Grid --\x3e\n <div class="pricing_grid">\n \n \x3c!-- Starter Plan --\x3e\n <div class="pricing_card">\n <div class="pricing_card-top">\n <div class="w-embed">\n <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="16" cy="16" r="15" stroke="rgba(255,255,255,0.25)" stroke-width="1"/>\n <path d="M16 8l2 5h5l-4 3 2 5-5-3-5 3 2-5-4-3h5z" stroke="rgba(255,255,255,0.6)" stroke-width="1.5" stroke-linejoin="round" fill="none"/>\n </svg>\n </div>\n </div>\n <div class="pricing_card-text">\n <h3 class="pricing_plan-name">Starter Plan</h3>\n <p class="pricing_plan-desc">Perfect for small businesses and startups looking to establish their digital presence.</p>\n </div>\n <div class="pricing_divider"></div>\n <div class="pricing_price-wrap is-monthly">\n <div class="pricing_price-amount">$299</div>\n <div class="pricing_price-period">/ month</div>\n </div>\n <div class="pricing_price-wrap is-yearly">\n <div class="pricing_price-amount">$149</div>\n <div class="pricing_price-period">/ year</div>\n </div>\n <div class="pricing_divider"></div>\n <div class="pricing_features-label">What\'s Included:</div>\n <ul class="pricing_features-list">\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(255,255,255,0.35)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(255,255,255,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text">Basic strategy consultation</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(255,255,255,0.35)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(255,255,255,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text">Social media setup</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(255,255,255,0.35)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(255,255,255,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text">Monthly performance reports</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(255,255,255,0.35)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(255,255,255,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text">Dedicated Support Team</div>\n </li>\n </ul>\n <a href="/contact" class="pricing_button">\n <div class="w-embed">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 7h12M8 3l5 4-5 4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_button-text">Get Started Now</div>\n </a>\n </div>\n \n \x3c!-- Enterprise Plan (Popular) --\x3e\n <div class="pricing_card is-popular">\n <div class="pricing_card-top">\n <div class="w-embed">\n <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="16" cy="16" r="15" stroke="rgba(1,1,4,0.2)" stroke-width="1"/>\n <path d="M16 8l2 5h5l-4 3 2 5-5-3-5 3 2-5-4-3h5z" stroke="rgba(1,1,4,0.6
7)" stroke-width="1.5" stroke-linejoin="round" fill="none"/>\n </svg>\n </div>\n <div class="pricing_badge">Most Popular</div>\n </div>\n <div class="pricing_card-text">\n <h3 class="pricing_plan-name is-popular">Enterprise Plan</h3>\n <p class="pricing_plan-desc is-popular">Solutions tailored for large businesses to optimize performance and drive innovation.</p>\n </div>\n <div class="pricing_divider is-popular"></div>\n <div class="pricing_price-wrap is-monthly">\n <div class="pricing_price-amount is-popular">$799</div>\n <div class="pricing_price-period is-popular">/ month</div>\n </div>\n <div class="pricing_price-wrap is-yearly">\n <div class="pricing_price-amount is-popular">$499</div>\n <div class="pricing_price-period is-popular">/ year</div>\n </div>\n <div class="pricing_divider is-popular"></div>\n <div class="pricing_features-label is-popular">What\'s Included:</div>\n <ul class="pricing_features-list">\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(1,1,4,0.25)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(1,1,4,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text is-popular">For large businesses with complex needs</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(1,1,4,0.25)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(1,1,4,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text is-popular">Full-service marketing strategy and execution</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(1,1,4,0.25)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(1,1,4,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text is-popular">Advanced analytics and custom reporting</div>\n </li>\n <li class="pricing_features-item">\n <div class="w-embed">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="9" cy="9" r="8" stroke="rgba(1,1,4,0.25)" stroke-width="1.2"/>\n <path d="M6 9l2.5 2.5L12 6.5" stroke="rgba(1,1,4,0.7)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_feature-text is-popular">24/7 priority support</div>\n </li>\n </ul>\n <a href="/contact" class="pricing_button is-popular">\n <div class="w-embed">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 7h12M8 3l5 4-5 4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="pricing_button-text">Get Started Now</div>\n </a>\n </div>\n \n </div>\n </div>\n </div>\n </section>\n \n </main>\n </div>',css:"/* =============================================\nCORE STRUCTURE â Client-First;\n============================================= */\n.padding-global {\n padding-left: 2.5rem;\n padding-right: 2.5rem;\n }\n \n .container-large {\n max-width: 80rem;\n margin-left: auto;\n margin-right: auto;\n width: 100%;\n }\n \n .padding-section-large {\n padding-top: 8rem;\n padding-bottom: 8rem;\n }\n \n /* =============================================\n SECTION PRICING â Backgroun
7d;\n ============================================= */\n .section_pricing {\n background-color: #010104;\n }\n \n /* =============================================\n SECTION HEADER;\n ============================================= */\n .pricing_header-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n margin-bottom: 2.5rem;\n }\n \n .pricing_heading {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 2.5rem;\n font-weight: 700;\n color: #ffffff;\n letter-spacing: -0.02em;\n line-height: 1.15;\n margin-bottom: 1rem;\n max-width: 40rem;\n }\n \n .pricing_subheading {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.9375rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.65;\n max-width: 32rem;\n }\n \n /* =============================================\n TOGGLE BILLING;\n ============================================= */\n .pricing_toggle-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.75rem;\n margin-bottom: 2rem;\n }\n \n .pricing_toggle-label {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n cursor: pointer;\n transition: color 0.2s ease;\n }\n \n .pricing_toggle-label.is-active {\n color: #ffffff;\n font-weight: 500;\n }\n \n .pricing_toggle-track {\n width: 2.75rem;\n height: 1.5rem;\n background-color: #2a2a2e;\n border-radius: 99rem;\n border-width: 1px;\n border-style: solid;\n border-color: rgba(255, 255, 255, 0.12);\n position: relative;\n cursor: pointer;\n transition: background-color 0.25s ease;\n }\n \n .pricing_toggle-track.is-yearly {\n background-color: #cffe25;\n }\n \n .pricing_toggle-ball {\n width: 1.125rem;\n height: 1.125rem;\n background-color: #ffffff;\n border-radius: 50%;\n position: absolute;\n top: 0.125rem;\n left: 0.1875rem;\n transition: transform 0.25s ease, background-color 0.25s ease;\n }\n \n .pricing_toggle-track.is-yearly .pricing_toggle-ball {\n transform: translateX(1.25rem);\n background-color: #010104;\n }\n \n /* =============================================\n PRICING GRID;\n ============================================= */\n .pricing_grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n border-radius: 1.25rem;\n overflow: hidden;\n border-width: 1px;\n border-style: solid;\n border-color: rgba(255, 255, 255, 0.08);\n }\n \n /* =============================================\n PRICING CARD â Base (Dark);\n ============================================= */\n .pricing_card {\n background-color: #0c0c0f;\n padding-top: 2rem;\n padding-bottom: 2rem;\n padding-left: 2rem;\n padding-right: 2rem;\n display: flex;\n flex-direction: column;\n gap: 0rem;\n }\n \n .pricing_card.is-popular {\n background-color: #cffe25;\n }\n \n .pricing_card-top {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n margin-bottom: 1.5rem;\n }\n \n /* =============================================\n BADGE â Most Popular;\n ============================================= */\n .pricing_badge {\n background-color: #ffffff;\n color: #010104;\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.75rem;\n font-weight: 700;\n letter-spacing: 0.03em;\n padding-top: 0.3125rem;\n padding-bottom: 0.3125rem;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n border-radius: 99rem;\n }\n \n /* =============================================\n PLAN TEXT;\n ============================================= */\n .pricing_card-text {\n margin-bottom: 1.5rem;\n }\n \n .pricing_plan-name {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 1.625rem;\n font-weight: 700;\n color: #ffffff;\n letter-spacing: -0.02em;\n line-height: 1.15;\n margin-bottom: 0.5rem;\n }\n \n .pricing_plan-name.is-popular {\n color: #010104;\n }\n \n .pricing_plan-desc {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.6;\n }\n \n .pricing_plan-desc.is-popular {\n color: rgba(1, 1, 4, 0.65);\n }\n \n /* =============================================\n DIVIDER;\n ============================================= */\n .pricing_divider {\n height: 0.0625rem;\n background-color: rgba(255, 255, 255, 0.1);\n margin-bottom: 1.5rem;\n }
7\n \n .pricing_divider.is-popular {\n background-color: rgba(1, 1, 4, 0.15);\n }\n \n /* =============================================\n PRICE;\n ============================================= */\n .pricing_price-wrap {\n display: flex;\n align-items: baseline;\n gap: 0.5rem;\n margin-bottom: 1.5rem;\n }\n \n .pricing_price-amount {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 2.75rem;\n font-weight: 700;\n color: #ffffff;\n letter-spacing: -0.03em;\n line-height: 1;\n }\n \n .pricing_price-amount.is-popular {\n color: #010104;\n }\n \n .pricing_price-period {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n }\n \n .pricing_price-period.is-popular {\n color: rgba(1, 1, 4, 0.6);\n }\n \n /* yearly prices hidden by default (set via JS) */\n .pricing_price-wrap.is-yearly {\n display: none;\n }\n \n /* =============================================\n FEATURES;\n ============================================= */\n .pricing_features-label {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.9375rem;\n font-weight: 700;\n color: #ffffff;\n margin-bottom: 1rem;\n }\n \n .pricing_features-label.is-popular {\n color: #010104;\n }\n \n .pricing_features-list {\n list-style-type: none;\n padding-top: 0rem;\n padding-bottom: 0rem;\n padding-left: 0rem;\n padding-right: 0rem;\n margin-top: 0rem;\n margin-bottom: 1.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.625rem;\n flex-grow: 1;\n }\n \n .pricing_features-item {\n display: flex;\n align-items: center;\n gap: 0.625rem;\n }\n \n .pricing_feature-text {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.75);\n line-height: 1.4;\n }\n \n .pricing_feature-text.is-popular {\n color: rgba(1, 1, 4, 0.8);\n }\n \n /* =============================================\n BUTTON;\n ============================================= */\n .pricing_button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.625rem;\n border-radius: 99rem;\n padding-top: 0.9375rem;\n padding-bottom: 0.9375rem;\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: #ffffff;\n background-color: #1a1a1e;\n border-width: 1px;\n border-style: solid;\n border-color: rgba(255, 255, 255, 0.12);\n transition: opacity 0.15s ease, transform 0.15s ease;\n }\n \n .pricing_button.is-popular {\n background-color: #ffffff;\n color: #010104;\n border-color: transparent;\n }\n \n .pricing_button:hover {\n opacity: 0.85;\n transform: translateY(-0.0625rem);\n }\n \n .pricing_button-text {\n font-family: 'BDO Grotesk', sans-serif;\n font-size: 0.9375rem;\n font-weight: 600;\n }\n \n /* =============================================\n RESPONSIVE â Tablet;\n ============================================= */\n @media (max-width: 991px) {\n .padding-global {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n }\n \n .padding-section-large {\n padding-top: 6rem;\n padding-bottom: 6rem;\n }\n \n .pricing_heading {\n font-size: 2rem;\n }\n \n }\n \n /* =============================================\n RESPONSIVE â Mobile Landscape;\n ============================================= */\n @media (max-width: 767px) {\n .pricing_grid {\n grid-template-columns: 1fr;\n }\n \n .pricing_card {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n }\n \n .pricing_heading {\n font-size: 1.75rem;\n }\n \n }\n \n /* =============================================\n RESPONSIVE â Mobile Portrait;\n ============================================= */\n @media (max-width: 479px) {\n .padding-global {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n \n .padding-section-large {\n padding-top: 4rem;\n padding-bottom: 4rem;\n }\n \n .pricing_price-amount {\n font-size: 2.25rem;\n }\n \n }"}],qe=[{name:"Swiper",detect:e=>/class="[^"]*swiper[\s"-]/.test(e)||/swiper-container|swiper-wrapper|swiper-slide/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js",type:"js"}]},{name:"Splide",detect:e=>/class="[^"]*splide[\s"-]/.test(e)||/splide__/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/css/splide.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/js/splide.min.js",type:"js"}]},{name:"Flickity",detect:e=>/flickity|data-flickity/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/flickity@3/dist/flickity.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/flickity@3/dist/flickity.pkgd.min.js",type:"js"}]},{name:"Slick",detect:e=>/class="[^"]*slick[\s"-]/.test(e)||/slick-slider|slick-slide|slick-track/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/slick-carousel@1/slick/slick.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/slick-carousel@1/slick/slick-theme.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/slick-carousel@1/slick/slick.min.js",type:"js"}]},{name:"Embla Carousel",detect:(e,t,r)=>/embla/i.test(e)||/EmblaCarousel/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/embla-carousel@8/embla-carousel.umd.js",type:"js"}]},{name:"Owl Carousel",detect:e=>/owl-carousel|owl-stage|owl-item/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/owl.carousel@2/dist/assets/owl.carousel.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/owl.carousel@2/dist/assets/owl.theme.default.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/owl.carousel@2/dist/owl.carousel.min.js",type:"js"}]},{name:"AOS",detect:e=>/data-aos\s*=/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/aos@2/dist/aos.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/aos@2/dist/aos.js",type:"js"}]},{name:"GSAP",detect:(e,t,r)=>/gsap|ScrollTrigger|ScrollSmoother/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js",type:"js"}]},{name:"ScrollReveal",detect:(e,t,r)=>/ScrollReveal/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/scrollreveal@4/dist/scrollreveal.min.js",type:"js"}]},{name:"Locomotive Scroll",detect:e=>/data-scroll/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/locomotive-scroll@4/dist/locomotive-scroll.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/locomotive-scroll@4/dist/locomotive-scroll.min.js",type:"js"}]},{name:"Lenis",detect:(e,t,r)=>/Lenis|lenis/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/lenis@1/dist/lenis.min.js",type:"js"}]},{name:"Rellax",detect:(e,t,r)=>/class="[^"]*rellax[\s"-]/.test(e)||/Rellax/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/rellax@1/rellax.min.js",type:"js"}]},{name:"Simple Parallax",detect:(e,t,r)=>/simpleParallax/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/simple-parallax-js@5/dist/simpleParallax.min.js",type:"js"}]},{name:"Anime.js",detect:(e,t,r)=>/anime\s*\(|anime\.timeline/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/animejs@3/lib/anime.min.js",type:"js"}]},{name:"Motion One",detect:(e,t,r)=>/motion\.animate|motion\.timeline/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/motion@10/dist/motion.min.js",type:"js"}]},{name:"Barba.js",detect:(e,t,r)=>/data-barba/.test(e)||/barba\.init|barba\.use/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/@barba/core@2/dist/barba.umd.js",type:"js"}]},{name:"Typed.js",detect:(e,t,r)=>/Typed\s*\(|new\s+Typed/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/typed.js@2/dist/typed.umd.js",type:"js"}]},{name:"SplittingJS",detect:(e,t,r)=>/data-splitting/.test(e)||/Splitting\s*\(/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/splitting@1/dist/splitting.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/splitting@1/dist/splitting.min.js",type:"js"}]},{name:"CountUp.js",detect:(e,t,r)=>/CountUp\s*\(|new\s+CountUp/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/countup.js@2/dist/countUp.umd.js",type:"js"}]},{name:"GLightbox",detect:e=>/glightbox|data-gallery/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/glightbox@3/dist/css/glightbox.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/glightbox@3/dist/js/glightbox.min.js",type:"js"}]},{name:"Fancybox",detect:e=>/data-fancybox/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/@fancyapps/ui@5/dist/fancybox/fancybox.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/@fancyapps/ui@5/dist/fancybox/fancybox.umd.js",type:"js"}]},{name:"Plyr",detect:e=>/class="[^"]*plyr[\s"-]/.test(e)||/data-plyr/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/plyr@3/dist/plyr.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/plyr@3/dist/plyr.min.js",type:"js"}]},{name:"Lottie",detect:(e,t,r)=>/lottie/.test(e)||/lottie/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/lottie-web@5/build/player/lottie.min.js",type:"js"}]},{name:"VanillaTilt",detect:(e,t,r)=>/data-tilt/.test(e)||/VanillaTilt/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/vanilla-tilt@1/dist/vanilla-tilt.min.js",type:"js"}]},{name:"tilt.js",detect:(e,t,r)=>/\.tilt\s*\(/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/tilt.js@1/dest/tilt.jquery.min.js",type:"js"}]},{name:"tsParticles",detect:(e,t,r)=>/id="tsparticles"/.test(e)||/tsParticles|loadFull/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/tsparticles-engine@2/tsparticles.engine.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/tsparticles@2/tsparticles.bundle.min.js",type:"js"}]},{name:"Particles.js",detect:(e,t,r)=>/id="particles-js"/.test(e)||/particlesJS/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/particles.js@2/particles.min.js",type:"js"}]},{name:"Isotope",detect:(e,t,r)=>/Isotope|isotope/.test(r)||/\.isotope\s*\(/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/isotope-layout@3/dist/isotope.pkgd.min.js",type:"js"}]},{name:"Masonry",detect:(e,t,r)=>/data-masonry/.test(e)||/Masonry\s*\(|new\s+Masonry/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/masonry-layout@4/dist/masonry.pkgd.min.js",type:"js"}]},{name:"MixItUp",detect:(e,t,r)=>/mixitup|mixItUp|MixItUp/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/mixitup@3/dist/mixitup.min.js",type:"js"}]},{name:"Tippy.js",detect:(e,t,r)=>
7/data-tippy/.test(e)||/tippy\s*\(/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/tippy.js@6/dist/tippy-bundle.umd.min.js",type:"js"},{url:"https://cdn.jsdelivr.net/npm/tippy.js@6/dist/tippy.css",type:"css"}]},{name:"Marquee",detect:(e,t)=>/marquee|infinite-scroll|scroll-wrapper/.test(e)||/marquee/.test(t),resources:[{url:"https://cdn.jsdelivr.net/npm/vanilla-marquee@1/dist/vanilla-marquee.min.js",type:"js"}]},{name:"Vivus",detect:(e,t,r)=>/Vivus|new\s+Vivus/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/vivus@0/dist/vivus.min.js",type:"js"}]},{name:"Chart.js",detect:(e,t,r)=>/Chart\s*\(|new\s+Chart/.test(r)||/<canvas[^>]*chart/i.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/chart.js@4/dist/chart.umd.min.js",type:"js"}]},{name:"Flatpickr",detect:(e,t,r)=>/flatpickr/.test(e)||/flatpickr/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/flatpickr@4/dist/flatpickr.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/flatpickr@4/dist/flatpickr.min.js",type:"js"}]},{name:"Finsweet Attributes",detect:e=>/fs-[a-z]+-/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/@finsweet/attributes@2/attributes.js",type:"js"}]},{name:"Leaflet",detect:(e,t,r)=>/leaflet|L\.map|L\.tileLayer/.test(r)||/class="[^"]*leaflet[\s"-]/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/leaflet@1/dist/leaflet.min.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/leaflet@1/dist/leaflet.min.js",type:"js"}]},{name:"Mapbox GL",detect:(e,t,r)=>/mapboxgl|mapbox-gl/.test(r)||/class="[^"]*mapboxgl[\s"-]/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/mapbox-gl@3/dist/mapbox-gl.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/mapbox-gl@3/dist/mapbox-gl.js",type:"js"}]},{name:"MapLibre GL",detect:(e,t,r)=>/maplibregl|maplibre-gl/.test(r)||/class="[^"]*maplibregl[\s"-]/.test(e),resources:[{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@4/dist/maplibre-gl.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@4/dist/maplibre-gl.js",type:"js"}]},{name:"Google Maps",detect:(e,t,r)=>/google\.maps|initMap|new\s+google\.maps\.Map/.test(r),resources:[{url:"https://maps.googleapis.com/maps/api/js?v=weekly",type:"js"}]},{name:"jQuery",detect:(e,t,r)=>/\$\s*\(|jQuery\s*\(/.test(r),resources:[{url:"https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js",type:"js"}]}];function Ve(e){var t,r;try{const n=JSON.parse(e),s=(null==(t=null==n?void 0:n.payload)?void 0:t.styles)??[],i=(null==(r=null==n?void 0:n.payload)?void 0:r.nodes)??[];let o=0,a=0;const l=[];for(const e of s)"class"===e.type&&e.name&&(e.comb&&""!==e.comb?a++:(o++,l.push(e.name)));const c=o+a;for(const e of i){const t=e.data,r=null==t?void 0:t.displayName;if(r&&r.trim())return{name:r.trim(),classCount:c,comboCount:a}}if(i.length>0){const e=i[0],t=e.tag||e.type||"";if(l.length>0){return{name:t?`${t}.${l[0]}`:l[0],classCount:c,comboCount:a}}if(t)return{name:`<${t}> (${i.length} elements)`,classCount:c,comboCount:a}}if(l.length>0){return{name:l.slice(0,3).join(", ")+(l.length>3?"...":""),classCount:c,comboCount:a}}return{name:`${c} styles`,classCount:c,comboCount:a}}catch{return{name:"Fichier JSON",classCount:0,comboCount:0}}}function We(e){var t;try{const r=null==(t=null==e?void 0:e.payload)?void 0:t.styles;return Array.isArray(r)?r.length:0}catch{return 0}}async function Be(){var e;if(!n)return null;const{data:{session:t}}=await s.auth.getSession();return(null==(e=null==t?void 0:t.user)?void 0:e.id)??null}function Fe(e,t){return`${e.length}:${t.length}:${e.slice(0,100)}:${t.slice(0,100)}`}function Ge(e,t,r){try{const n=Fe(e,t);localStorage.setItem("cf_conversion_key",n),localStorage.setItem("cf_conversion_result",JSON.stringify(r))}catch{}}function Ue(){localStorage.removeItem("cf_conversion_key"),localStorage.removeItem("cf_conversion_result")}const He=(Ke=(e,t)=>{const r=localStorage.getItem("cf_html")??"",i=localStorage.getItem("cf_css")??"",o=localStorage.getItem("cf_js")??"",a=function(e,t){try{const r=localStorage.getItem("cf_conversion_key");if(!r)return null;if(r!==Fe(e,t))return null;const n=localStorage.getItem("cf_conversion_result");return n?JSON.parse(n):null}catch{return null}}(r,i),l="framer"===localStorage.getItem("cf_target_tool")?"framer":"webflow";return{html:r,css:i,js:o,setHtml:r=>{const n=t().html;if(localStorage.setItem("cf_html",r),e({html:r}),r!==n){const r=t().conversionState;"success"!==r&&"copied"!==r||(Ue(),e({conversionState:"idle",conversionResult:null,resultClassCount:0}))}},setCss:r=>{const n=t().css;if(localStorage.setItem("cf_css",r),e({css:r}),r!==n){const r=t().conversionState;"success"!==r&&"copied"!==r||(Ue(),e({conversionState:"idle",conversionResult:null,resultClassCount:0}))}},setJs:t=>{localStorage.setItem("cf_js",t),e({js:t})},activeEditorTab:"html",setActiveEditorTab:t=>e({activeEditorTab:t}),components:{},activeComponentSlot:null,setComponent:(r,n)=>{const s=t().components[r];if(e(e=>({components:{...e.components,[r]:n}})),t().saveCurrentPage(),n!==s){const r=t().conversionState;"success"!==r&&"copied"!==r||(Ue(),e({conversionState:"idle",conversionResult:null,resultClassCount:0}))}},deleteComponent:r=>{const n=r in t().components;if(e(e=>{const t={...e.components};return delete t[r],{components:t,activeComponentSlot:e.activeComponentSlot&&e.activeComponentSlot!==r?e.activeComponentSlot:null}}),t().saveCurrentPage({allowEmptyComponents:!0}),n){const r=t().conversionState;"success"!==r&&"copied"!==r||(Ue(),e({conversionState:"idle",conversionResult:null,resultClassCount:0}))}}
7,setActiveComponentSlot:t=>e({activeComponentSlot:t}),conversionState:a?"success":"idle",conversionResult:a,conversionError:"",resultClassCount:a?We(a):0,lastConversionId:null,setConversionState:t=>e({conversionState:t}),setConversionResult:(r,n)=>{Ge(t().html,t().css,r),e({conversionState:"success",conversionResult:r,resultClassCount:We(r),conversionError:"",lastConversionId:n??null})},setConversionError:t=>e({conversionState:"error",conversionError:t,conversionResult:null,resultClassCount:0}),resetConversion:()=>{Ue(),e({conversionState:"idle",conversionResult:null,conversionError:"",resultClassCount:0})},conversionsThisMonth:0,usageLoaded:!1,setConversionsThisMonth:t=>e({conversionsThisMonth:t,usageLoaded:!0}),targetTool:l,setTargetTool:t=>{localStorage.setItem("cf_target_tool",t),Ue(),e({targetTool:t,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""})},projects:[],activeProjectId:null,loadProjects:async()=>{var r;const n=await Be();if(n){try{let{data:i}=await s.from("projects").select("id, name, created_at, position, styles_enabled, tool, webflow_synced_at, framer_project_id").order("position",{ascending:!0});if(i||(i=(null==(r=(await s.from("projects").select("id, name, created_at").order("created_at",{ascending:!0})).data)?void 0:r.map((e,t)=>({...e,position:t,styles_enabled:!1,tool:"webflow",webflow_synced_at:null,framer_project_id:null})))??null),i){const r=i.map(e=>({id:e.id,name:e.name,createdAt:e.created_at,position:e.position??0,stylesEnabled:e.styles_enabled??!1,isDemo:!1,tool:"framer"===e.tool?"framer":"webflow",webflowSyncedAt:e.webflow_synced_at?new Date(e.webflow_synced_at).getTime():null,framerProjectId:e.framer_project_id??null})),o="true"===localStorage.getItem(`cvx_demo_dismissed_${n}`);let a=o;if(!o)try{const{data:e}=await s.from("profiles").select("demo_dismissed").eq("id",n).single();a=(null==e?void 0:e.demo_dismissed)??!1,a&&localStorage.setItem(`cvx_demo_dismissed_${n}`,"true")}catch{}if(a||r.push({id:Ye,name:"Projets de test",createdAt:(new Date).toISOString(),position:r.length,stylesEnabled:!1,isDemo:!0,tool:"webflow",webflowSyncedAt:null,framerProjectId:null}),r.length>0){const n=localStorage.getItem("cf_active_project"),s=r.find(e=>e.id===n)??r[0],i=s.id;e({projects:r,activeProjectId:i}),localStorage.setItem("cf_active_project",i),s.tool!==t().targetTool&&t().setTargetTool(s.tool)}}}catch{}await Promise.all([t().loadReferenceFiles(),t().loadHistory(!0,!1)]),await t().loadPages()}},setActiveProject:async r=>{t().saveCurrentPage(),e({activeProjectId:r}),localStorage.setItem("cf_active_project",r);const n=t().projects.find(e=>e.id===r);n&&n.tool!==t().targetTool&&t().setTargetTool(n.tool),t().loadReferenceFiles(),await t().loadHistory(!0,!1),await t().loadPages()},createProject:async(r,n,i=null)=>{const o=await Be();if(!o)return;const a=t().projects.length;try{const l={user_id:o,name:r,position:a,tool:n};i&&(l.framer_project_id=i);let{data:c}=await s.from("projects").insert(l).select("id, name, created_at, position, styles_enabled, is_demo, tool, framer_project_id").single();if(!c){const e=await s.from("projects").insert({user_id:o,name:r}).select("id, name, created_at").single();c=e.data?{...e.data,position:a,styles_enabled:!1,is_demo:!1,tool:n,framer_project_id:null}:null}if(c){const r={id:c.id,name:c.name,createdAt:c.created_at,position:c.position??a,stylesEnabled:c.styles_enabled??!1,isDemo:c.is_demo??!1,tool:"framer"===c.tool?"framer":"webflow",webflowSyncedAt:null,framerProjectId:c.framer_project_id??null};e(e=>({projects:[...e.projects,r]})),await t().setActiveProject(r.id)}}catch{}},renameProject:(t,r)=>{e(e=>({projects:e.projects.map(e=>e.id===t?{...e,name:r}:e)})),n&&s.from("projects").update({name:r,updated_at:(new Date).toISOString()}).eq("id",t).then(({error:e})=>{})},deleteProject:r=>{const{projects:i,activeProjectId:o}=t(),a=r===Ye;if(!a&&i.length<=1)return;const l=()=>{var r;const i=t().projects.filter(e=>e.id!==Ye),a=o===Ye?(null==(r=i[0])?void 0:r.id)??null:o;if(e({projects:i,activeProjectId:a}),a&&localStorage.setItem("cf_active_project",a),o===Ye){const e=i.find(e=>e.id===a);e&&e.tool!==t().targetTool&&t().setTargetTool(e.tool),t().loadReferenceFiles(),t().loadHistory(!0,!0)}Be().then(e=>{e&&localStorage.setItem(`cvx_demo_dismissed_${e}`,"true"),e&&n&&s.from("profiles").update({demo_dismissed:!0}).eq("id",e).then(({error:e})=>{})})};if(a){if(i.some(e=>!e.isDemo))l();else{const e="fr"===(localStorage.getItem("cvx_language")??("fr"===navigator.language.slice(0,2)?"fr":"en"))?"Mon projet":"My project";t().createProject(e,"webflow").then(()=>{t().projects.some(e=>!e.isDemo)&&l()})}return}const c=i.filter(e=>e.id!==r),d=o===r?c[0].id:o;if(e({projects:c,activeProjectId:d}),d&&localStorage.setItem("cf_active_project",d),o===r){const e=c.find(e=>e.id===d);e&&e.tool!==t().targetTool&&t().setTargetTool(e.tool),t().loadReferenceFiles(),t().loadHistory(!0,!0)}n&&s.from("projects").delete().eq("id",r).then(({error:e})=>{})},reorderProjects:(r,i)=>{const o=[...t().projects],[a]=o.splice(r,1);o.splice(i,0,a);const l=o.map((e,t)=>({...e,position:t}));e({projects:l}),n&&Promise.all(l.map(e=>s.from("projects").update({position:e.position}).eq("id",e.id))).catch(e=>{})},getActiveProject:()=>{const{projects:e,activeProjectId:r}=t();return e.find(e=>e.id===r)},toggleProjectStyles:r=>{const i=t().projects.find(e=>e.id===r);if(!i)return;const o=!i.stylesEnabled;e(e=>({projects:e.projects.map(e=>e.id===r?{...e,stylesEnabled:o}:e)})),n&&s.from("projects").update({styles_enabled:o,updated_at:(new Date).toISOString()}).eq("id",r).then(({error:e})=>{})},setProjectFramerDestination:async(t,r)=>{if(e(e=>({projects:e.projects.map(e=>e.id===t?{...e,framerProjectId:r}:e)})),n){const{error:e}=await s.from("projects").update({framer_project_id:r,updated_at:(new Date).toISOString()}).eq("id",t)}},pages:[],activePageId:null,loadPages:async()=>{var r;const{activeProjectId:n}=t();if(!n)return;const i=n;
7if(n===Ye){const t=Ie.map(e=>({id:e.id,projectId:Ye,name:e.name,html:e.html,css:e.css,js:e.js,externalScripts:[],position:e.position,components:{}})),r=t[0];return e({pages:t,activePageId:r.id,html:r.html,css:r.css,js:r.js,externalScripts:[],conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""}),localStorage.setItem("cf_active_page",r.id),localStorage.setItem("cf_html",r.html),localStorage.setItem("cf_css",r.css),void localStorage.setItem("cf_js",r.js)}try{const{data:o}=await s.from("pages").select("id, project_id, name, html, css, js, external_scripts, components, position").eq("project_id",n).order("position",{ascending:!0});if(t().activeProjectId!==i)return;if(o&&o.length>0){const t=o.map(e=>({id:e.id,projectId:e.project_id,name:e.name||"Page 1",html:e.html||"",css:e.css||"",js:e.js||"",externalScripts:e.external_scripts||[],position:e.position??0,components:e.components||{}})),n=localStorage.getItem("cf_active_page"),s=(null==(r=t.find(e=>e.id===n))?void 0:r.id)??t[0].id;e({pages:t,activePageId:s}
7),localStorage.setItem("cf_active_page",s);const i=t.find(e=>e.id===s);i&&(localStorage.setItem("cf_html",i.html),localStorage.setItem("cf_css",i.css),localStorage.setItem("cf_js",i.js),Ue(),e({html:i.html,css:i.css,js:i.js,externalScripts:i.externalScripts,components:i.components,activeComponentSlot:Object.keys(i.components)[0]??null,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""}))}else{if(!(await Be())||t().activeProjectId!==i)return;const r=t().history,o=r.length>0?r[0]:null,{data:a}=await s.from("pages").insert({project_id:n,name:"Page 1",html:(null==o?void 0:o.sourceHtml)||"",css:(null==o?void 0:o.sourceCss)||"",js:(null==o?void 0:o.sourceJs)||"",external_scripts:(null==o?void 0:o.externalScripts)||[],position:0}).select("id, project_id, name, html, css, js, external_scripts, components, position").single();if(a&&t().activeProjectId===i){const t={id:a.id,projectId:a.project_id,name:a.name||"Page 1",html:a.html||"",css:a.css||"",js:a.js||"",externalScripts:a.external_scripts||[],position:a.position??0,components:a.components||{}};e({pages:[t],activePageId:t.id}),localStorage.setItem("cf_active_page",t.id),localStorage.setItem("cf_html",t.html),localStorage.setItem("cf_css",t.css),localStorage.setItem("cf_js",t.js),Ue(),e({html:t.html,css:t.css,js:t.js,externalScripts:t.externalScripts,components:t.components,activeComponentSlot:Object.keys(t.components)[0]??null,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""})}}}catch{}},setActivePage:async r=>{const{activePageId:n}=t();if(r===n)return;t().saveCurrentPage();const s=t().pages.find(e=>e.id===r);s&&(localStorage.setItem("cf_active_page",r),localStorage.setItem("cf_html",s.html),localStorage.setItem("cf_css",s.css),localStorage.setItem("cf_js",s.js),Ue(),e({activePageId:r,html:s.html,css:s.css,js:s.js,externalScripts:s.externalScripts,components:s.components||{},activeComponentSlot:Object.keys(s.components||{})[0]??null,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""}))},createPage:async r=>{const{activeProjectId:n,pages:i}=t();if(!n)return;await t().saveCurrentPage();const o=i.length;try{const{data:t}=await s.from("pages").insert({project_id:n,name:r,html:"",css:"",js:"",external_scripts:[],position:o}).select("id, project_id, name, html, css, js, external_scripts, components, position").single();if(t){const r={id:t.id,projectId:t.project_id,name:t.name,html:"",css:"",js:"",externalScripts:[],position:t.position??o,components:{}};localStorage.setItem("cf_active_page",r.id),localStorage.setItem("cf_html",""),localStorage.setItem("cf_css",""),localStorage.setItem("cf_js",""),Ue(),e(e=>({pages:[...e.pages,r],activePageId:r.id,html:"",css:"",js:"",externalScripts:[],components:{},activeComponentSlot:null,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""}))}}catch{}},renamePage:(t,r)=>{e(e=>({pages:e.pages.map(e=>e.id===t?{...e,name:r}:e)})),n&&s.from("pages").update({name:r,updated_at:(new Date).toISOString()}).eq("id",t).then(({error:e})=>{})},reorderPages:(r,i)=>{const o=[...t().pages],[a]=o.splice(r,1);o.splice(i,0,a);const l=o.map((e,t)=>({...e,position:t}));e({pages:l}),n&&Promise.all(l.map(e=>s.from("pages").update({position:e.position}).eq("id",e.id))).catch(e=>{})},deletePage:r=>{const{pages:i,activePageId:o}=t();if(i.length<=1)return;const a=i.filter(e=>e.id!==r);if(o===r){const t=a[0];localStorage.setItem("cf_active_page",t.id),localStorage.setItem("cf_html",t.html),localStorage.setItem("cf_css",t.css),localStorage.setItem("cf_js",t.js),Ue(),e({pages:a,activePageId:t.id,html:t.html,css:t.css,js:t.js,externalScripts:t.externalScripts,components:t.components||{},activeComponentSlot:Object.keys(t.components||{})[0]??null,conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""})}else e({pages:a});n&&s.from("pages").delete().eq("id",r).then(({error:e})=>{})},saveCurrentPage:async r=>{const{activePageId:i,html:o,css:a,js:l,externalScripts:c,components:d,pages:h}=t();if(!i)return;const u=h.find(e=>e.id===i);if(!u)return;const p=t().getActiveProject();if(null==p?void 0:p.isDemo)return;const f=u.components||{},m=d||{},g=0===Object.keys(m).length&&Object.keys(f).length>0&&!(null==r?void 0:r.allowEmptyComponents)?f:m;if((u.html!==o||u.css!==a||u.js!==l||JSON.stringify(u.externalScripts)!==JSON.stringify(c)||JSON.stringify(u.components||{})!==JSON.stringify(g))&&(e(e=>({pages:e.pages.map(e=>e.id===i?{...e,html:o,css:a,js:l,externalScripts:c,components:g}:e)})),n))try{await s.from("pages").update({html:o,css:a,js:l,external_scripts:c.length>0?c:[],components:g,updated_at:(new Date).toISOString()}).eq("id",i)}catch{}},getActivePage:()=>{const{pages:e,activePageId:r}=t();return e.find(e=>e.id===r)},referenceFiles:[],loadReferenceFiles:async()=>
7{if(!(await Be()))return;const{activeProjectId:r}=t();if(r!==Ye)try{let t=s.from("reference_styles").select("id, name, raw_json, class_count, combo_count, created_at, source, source_site_id, synced_at").order("created_at",{ascending:!1});r&&(t=t.eq("project_id",r));const{data:n}=await t;n&&e({referenceFiles:n.map(e=>({id:e.id,name:e.name||"Fichier JSON",rawJson:e.raw_json,classCount:e.class_count??0,comboCount:e.combo_count??0,addedAt:new Date(e.created_at).getTime(),source:"webflow_sync"===e.source?"webflow_sync":"manual",sourceSiteId:e.source_site_id??null,syncedAt:e.synced_at?new Date(e.synced_at).getTime():null}))})}catch{}else e({referenceFiles:[]})},addReferenceFile:async r=>{try{JSON.parse(r)}catch{return!1}const n=Ve(r),{activeProjectId:i}=t();let o;const a=await Be();if(a)try{const{data:e}=await s.from("reference_styles").insert({user_id:a,name:n.name,raw_json:r,class_count:n.classCount,combo_count:n.comboCount,project_id:i}).select("id").single();o=null==e?void 0:e.id}catch{}const l={id:o??crypto.randomUUID(),name:n.name,rawJson:r,classCount:n.classCount,comboCount:n.comboCount,addedAt:Date.now(),source:"manual",sourceSiteId:null,syncedAt:null};return e(e=>({referenceFiles:[l,...e.referenceFiles]})),!0},removeReferenceFile:t=>{e(e=>({referenceFiles:e.referenceFiles.filter(e=>e.id!==t)})),n&&s.from("reference_styles").delete().eq("id",t).then(({error:e})=>{})},renameReferenceFile:(t,r)=>{e(e=>({referenceFiles:e.referenceFiles.map(e=>e.id===t?{...e,name:r}:e)})),n&&s.from("reference_styles").update({name:r}).eq("id",t).then(({error:e})=>{})},removeClassFromFile:async(r,i)=>{var o,a;const l=t().referenceFiles.find(e=>e.id===r);if(!l)return;let c;try{c=JSON.parse(l.rawJson)}catch{return}const d=null==(o=null==c?void 0:c.payload)?void 0:o.styles;if(!Array.isArray(d))return;const h=d.length,u=d.filter(e=>e._id!==i);if(u.length===h)return;for(const e of u)Array.isArray(e.children)&&(e.children=e.children.filter(e=>e!==i));const p=JSON.stringify({type:c.type??"@webflow/XscpData",payload:{nodes:(null==(a=c.payload)?void 0:a.nodes)??[],styles:u}}),f=Ve(p);if(e(e=>({referenceFiles:e.referenceFiles.map(e=>e.id===r?{...e,rawJson:p,classCount:f.classCount,comboCount:f.comboCount}:e)})),n){const{error:e}=await s.from("reference_styles").update({raw_json:p,class_count:f.classCount,combo_count:f.comboCount}).eq("id",r)}},getTotalRefClassCount:()=>t().referenceFiles.reduce((e,t)=>e+t.classCount,0),getMergedReferenceStyles:()=>{var e;const r=t().referenceFiles;if(0!==r.length)try{const t=[];for(const n of r){const r=JSON.parse(n.rawJson),s=null==(e=null==r?void 0:r.payload)?void 0:e.styles;if(Array.isArray(s)){for(const e of s)e&&"object"==typeof e&&(e.__source=n.source);t.push(...s)}}return JSON.stringify({type:"@webflow/XscpData",payload:{nodes:[],styles:t}})}catch{return r[0].rawJson}},history:[],loadHistory:async(r,n)=>{if(!r&&t().history.length>0)return;if(!(await Be()))return;const{activeProjectId:i}=t();if(i!==Ye)try{let r=s.from("conversions").select("id, created_at, class_count, result_json, name, source_html, source_css, source_js, external_scripts").eq("success",!0).not("result_json","is",null).order("created_at",{ascending:!1}).limit(20);i&&(r=r.eq("project_id",i));let{data:o,error:a}=await r;if(a&&(o=(await s.from("conversions").select("id, created_at, class_count, result_json, name, source_html, source_css, source_js").eq("success",!0).not("result_json","is",null).order("created_at",{ascending:!1}).limit(20)).data),o&&(e({history:o.map(e=>({id:e.id,name:e.name||`Conversion â ${e.class_count??0} classes`,date:e.created_at,classCount:e.class_count??0,json:e.result_json,sourceHtml:e.source_html||void 0,sourceCss:e.source_css||void 0,sourceJs:e.source_js||void 0,externalScripts:e.external_scripts||void 0}))}),n)){const r=t().history;r.length>0?t().restoreHistoryEntry(r[0].id):(localStorage.setItem("cf_html",""),localStorage.setItem("cf_css",""),localStorage.setItem("cf_js",""),Ue(),e({html:"",css:"",js:"",conversionState:"idle",conversionResult:null,resultClassCount:0,conversionError:""}))}}catch{}else e({history:[]})},addHistoryEntry:(r,i,o,a,l,c,d)=>{var h;const{activeProjectId:u,externalScripts:p,history:f}=t(),m=(null==(h=t().getActivePage())?void 0:h.name)??"Page 1",g=f.filter(e=>e.name.startsWith(`${m} (V`)).length+1,O=`${m} (V${g})`,x=d??p;l&&n&&s.from("conversions").update({name:O}).eq("id",l).then(()=>{}),!l&&n&&Be().then(t=>{t&&s.from("conversions").insert({user_id:t,converter:"webflow",html_size:o.length,css_size:a.length,success:!0,result_json:i,class_count:r,name:O,project_id:u,source_html:o,source_css:a,source_js:c||null,external_scripts:x.length>0?x:null}).select("id").single().then(({data:t})=>{(null==t?void 0:t.id)&&e(e=>({history:e.history.map(e=>
7e.id===b?{...e,id:t.id}:e)}))})});const b=l??crypto.randomUUID(),v={id:b,name:O,date:(new Date).toISOString(),classCount:r,json:i,sourceHtml:o,sourceCss:a,sourceJs:c||void 0,externalScripts:x.length>0?x:void 0};e(e=>({history:[v,...e.history].slice(0,20)}))},restoreHistoryEntry:r=>{const n=t().history.find(e=>e.id===r);n&&(null!=n.sourceHtml&&(localStorage.setItem("cf_html",n.sourceHtml),e({html:n.sourceHtml})),null!=n.sourceCss&&(localStorage.setItem("cf_css",n.sourceCss),e({css:n.sourceCss})),null!=n.sourceJs&&(localStorage.setItem("cf_js",n.sourceJs),e({js:n.sourceJs})),n.externalScripts&&(localStorage.setItem("cf_external_scripts",JSON.stringify(n.externalScripts)),e({externalScripts:n.externalScripts})),n.json&&(Ge(n.sourceHtml??t().html,n.sourceCss??t().css,n.json),e({conversionState:"success",conversionResult:n.json,resultClassCount:We(n.json),conversionError:""})))},renameHistoryEntry:async(r,i)=>{var o;const a=null==(o=t().history.find(e=>e.id===r))?void 0:o.name;if(e(e=>({history:e.history.map(e=>e.id===r?{...e,name:i}:e)})),!n)return;const{data:l,error:c}=await s.from("conversions").update({name:i}).eq("id",r).select("id");!c&&l&&0!==l.length||e(e=>({history:e.history.map(e=>e.id===r?{...e,name:a??e.name}:e)}))},removeHistoryEntry:t=>{e(e=>({history:e.history.filter(e=>e.id!==t)})),n&&s.from("conversions").delete().eq("id",t).then(({error:e})=>{})},autoSaveStyles:async()=>{},clearAllReferences:async()=>{const r=t().referenceFiles.map(e=>e.id);if(0!==r.length&&(e({referenceFiles:[]}),n)){const{error:e}=await s.from("reference_styles").delete().in("id",r)}},countNewGeneratedClasses:()=>{var e,r;const n=t().conversionResult,s=null==(e=null==n?void 0:n.payload)?void 0:e.styles;if(!Array.isArray(s))return 0;const i=new Set;for(const a of t().referenceFiles)try{const e=JSON.parse(a.rawJson);for(const t of(null==(r=e.payload)?void 0:r.styles)??[])"string"==typeof t._id&&i.add(t._id)}catch{}let o=0;for(const t of s)t&&"string"==typeof t._id&&"string"==typeof t.name&&"class"===t.type&&!i.has(t._id)&&o++;return o},externalScripts:(()=>{try{const e=localStorage.getItem("cf_external_scripts");return e?JSON.parse(e):[]}catch{return[]}})(),scriptsPanelOpen:!1,setScriptsPanelOpen:t=>e({scriptsPanelOpen:t}),addExternalScript:(r,n,s)=>{const i=t().externalScripts;if(i.some(e=>e.url===r))return;const o=[...i,{id:crypto.randomUUID(),url:r,type:n,label:s||r.split("/").pop()||"Script",enabled:!0,autoDetected:!1}];localStorage.setItem("cf_external_scripts",JSON.stringify(o)),e({externalScripts:o})},removeExternalScript:r=>{const n=t().externalScripts.find(e=>e.id===r),s=t().externalScripts.filter(e=>e.id!==r);if(localStorage.setItem("cf_external_scripts",JSON.stringify(s)),null==n?void 0:n.autoDetected)try{const e=JSON.parse(localStorage.getItem("cf_dismissed_scripts")||"[]");e.includes(n.url)||(e.push(n.url),localStorage.setItem("cf_dismissed_scripts",JSON.stringify(e)))}catch{}e({externalScripts:s})},toggleExternalScript:r=>{const n=t().externalScripts.map(e=>e.id===r?{...e,enabled:!e.enabled}:e);localStorage.setItem("cf_external_scripts",JSON.stringify(n)),e({externalScripts:n})},updateExternalScriptUrl:(r,n)=>{const s=t().externalScripts.map(e=>e.id===r?{...e,url:n}:e);localStorage.setItem("cf_external_scripts",JSON.stringify(s)),e({externalScripts:s})},renameExternalScript:(r,n)=>{const s=t().externalScripts.map(e=>e.id===r?{...e,label:n}:e);localStorage.setItem("cf_external_scripts",JSON.stringify(s)),e({externalScripts:s})},syncDetectedScripts:()=>{const{html:r,css:n,js:s,externalScripts:i}=t(),o=function(e,t,r){const n=[];for(const s of qe)if(s.detect(e,t,r))for(const e of s.resources)n.push({id:e.url,url:e.url,type:e.type,label:`${s.name} (${e.type.toUpperCase()})`,enabled:!0,autoDetected:!0});return n}(r,n,s),a=new Set(o.map(e=>e.url)),l=function(){const e=new Set;for(const t of qe)for(const r of t.resources)e.add(r.url);return e}();let c=[];try{c=JSON.parse(localStorage.getItem("cf_dismissed_scripts")||"[]")}catch{}const d=c.filter(e=>a.has(e));d.length!==c.length&&localStorage.setItem("cf_dismissed_scripts",JSON.stringify(d));const h=i.filter(e=>!(e.autoDetected&&l.has(e.url)&&!a.has(e.url))),u=new Set(h.map(e=>e.url)),p=new Set(d),f=o.filter(e=>!u.has(e.url)&&!p.has(e.url));if(0===f.length&&h.length===i.length)return;const m=[...h,...f];localStorage.setItem("cf_external_scripts",JSON.stringify(m)),e({externalScripts:m})},stylesPanelOpen:!1,setStylesPanelOpen:t=>e({stylesPanelOpen:t}),historyPanelOpen:!1,setHistoryPanelOpen:t=>e({historyPanelOpen:t}),splitRatio:30,setSplitRatio:t=>e({splitRatio:t}),inspectedElementHtml:null,setInspectedElementHtml:t=>e({inspectedElementHtml:t})}},Ke?Le(Ke):Le);var Ke;function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var et,tt="clover",rt="https://js.stripe.com",nt="".concat(rt,"/").concat(tt,"/stripe.js"),st=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,it=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,ot=function(e){return st.test(e)||it.test(e)},at=function(e){var t=document.createElement("script");t.src="".concat(nt).concat("");var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(t),t},lt=null,ct=null,dt=null,ht=function(e){return null!==lt?lt:(lt=new Promise(function(t,r){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe)t(window.Stripe);else try{var n=function(){for(var e=document.querySelectorAll('script[src^="'.concat(rt,'"]')),t=0;t<e.length;t++){var r=e[t];if(ot(r.src))return r}return null}();if(n&&e);else if(n){if(n&&null!==dt&&null!==ct){var s;n.removeEventListener("load",dt),n.removeEventListener("error",ct),null===(s=n.parentNode)||void 0===s||s.removeChild(n),n=at()}}else n=at();dt=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}}(t,r),ct=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}}(r),n.addEventListener("load",dt),n.addEventListener("error",ct)}catch(i){return void r(i)}else t(null)}),lt.catch(function(e){return lt=null,Promise.reject(e)}))}
7,ut=function(){return et||(et=ht(null).catch(function(e){return et=null,Promise.reject(e)}))};Promise.resolve().then(function(){return ut()}).catch(function(e){});var pt,ft,mt,gt,Ot,xt=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];0;var n=Date.now();return ut().then(function(e){return function(e,t,r){if(null===e)return null;var n=t[0];if("string"!=typeof n)throw new Error("Expected publishable key to be of type string, got type ".concat(Je(n)," instead."));n.match(/^pk_test/),e.version;var s=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"8.9.0",startTime:t})}(s,r),s}(e,t,n)})},bt={exports:{}};function vt(){if(ft)return pt;ft=1;return pt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function yt(){if(gt)return mt;gt=1;var e=vt();function t(){}function r(){}return r.resetWarningCache=t,mt=function(){function n(t,r,n,s,i,o){if(o!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function s(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}function wt(){return Ot||(Ot=1,bt.exports=yt()()),bt.exports}const St=i(wt());function kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(r),!0).forEach(function(t){Pt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $t(e,t){if(null==e)return{};var r,n,s=function(e,t){if(null==e)return{};var r,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,s,i=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(l){a=!0,s=l}finally{try{o||null==r.return||r.return()}finally{if(a)throw s}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ct(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ct(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Tt=function(e,t,n){var s=!!n,i=r.useRef(n);r.useEffect(function(){i.current=n},[n]),r.useEffect(function(){if(!s||!e)return function(){};var r=function(){i.current&&i.current.apply(i,arguments)};return e.on(t,r),function(){e.off(t,r)}},[s,t,e,i])},Nt=function(e){var t=r.useRef(e);return r.useEffect(function(){t.current=e},[e]),t.current},Et=function(e){return null!==e&&"object"===Qt(e)},At="[object Object]",zt=function e(t,r){if(!Et(t)||!Et(r))return t===r;var n=Array.isArray(t);if(n!==Array.isArray(r))return!1;var s=Object.prototype.toString.call(t)===At;if(s!==(Object.prototype.toString.call(r)===At))return!1;if(!s&&!n)return t===r;var i=Object.keys(t),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a={},l=0;l<i.length;l+=1)a[i[l]]=!0;for(var c=0;c<o.length;c+=1)a[o[c]]=!0;var d=Object.keys(a);if(d.length!==i.length)return!1;var h=t,u=r;return d.every(function(t){return e(h[t],u[t])})},Zt=function(e,t,r){return Et(e)?Object.keys(e).reduce(function(n,s){var i=!Et(t)||!zt(e[s],t[s]);return r.includes(s)?n:i?jt(jt({},n||{}),{},Pt({},s,e[s])):n},null):null},Rt="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Xt=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rt;if(null===e||Et(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;throw new Error(r)},Mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rt;if(function(e){return Et(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return Xt(e,t)})};var r=Xt(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}},Dt=r.createContext(null);Dt.displayName="ElementsContext";var Lt=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},Yt=function(e){var t=e.stripe,n=e.options,s=e.children,i=r.useMemo(function(){return Mt(t)},[t]),o=_t(r.useState(function(){return{stripe:"sync"===i.tag?i.stripe:null,elements:"sync"===i.tag?i.stripe.elements(n):null}}),2),a=o[0],l=o[1];r.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return"async"!==i.tag||a.stripe?"sync"!==i.tag||a.stripe||t(i.stripe):i.stripePromise.then(function(r){r&&e&&t(r)}),function(){e=!1}},[i,a,n]);var c=Nt(t);r.useEffect(function(){},[c,t]);var d=Nt(n);return r.useEffect(function(){if(a.elements){var e=Zt(n,d,["clientSecret","fonts"]);e&&a.elements.update(e)}},[n,d,a.elements]),r.useEffect(function(){var e;
7(e=a.stripe)&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"5.6.1"}),e.registerAppInfo({name:"react-stripe-js",version:"5.6.1",url:"https://stripe.com/docs/stripe-js/react"}))},[a.stripe]),r.createElement(Dt.Provider,{value:a},s)};Yt.propTypes={stripe:St.any,options:St.object};var It=function(){var e,t;return(e="calls useElements()",t=r.useContext(Dt),Lt(t,e)).elements};St.func.isRequired;var qt=r.createContext(null);qt.displayName="CheckoutContext",St.any,St.shape({clientSecret:St.oneOfType([St.string,St.instanceOf(Promise)]).isRequired,elementsOptions:St.object}).isRequired;var Vt=function(e){var t=r.useContext(qt),n=r.useContext(Dt);if(t){if(n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return t}return Lt(n,e)},Wt=["mode"],Bt=function(e,t){var n,s="".concat((n=e).charAt(0).toUpperCase()+n.slice(1),"Element"),i=t?function(e){Vt("mounts <".concat(s,">"));var t=e.id,n=e.className;return r.createElement("div",{id:t,className:n})}:function(t){var n,i=t.id,o=t.className,a=t.options,l=void 0===a?{}:a,c=t.onBlur,d=t.onFocus,h=t.onReady,u=t.onChange,p=t.onEscape,f=t.onClick,m=t.onLoadError,g=t.onLoaderStart,O=t.onNetworksChange,x=t.onConfirm,b=t.onCancel,v=t.onShippingAddressChange,y=t.onShippingRateChange,w=t.onSavedPaymentMethodRemove,S=t.onSavedPaymentMethodUpdate,k=Vt("mounts <".concat(s,">")),j="elements"in k?k.elements:null,Q="checkoutState"in k?k.checkoutState:null,P="success"===(null==Q?void 0:Q.type)||"loading"===(null==Q?void 0:Q.type)?Q.sdk:null,$=_t(r.useState(null),2),_=$[0],C=$[1],T=r.useRef(null),N=r.useRef(null);Tt(_,"blur",c),Tt(_,"focus",d),Tt(_,"escape",p),Tt(_,"click",f),Tt(_,"loaderror",m),Tt(_,"loaderstart",g),Tt(_,"networkschange",O),Tt(_,"confirm",x),Tt(_,"cancel",b),Tt(_,"shippingaddresschange",v),Tt(_,"shippingratechange",y),Tt(_,"savedpaymentmethodremove",w),Tt(_,"savedpaymentmethodupdate",S),Tt(_,"change",u),h&&(n="expressCheckout"===e?h:function(){h(_)}),Tt(_,"ready",n),r.useLayoutEffect(function(){if(null===T.current&&null!==N.current&&(j||P)){var t=null;if(P)switch(e){case"paymentForm":t=P.createPaymentFormElement(l);break;case"payment":t=P.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var r=l.mode,n=$t(l,Wt);if("shipping"===r)t=P.createShippingAddressElement(n);else{if("billing"!==r)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=P.createBillingAddressElement(n)}break;case"expressCheckout":t=P.createExpressCheckoutElement(l);break;case"currencySelector":t=P.createCurrencySelectorElement();break;case"taxId":t=P.createTaxIdElement(l);break;default:throw new Error("Invalid Element type ".concat(s,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else j&&(t=j.create(e,l));T.current=t,C(t),t&&t.mount(N.current)}},[j,P,l]);var E=Nt(l);return r.useEffect(function(){if(T.current){var e=Zt(l,E,["paymentRequest"]);e&&"update"in T.current&&T.current.update(e)}},[l,E]),r.useLayoutEffect(function(){return function(){if(T.current&&"function"==typeof T.current.destroy)try{T.current.destroy(),T.current=null}catch(e){}}},[]),r.createElement("div",{id:i,className:o,ref:N})};return i.propTypes={id:St.string,className:St.string,onChange:St.func,onBlur:St.func,onFocus:St.func,onReady:St.func,onEscape:St.func,onClick:St.func,onLoadError:St.func,onLoaderStart:St.func,onNetworksChange:St.func,onConfirm:St.func,onCancel:St.func,onShippingAddressChange:St.func,onShippingRateChange:St.func,onSavedPaymentMethodRemove:St.func,onSavedPaymentMethodUpdate:St.func,options:St.object},i.displayName=s,i.__elementType=e,i},Ft="undefined"==typeof window;r.createContext(null).displayName="EmbeddedCheckoutProviderContext";var Gt=function(){return Vt("calls useStripe()").stripe};Bt("auBankAccount",Ft),Bt("card",Ft),Bt("cardNumber",Ft),Bt("cardExpiry",Ft),Bt("cardCvc",Ft),Bt("iban",Ft);var Ut=Bt("payment",Ft);Bt("expressCheckout",Ft),Bt("paymentRequestButton",Ft),Bt("linkAuthentication",Ft),Bt("address",Ft),Bt("shippingAddress",Ft),Bt("paymentMethodMessaging",Ft),Bt("taxId",Ft);const Ht=xt("pk_live_51TAYgsLYNFPv3laeo7lJFAFIs4BznYeT8zZyMg1kM3aeDbgR0YxeKR9VDt8bUYPSSWyCpyUfBoOhR0UDZtuEPF1u00x5duqVAe"),Kt={theme:"night",variables:{colorPrimary:"#2b7ff9",colorBackgroun
7d:"#141414",colorText:"#ededed",colorTextSecondary:"#707070",colorTextPlaceholder:"#444",colorDanger:"#ff6b6b",fontFamily:'"Inter", system-ui, sans-serif',fontSizeBase:"14px",borderRadius:"10px",spacingUnit:"4px"},rules:{".Input":{border:"1px solid #2a2a2a",boxShadow:"none",backgroundColor:"#0e0e0e"},".Input:focus":{border:"1px solid #2b7ff9",boxShadow:"0 0 0 1px rgba(43,127,249,0.3)"},".Label":{color:"#888",fontSize:"12px",fontWeight:"500"},".Tab":{border:"1px solid #2a2a2a",backgroundColor:"#141414",color:"#888"},".Tab:hover":{color:"#ededed",border:"1px solid #444"},".Tab--selected":{border:"1px solid #2b7ff9",backgroundColor:"#1a1a2e",color:"#ededed"},".Tab--selected:hover":{color:"#ededed",border:"1px solid #2b7ff9"}}};async function Jt(){const{data:{session:e}}=await s.auth.getSession();if(!e)throw new Error("Not authenticated");return{"Content-Type":"application/json",Authorization:`Bearer ${e.access_token}`}}function er({onSuccess:e}){const{t:t}=o(),r=Gt(),n=It(),[s,i]=l.useState(!1),[a,d]=l.useState("");return c.jsxs("form",{onSubmit:async function(s){if(s.preventDefault(),!r||!n)return;i(!0),d("");const{error:o,setupIntent:a}=await r.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(o)return d(o.message||t.converter.updatePayment.validationError),void i(!1);try{const r=await Jt(),n=await fetch("/api/update-payment-method",{method:"POST",headers:r,body:JSON.stringify({setupIntentId:null==a?void 0:a.id})});if(!n.ok){const e=await n.json();throw new Error(e.error||t.converter.updatePayment.updateError)}e()}catch(l){d(l instanceof Error?l.message:t.converter.updatePayment.updateError),i(!1)}},className:"space-y-4",children:[c.jsx(Ut,{options:{layout:"tabs"}}),a&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2",children:a}),c.jsx("button",{type:"submit",disabled:!r||s,className:"w-full py-3 rounded-xl bg-[#2b7ff9] hover:bg-[#1161d4] text-white text-sm font-semibold transition-all disabled:opacity-50 flex items-center justify-center gap-2 shadow-[0_4px_20px_rgba(43,127,249,0.3)] cursor-pointer",children:s?c.jsxs(c.Fragment,{children:[c.jsx(g,{size:15,className:"animate-spin"}),t.converter.updatePayment.updating]}):c.jsxs(c.Fragment,{children:[c.jsx(ce,{size:15}),t.converter.updatePayment.updateBtn]})}),c.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-[10px] text-[#555]",children:[c.jsx(Ce,{size:10}),t.converter.updatePayment.securePayment]})]})}function tr({onClose:e}){const{t:t}=o(),{refreshProfile:r}=a(),[n,s]=l.useState(null),[i,d]=l.useState(!0),[h,u]=l.useState(!1),[m,O]=l.useState(""),[x,b]=l.useState(!1);function v(){b(!0),setTimeout(e,150)}return l.useEffect(()=>{(async()=>{try{const e=await Jt(),r=await fetch("/api/create-setup-intent",{method:"POST",headers:e});if(!r.ok){const e=await r.json();throw new Error(e.error||t.converter.updatePayment.loadError)}const{clientSecret:n}=await r.json();s(n)}catch(e){O(e instanceof Error?e.message:t.converter.updatePayment.loadError)}finally{d(!1)}})()},[]),c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-[60] "+(x?"animate-fade-out":"animate-fade-in"),onClick:v}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4",onClick:v,children:c.jsxs("div",{className:"relative bg-[#111] border border-[#222] rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto overflow-x-hidden "+(x?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"absolute -top-px -left-px -right-px h-40 bg-gradient-to-b from-[#e5c07b]/10 to-transparent rounded-t-2xl pointer-events-none"}),c.jsx("button",{onClick:v,className:"absolute top-4 right-4 z-10 p-1.5 rounded-lg text-[#555] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:c.jsx(p,{size:16})}),h?c.jsxs("div",{className:"relative px-6 py-20 text-center space-y-4",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-emerald-500/15 flex items-center justify-center mx-auto",children:c.jsx(f,{size:28,className:"text-emerald-400"})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-base font-semibold text-[#ededed]",children:t.converter.updatePayment.success}),c.jsx("p",{className:"text-xs text-[#707070] mt-1",children:t.converter.updatePayment.successDesc})]})]}):c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"px-6 pt-6 pb-4",children:[c.jsxs("div",{className:"flex items-center gap-2.5 mb-1",children:[c.jsx("div",{className:"w-9 h-9 rounded-xl bg-[#e5c07b]/10 flex items-center justify-center",children:c.jsx(ce,{size:18,className:"text-[#e5c07b]"})}),c.jsx("h2",{className:"text-base font-semibold text-[#ededed]",children:t.converter.updatePayment.title})]}),c.jsx("p",{className:"text-xs text-[#707070] mt-2",children:t.converter.updatePayment.description})]}),c.jsx("div",{className:"mx-6 h-px bg-[#1a1a1a]"}),c.jsxs("div",{className:"px-6 py-5",children:[m&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2 mb-4",children:m}),i&&c.jsx("div",{className:"flex items-center justify-center py-16",children:c.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c.jsx(g,{size:20,className:"animate-spin text-[#2b7ff9]"}),c.jsx("span",{className:"text-xs text-[#555]",children:t.converter.updatePayment.loadingLabel})]})}),n&&!i&&c.jsx(Yt,{stripe:Ht,options:{clientSecret:n,appearance:Kt},children:c.jsx(er,{onSuccess:async function(){u(!0),await r(),setTimeout(v,2e3)}})})]})]})]})})]})}function rr(){const{t:e}=o(),{profile:t}=a(),[r,n]=l.useState(!1);if(!(null==t?void 0:t.payment_failed_at)||!(null==t?void 0:t.grace_peri
7od_ends_at)||"beta"===(null==t?void 0:t.plan))return null;const s=new Date(t.grace_period_ends_at),i=new Date,d=Math.max(0,Math.ceil((s.getTime()-i.getTime())/864e5)),h=d<=2;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-center gap-3 px-4 py-2.5 text-xs flex-shrink-0 "+(h?"bg-[#e06c75]/15 border-b border-[#e06c75]/20":"bg-[#e5c07b]/10 border-b border-[#e5c07b]/20"),children:[c.jsx(O,{size:14,className:"flex-shrink-0 "+(h?"text-[#e06c75]":"text-[#e5c07b]")}),c.jsxs("span",{className:h?"text-[#e06c75]":"text-[#e5c07b]",children:[e.converter.paymentFailed.paymentFailed," ",d>0?(d>1?e.converter.paymentFailed.daysLeftPlural:e.converter.paymentFailed.daysLeft).replace("{count}",String(d)):e.converter.paymentFailed.accessRestricted]}),c.jsxs("button",{onClick:()=>n(!0),className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-semibold transition-colors flex-shrink-0 cursor-pointer "+(h?"bg-[#e06c75] text-white hover:bg-[#c85a63]":"bg-[#e5c07b] text-[#1a1400] hover:bg-[#d4af5a]"),children:[c.jsx(ce,{size:12}),e.converter.paymentFailed.updatePayment]})]}),r&&c.jsx(tr,{onClose:()=>n(!1)})]})}async function nr(){const{data:{session:e}}=await s.auth.getSession();if(!e)throw new Error("Non authentifié");return{"Content-Type":"application/json",Authorization:`Bearer ${e.access_token}`}}async function sr(e){const t=await e.text();let r;try{r=JSON.parse(t)}catch{throw new Error(t||`Erreur serveur (${e.status}) â le serveur n'a pas renvoyé de JSON valide`)}if(!e.ok){const t=r,n=[t.error,t.step?`Ãtape: ${t.step}`:"",t.details].filter(Boolean).join("\n");throw new Error(n||`Erreur serveur (${e.status})`)}return r}async function ir(e){const t=await nr();return sr(await fetch("/api/convert",{method:"POST",headers:t,body:JSON.stringify(e)}))}async function or(){const e=await nr();return sr(await fetch("/api/convert",{method:"GET",headers:e}))}async function ar(){const{data:{session:e}}=await s.auth.getSession();if(!e)throw new Error("Non authentifié.");return{"Content-Type":"application/json",Authorization:`Bearer ${e.access_token}`}}async function lr(e){const t=await e.text();let r;try{r=JSON.parse(t)}catch{throw new Error(t||`Erreur serveur (${e.status})`)}if(!e.ok){const t=r,n=[t.error,t.details].filter(Boolean);throw new Error(n.join(" â ")||`Erreur serveur (${e.status})`)}return r}async function cr(e){const t=await ar(),r=await fetch("/api/framer/connect-project",{method:"POST",headers:t,body:JSON.stringify(e)});return(await lr(r)).project}function dr(){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let t="";for(let r=0;r<9;r++)t+=e[Math.floor(62*Math.random())];return t}function hr({onClose:e,onConnected:t,withConvertexProjectName:r=!1,initialConvertexProjectName:n="",initialLabel:s="",initialProjectUrl:i="",title:a,subtitle:d,submitLabel:h}){const{t:u}=o(),f=u.converter.connectFramer,m=a??f.titleConnect,O=d??f.subtitleConnect,x=h??f.submitConnect,[b,v]=l.useState(n),[y,w]=l.useState(s),[S,j]=l.useState(i),[Q,P]=l.useState(""),[$,_]=l.useState(!1),[C,T]=l.useState(!1),[N,E]=l.useState(""),[A,z]=l.useState(!1);function Z(){C||(z(!0),setTimeout(()=>e(),150))}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60 backdrop-blur-sm "+(A?"animate-fade-out":"animate-fade-in"),onClick:Z}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4 pointer-events-none",children:c.jsxs("div",{className:"pointer-events-auto w-full max-w-[520px] max-h-[90vh] overflow-y-auto bg-[#1a1a1c] border border-[#2e2e2e] rounded-xl shadow-2xl "+(A?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"px-5 py-4 border-b border-[#2e2e2e] flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-[15px] font-semibold text-white",children:m}),c.jsx("p",{className:"text-[12px] text-[#8a8a8a] mt-0.5",children:O})]}),c.jsx("button",{onClick:Z,disabled:C,className:"text-[#8a8a8a] hover:text-white transition-colors p-1 -m-1 disabled:opacity-40","aria-label":u.common.actions.close,children:c.jsx(p,{size:18})})]}),c.jsxs("form",{onSubmit:async function(e){if(e.preventDefault(),(!r||b.trim())&&y.trim()&&S.trim()&&Q.trim()){T(!0),E("");try{const e=await cr({label:y.trim(),projectUrl:S.trim(),apiKey:Q.trim()});t(e,r?b.trim():void 0),Z()}catch(n){E(n instanceof Error?n.message:f.connectError)}finally{T(!1)}}},className:"p-5 space-y-4",children:[r&&c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] font-medium text-[#c4c4c4] mb-1.5",children:f.convertexProjectName}),c.jsx("input",{type:"text",value:b,onChange:e=>v(e.target.value),placeholder:f.convertexProjectNamePlaceholder,disabled:C,maxLength:30,className:"w-full px-3 py-2 bg-[#0d0d0e] border border-[#2e2e2e] rounded-md text-[13px] text-white placeholder-[#5a5a5a] focus:outline-none focus:border-[#61DAFB] disabled:opacity-50"}),c.jsx("p",{className:"text-[11px] text-[#6a6a6a] mt-1",children:f.convertexProjectNameHint})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] font-medium text-[#c4c4c4] mb-1.5",children:r?f.destinationName:f.projectName}),c.jsx("input",{type:"text",value:y,onChange:e=>w(e.target.value),placeholder:f.projectNamePlaceholder,disabled:C,maxLength:60,className:"w-full px-3 py-2 bg-[#0d0d0e] border border-[#2e2e2e] rounded-md text-[13px] text-white placeholder-[#5a5a5a] focus:outline-none focus:border-[#61DAFB] disabled:opacity-50"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] font-medium text-[#c4c4c4] mb-1.5",children:f.projectLink}),c.jsx("input",{type:"url",value:S,onChange:e=>j(e.target.value),placeholder:"https://framer.com/projects/Mon-Site--xxxxxxx",disabled:C,className:"w-full px-3 py-2 bg-[#0d0d0e] border border-[#2e2e2e] rounded-md text-[13px] text-white placeholder-[#5a5a5a] focus:outline-none focus:border-[#61DAFB] disabled:opacity-50"}),c.jsx("p",{className:"text-[11px] text-[#6a6a6a] mt-1",children:f.projectLinkHint})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"block text-[12px] font-medium text-[#c4c4c4] mb-1.5 flex items-center justify-between",children:[c.jsx("span",{children:f.apiKey}),c.jsxs("a",{href:"https://www.framer.com/help/articles/server-api-keys",target:"_blank",rel:"noreferrer",className:"text-[11px] text-[#61DAFB] hover:underline inline-flex items-center gap-1",children:[f.howToGenerate," ",c.jsx(k,{size:11})]})]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:$?"text":"password",value:Q,onChange:e=>P(e.target.value),placeholder:"fr_...",disabled:C,className:"w-full px-3 py-2 pr-10 bg-[#0d0d0e] border border-[#2e2e2e] rounded-md text-[13px] text-white placeholder-[#5a5a5a] font-mono focus:outline-none focus:border-[#61DAFB] disabled:opacity-50"}),c.jsx("button",{type:"button",onClick:()=>_(e=>!e),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[#6a6a6a] hover:text-white p-1",tabIndex:-1,
7children:$?c.jsx(he,{size:14}):c.jsx(ue,{size:14})})]}),c.jsx("p",{className:"text-[11px] text-[#6a6a6a] mt-1",children:f.apiKeyHint})]}),N&&c.jsx("div",{className:"px-3 py-2 bg-red-500/10 border border-red-500/30 rounded-md text-[12px] text-red-300",children:N}),c.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[c.jsx("button",{type:"button",onClick:Z,disabled:C,className:"px-4 py-2 text-[13px] text-[#c4c4c4] hover:text-white disabled:opacity-40",children:u.common.actions.cancel}),c.jsxs("button",{type:"submit",disabled:C||!y.trim()||!S.trim()||!Q.trim()||r&&!b.trim(),className:"px-4 py-2 text-[13px] font-medium bg-[#61DAFB] text-black rounded-md hover:bg-[#4ec5e8] disabled:opacity-40 disabled:cursor-not-allowed inline-flex items-center gap-2",children:[C&&c.jsx(g,{size:14,className:"animate-spin"}),x]})]})]})]})})]})}function ur(e){return Array.from(new Set(e))}function pr(e){return"framer"===e?"Framer":"Webflow"}const fr=[function({html:e,css:t,tool:r}){const n=e.match(/<style\b[^>]*>([\s\S]*?)<\/style>/i);if(!n)return null;const s=(n[1]||"").trim();return s.length<20||t.trim().length>0?null:{id:"style-without-css-panel",severity:"blocker",title:"CSS mélangé avec le HTML",description:"Ton apparence (couleurs, tailles, mises en page) est écrite dans le HTML au lieu d'être dans le panneau CSS. Du coup, rien de tout ça ne sera transféré dans "+pr(r)+" et ton design sera cassé.",count:1,samples:[s.slice(0,60)+(s.length>60?"â¦":"")],fixHint:"Clique sur le bouton « Copier pour Claude » en bas de ce panneau, puis colle dans Claude. Il remettra le CSS au bon endroit automatiquement."}},function({html:e,css:t,tool:r}){const n=Array.from(t.matchAll(/\.([a-zA-Z_][a-zA-Z0-9_-]*)\s*\{([^}]+)\}/g)),s=[];for(const[,l,c]of n)/opacity\s*:\s*0\b/.test(c)?s.push("."+l+" {opacity: 0}"):/transform\s*:\s*[^;}]*translate[XY]?\s*\(\s*[^)]*[1-9]/.test(c)?s.push("."+l+" {transform: translate}"):/transform\s*:\s*[^;}]*scale\s*\(\s*0/.test(c)&&s.push("."+l+" {transform: scale(0)}");if(0===s.length)return null;const i=/IntersectionObserver|\.observe\s*\(|classList\.add\s*\(\s*['"`]active/.test(e),o=/<script\b[^>]*>[\s\S]*?<\/script>/i.test(e);if(!i&&!o)return null;const a="framer"===r;return{id:"hidden-awaiting-js",severity:"blocker",title:"Des sections entières seront invisibles",description:"Certaines parties de ton site démarrent invisibles (transparentes ou décalées hors de l'écran) en attendant qu'un petit script JavaScript les fasse apparaître au scroll. Ce script ne fonctionnera pas dans "+pr(r)+", donc ces sections resteront invisibles pour toujours.",count:s.length,samples:ur(s).slice(0,5),fixHint:a?"Clique sur « Copier pour Claude » en bas de ce panneau, puis colle dans Claude. Il rendra tout visible par défaut et remplacera ces reveals par des animations Framer natives (attributs data-framer-*).":"Clique sur « Copier pour Claude » en bas de ce panneau, puis colle dans Claude. Il rendra tout visible par défaut et te proposera des animations compatibles Webflow."}},function({css:e,tool:t}){const r=Array.from(e.matchAll(/\.([a-zA-Z_][a-zA-Z0-9_-]*)::?(before|after)\b/g));if(0===r.length)return null;const n=ur(r.map(e=>"."+e[1]+"::"+e[2])).slice(0,5),s=pr(t);return{id:"pseudo-elements",severity:"info",title:"Décorations qui peuvent disparaître",description:"Ton code utilise une technique CSS (::before et ::after) pour ajouter des petits éléments décoratifs comme des traits ou des icônes. "+s+" ne gère pas ces décorations : elles peuvent disparaître après conversion.",count:r.length,samples:n,fixHint:"Convertis d'abord et regarde le résultat dans "+s+". Si une décoration manque, clique sur « Copier pour Claude » en bas et demande-lui de la refaire avec un vrai élément HTML."}},function({css:e,tool:t}){const r=Array.from(e.matchAll(/background(-image)?\s*:\s*[^;]*url\(\s*["']?data:/gi));return 0===r.length?null:{id:"data-uri-background",severity:"info",title:"Images intégrées directement dans le code",description:"Des images de fond sont intégrées directement dans ton CSS (au lieu d'être des fichiers séparés). Selon leur taille, "+pr(t)+" peut ne pas arriver à les coller et le fond disparaîtra.",count:r.length,samples:r.slice(0,3).map(e=>e[0].slice(0,60)+"â¦"),fixHint:"Convertis d'abord et regarde le résultat. Si un fond manque, clique sur « Copier pour Claude » en bas et demande-lui de remplacer ces images par de vraies URLs."}}];function mr(e){const t=[];for(const s of fr){const r=s(e);r&&t.push(r)}const r=["blocker","warning","info"];t.sort((e,t)=>
7r.indexOf(e.severity)-r.indexOf(t.severity));const n={blocker:t.filter(e=>"blocker"===e.severity).length,warning:t.filter(e=>"warning"===e.severity).length,info:t.filter(e=>"info"===e.severity).length};return{issues:t,counts:n,total:t.length}}function gr(e,t){const r=Math.max(1,Math.min(31,e||1)),n=t.getFullYear(),s=t.getMonth(),i=(e,t)=>Math.min(r,new Date(e,t+1,0).getDate()),o=new Date(n,s,i(n,s));if(t.getTime()<o.getTime())return o;const a=11===s?n+1:n,l=(s+1)%12;return new Date(a,l,i(a,l))}const Or=e=>12*e.getFullYear()+e.getMonth();function xr(e,t=200){const[r,n]=l.useState(!1);return{closing:r,close:l.useCallback(()=>{n(!0),setTimeout(()=>{n(!1),e()},t)},[e,t])}}function br(e,t,r){return new Intl.NumberFormat("fr"===r?"fr-FR":"en-US",{style:"currency",currency:t.toUpperCase()}).format(e/100)}function vr({preview:e,loading:t,error:r,locale:n,t:s}){const i=s.converter.account.subscription;if(t)return c.jsxs("div",{className:"flex items-center gap-2 text-xs text-[#888]",children:[c.jsx(g,{size:12,className:"animate-spin"}),i.prorationLoading]});if(r)return c.jsx("p",{className:"text-xs text-[#ff6b6b]",children:r});if(!e)return null;const o="year"===e.cycle?i.prorationCycleYear:i.prorationCycleMonth,a=br(e.newPlanCents,e.currency,n),l=function(e,t){return new Date(1e3*e).toLocaleDateString("fr"===t?"fr-FR":"en-US",{day:"numeric",month:"long",year:"numeric"})}(e.effectiveDate,n);let d;d=e.isImmediate?e.immediateChargeCents>0?i.prorationCharge.replace("{amount}",br(e.immediateChargeCents,e.currency,n)):i.prorationNothing:i.prorationScheduled.replace("{date}",l);const h=e.isImmediate?i.prorationNext.replace("{price}",a).replace("{cycle}",o).replace("{date}",l):i.prorationThenPrice.replace("{price}",a).replace("{cycle}",o);return c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-xs leading-relaxed text-[#ededed] font-semibold",children:d}),c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:h})]})}const yr=[{min:0,label:"rankNewbie",emoji:"ð¥",color:"#666"},{min:10,label:"rankBuilder",emoji:"ð£",color:"#4A9EF5"},{min:50,label:"rankConverter",emoji:"ð¥",color:"#E8863C"},{min:100,label:"rankPowerUser",emoji:"ð",color:"#A855F7"},{min:500,label:"rankLegend",emoji:"â¡",color:"#E8C872"}];const wr={free:{label:"Free",color:"text-[#707070]",border:"border-[#2e2e2e]",bg:"bg-[#707070]",rank:0},starter:{label:"Starter",color:"text-[#2b7ff9]",border:"border-[#2b7ff9]/20",bg:"bg-[#2b7ff9]",rank:1},pro:{label:"Pro",color:"text-[#E8C872]",border:"border-[#D4A853]/25",bg:"bg-[#D4A853]",rank:2},team:{label:"Team",color:"text-[#A8B4FF]",border:"border-[#A8B4FF]/20",bg:"bg-[#A8B4FF]",rank:3},beta:{label:"Beta",color:"text-[#98c379]",border:"border-[#98c379]/20",bg:"bg-[#98c379]",rank:3}},Sr=["profile","subscription","billing"];async function kr(){const{data:{session:e}}=await s.auth.getSession();if(!e)throw new Error("Not authenticated");return{"Content-Type":"application/json",Authorization:`Bearer ${e.access_token}`}}const jr={visa:"Visa",mastercard:"Mastercard",amex:"Amex"},Qr="w-full px-3 py-2 rounded-lg bg-[#141414] border border-[#2e2e2e] text-xs text-[#ededed] placeholder-[#555] focus:border-[#2b7ff9] focus:outline-none transition-colors",Pr={billingName:"",billingEmail:"",addressLine1:"",addressLine2:"",city:"",postalCode:"",country:"FR",taxId:""};function $r({onSignOut:e}){const{t:t,locale:r,setLocale:n}=o(),{user:i,profile:d}=a(),[h,u]=l.useState(Pr),[p,m]=l.useState(!0),[O,x]=l.useState(!1),[b,v]=l.useState(!1),[y,w]=l.useState(""),[S,k]=l.useState(""),[j,Q]=l.useState(0);function P(e,t){u(r=>({...r,[e]:t})),v(!1)}return l.useEffect(()=>{(null==i?void 0:i.id)&&s.from("profiles").select("total_conversions_all_time").eq("id",i.id).single().then(({data:e})=>{null!=(null==e?void 0:e.total_conversions_all_time)&&Q(e.total_conversions_all_time)})},[null==i?void 0:i.id]),l.useEffect(()=>{(async()=>{try{const e=await kr(),t=await fetch("/api/billing-info",{headers:e});if(t.ok){const e=await t.json();u(e)}}catch{}finally{m(!1)}})()},[]),c.jsxs("div",{className:"space-y-4",children:[(()=>{const e=function(e){for(let t=yr.length-1;t>=0;t--)if(e>=yr[t].min)return yr[t];return yr[0]}(j);return c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center text-2xl",style:{background:`${e.color}15`,border:`2px solid ${e.color}30`},children:e.emoji}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-sm font-medium text-[#ededed] truncate",children:(null==d?void 0:d.full_name)||t.converter.account.profile.defaultName}),c.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[c.jsx(N,{size:11,className:"text-[#888] flex-shrink-0"}),c.jsx("span",{className:"text-xs text-[#888] truncate",children:(null==d?void 0:d.email)??(null==i?void 0:i.email)})]}),c.jsx("div",{className:"flex items-center gap-1.5 mt-1",children:c.jsxs("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full",style:{color:e.color,background:`${e.color}15`},children:[t.converter.toolbar[e.label]," · ",j," conv."]})})]})]})})(),c.jsx("div",{className:"h-px bg-[#2e2e2e]"}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xs font-medium text-[#999] mb-3 flex items-center gap-1.5",children:[c.jsx(E,{size:12}),t.converter.account.profile.billingInfo]}),p?c.jsx("div",{className:"flex items-center justify-center py-6",children:c.jsx(g,{size:16,className:"animate-spin text-[#888]"})}):c.jsxs("div",{className:"space-y-2.5",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.nameLabel}),c.jsx("input",{type:"text",value:h.billingName,onChange:e=>P("billingName",e.target.value),placeholder:"Acme Inc.",className:Qr})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.billingEmailLabel}),c.jsx("input",{type:"email",value:h.billingEmail,onChange:e=>P("billingEmail",e.target.value),placeholder:"[email protected]",className:Qr})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.addressLabel}),c.jsx("input",{type:"text",value:h.addressLine1,onChange:e=>P("addressLine1",e.target.value),placeholder:"123 rue de la Paix",className:Qr})]}),c.jsx("input",{type:"text",value:h.addressLine2,onChange:e=>P("addressLine2",e.target.value),placeholder:t.converter.account.profile.addressLine2Placeholder,className:Qr}),c.jsxs("div",{className:"grid grid-cols-3 gap-2.5",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.postalCodeLabel}),c.jsx("input",{type:"text",value:h.postalCode,onChange:e=>P("postalCode",e.target.value),placeholder:"75001",className:Qr})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.cityLabel}),c.jsx("input",{type:"text",value:h.city,onChange:e=>P("city",e.target.value),placeholder:"Paris",className:Qr})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.countryLabel}),c.jsx("select",{value:h.country,onChange:e=>P("country",e.target.value),className:Qr,children:Object.entries(t.converter.account.profile.countries).map(([e,t])=>c.jsx("option",{value:e,children:t},e))})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] text-[#888] mb-1 block",children:t.converter.account.profile.taxIdLabel}),c.jsx("input",{type:"text",value:h.taxId,onChange:e=>P("taxId",e.target.value),placeholder:"FR12345678901",className:Qr}),S&&c.jsx("p",{className:"text-[10px] text-[#e5c07b] mt-1",children:S})]}),y&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2",children:y}),c.jsx("button",{onClick:async function(){x(!0),w(""),k(""),v(!1);try{const e=await kr(),t=await fetch("/api/billing-info",{method:"POST",headers:e,body:JSON.stringify(h)});if(!t.ok)throw new Error("Erreur");const r=await t.json();r.taxIdError&&k(r.taxIdError),v(!0),setTimeout(()=>v(!1),3e3)}catch{w(t.converter.account.profile.saveError)}finally{x(!1)}},disabled:O,className:"w-full py-2 rounded-lg text-xs font-medium transition-colors flex items-center justify-center gap-1.5 cursor-pointer bg-[#2b7ff9] text-white hover:bg-[#1161d4] disabled:opacity-50",children:O?c.jsx(g,{size:12,className:"animate-spin"}):b?c.jsxs(c.Fragment,{children:[c.jsx(f,{size:12}),t.converter.account.profile.saved]}):t.converter.account.profile.save})]})]}),c.jsx("div",{className:"h-px bg-[#2e2e2e]"}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xs font-medium text-[#999] mb-3 flex items-center gap-1.5",children:[c.jsx(A,{size:12}),t.converter.account.profile.languageLabel]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("button",{onClick:()=>n("fr"),className:"flex-1 flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium transition-all cursor-pointer border "+("fr"===r?"border-[#ededed]/15 bg-white/[0.06] text-[#ededed]":"border-[#2e2e2e] bg-transparent text-[#555] hover:text-[#999] hover:border-[#3a3a3a]"),children:[c.jsx("span",{className:"text-sm leading-none",children:"ð«ð·"}),t.converter.account.profile.languageFr,"fr"===r&&c.jsx(f,{size:11,className:"ml-auto text-[#888]"})]}),c.jsxs("button",{onClick:()=>n("en"),className:"flex-1 flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium transition-all cursor-pointer border "+("en"===r?"border-[#ededed]/15 bg-white/[0.06] text-[#ededed]":"border-[#2e2e2e] bg-transparent text-[#555] hover:text-[#999] hover:border-[#3a3a3a]"),children:[c.jsx("span",{className:"text-sm leading-none",children:"ð¬ð§"}),t.converter.account.profile.languageEn,"en"===r&&c.jsx(f,{size:11,className:"ml-auto text-[#888]"})]})]})]}),c.jsx("div",{className:"h-px bg-[#2e2e2e]"}),c.jsxs("p",{className:"text-[11px] text-[#666]",children:["Nous contacter : ",c.jsx("a",{href:"mailto:[email protected]",className:"text-[#888] hover:text-white transition-colors underline",children:"[email protected]"})]}),c.jsxs("button",{onClick:e,className:"flex items-center gap-2 w-full px-3 py-2.5 rounded-lg text-xs text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsx(ve,{size:14}),t.converter.account.profile.signOut]})]})}function _r({onUpgrade:e,onClose:t}){var r;const{t:n,locale:s}=o(),{profile:i,refreshProfile:h}=a(),u=d(),[p,f]=l.useState(null),[m,O]=l.useState(null),[w,S]=l.useState(null),[k,Q]=l.useState(!1),[P,$]=l.useState(""),[_,C]=l.useState(""),[T,N]=l.useState(""),[E,A]=l.useState(null),z=(null==i?void 0:i.plan)??"free",Z=wr[z]??wr.free,R="starter"===z||"pro"===z||"team"===z,X=!!(null==i?void 0:i.stripe_subscription_id),M=(null==E?void 0:E.
7cycle)??"month",D=(null==E?void 0:E.scheduledPlan)??null,L=(null==E?void 0:E.scheduledCycle)??null,Y=!!D||!!L,I=`${D?(null==(r=wr[D])?void 0:r.label)??D:Z.label} ${"year"===(L??M)?n.converter.upgrade.yearly:n.converter.upgrade.monthly}`.toLowerCase(),q=(null==E?void 0:E.effectiveDate)?new Date(1e3*E.effectiveDate).toLocaleDateString("fr"===s?"fr-FR":"en-US",{day:"numeric",month:"long",year:"numeric"}):"";async function V(){try{const e=await b();A(e)}catch{}}return l.useEffect(()=>{V()},[]),l.useEffect(()=>{if(!m)return S(null),void $("");let e=!1;return S(null),$(""),Q(!0),x(m).then(t=>{e||S(t)}).catch(t=>{e||$(t instanceof Error?t.message:n.converter.account.subscription.prorationError)}).finally(()=>{e||Q(!1)}),()=>{e=!0}},[m]),c.jsxs("div",{className:`rounded-lg border ${Z.border} bg-[#161616] p-4 space-y-3`,children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(j,{size:14,className:Z.color}),c.jsx("span",{className:"text-xs text-[#999]",children:n.converter.account.subscription.currentPlan})]}),c.jsx("span",{className:`text-xs font-semibold px-2 py-0.5 rounded-full ${Z.color} ${Z.bg}/10`,children:Z.label})]}),Y&&c.jsxs("div",{className:"rounded-lg bg-[#0a0a0a] border border-[#1a1a1a] px-3 py-2.5 space-y-2",children:[c.jsx("p",{className:"text-xs text-[#ededed] leading-relaxed",children:n.converter.account.subscription.scheduledBanner.replace("{plan}",I).replace("{date}",q)}),c.jsxs("button",{onClick:async function(){f("cancel-scheduled"),C("");try{await v(),await V(),N(n.converter.account.subscription.scheduledCancelled),setTimeout(()=>N(""),3e3)}catch(e){C(e instanceof Error?e.message:"Erreur")}finally{f(null)}},disabled:"cancel-scheduled"===p,className:"text-[11px] text-[#2b7ff9] hover:underline cursor-pointer disabled:opacity-50 flex items-center gap-1",children:["cancel-scheduled"===p&&c.jsx(g,{size:10,className:"animate-spin"}),n.converter.account.subscription.cancelScheduledChange]})]}),T&&c.jsx("p",{className:"text-xs text-[#2b7ff9] bg-[#2b7ff9]/10 rounded-lg px-3 py-2",children:T}),_&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2",children:_}),"free"===z&&e&&c.jsxs("button",{onClick:()=>{t(),setTimeout(e,160)},className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-xs font-medium text-white bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors cursor-pointer",children:[c.jsx(J,{size:13}),n.converter.account.subscription.upgradeStarterOrPro]}),"starter"===z&&!m&&!Y&&c.jsxs("button",{onClick:()=>O({plan:"pro"}),className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-xs font-medium text-white bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors cursor-pointer",children:[c.jsx(J,{size:13}),n.converter.account.subscription.upgradeToPro]}),"pro"===z&&!m&&!Y&&c.jsxs("button",{onClick:()=>O({plan:"starter"}),className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-xs font-medium text-[#ededed] border border-[#2e2e2e] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsx(H,{size:13,className:"text-[#707070]"}),n.converter.account.subscription.downgradeToStarter]}),R&&"team"!==z&&!m&&!Y&&("month"===M?c.jsxs("button",{onClick:()=>O({cycle:"year"}),className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-xs font-medium text-[#ededed] border border-[#2e2e2e] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsx(J,{size:13,className:"text-[#9333EA]"}),n.converter.account.subscription.switchToYearly,c.jsx("span",{className:"text-[9px] font-bold text-[#9333EA] bg-[#9333EA]/15 px-1.5 py-0.5 rounded-full",children:"-20%"})]}):c.jsxs("button",{onClick:()=>O({cycle:"month"}),className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-xs font-medium text-[#ededed] border border-[#2e2e2e] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsx(H,{size:13,className:"text-[#707070]"}),n.converter.account.subscription.switchToMonthly]})),m&&c.jsxs("div",{className:"bg-[#1a1a1a] border border-[#2e2e2e] rounded-lg p-3 space-y-2.5",children:[c.jsx(vr,{preview:w,loading:k,error:P,locale:s,t:n}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:async()=>{await async function(e){var t;const r=e.plan?e.plan:`cycle-${e.cycle}`;f(r),C("");try{const r=await y(e);await h(),await V();
7const s=!!r.scheduledPlan||!!r.scheduledCycle,i=e.plan?(null==(t=wr[e.plan])?void 0:t.label)??e.plan:"year"===e.cycle?n.converter.upgrade.yearly:n.converter.upgrade.monthly,o=s?n.converter.account.subscription.planScheduled:n.converter.account.subscription.planUpdated;N(o.replace("{plan}",i)),setTimeout(()=>N(""),4e3)}catch(s){C(s instanceof Error?s.message:"Erreur")}finally{f(null)}}(m),O(null)},disabled:!!p||k,className:"flex-1 py-1.5 rounded-lg bg-[#2b7ff9] text-white text-xs font-semibold hover:bg-[#1161d4] transition-colors disabled:opacity-50 flex items-center justify-center gap-1 cursor-pointer",children:p?c.jsxs(c.Fragment,{children:[c.jsx(g,{size:12,className:"animate-spin"}),n.converter.upgrade.changingPlan]}):n.common.actions.confirm}),c.jsx("button",{onClick:()=>O(null),disabled:!!p,className:"flex-1 py-1.5 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors disabled:opacity-50 cursor-pointer",children:n.common.actions.cancel})]})]}),(R||X)&&!m&&c.jsx("button",{onClick:()=>{t(),u("/cancel-subscription")},className:"w-full text-center text-[10px] text-[#888] hover:text-[#707070] transition-colors cursor-pointer",children:n.converter.account.subscription.cancelSubscription})]})}function Cr(){const{t:e}=o(),[t,r]=l.useState([]),[n,s]=l.useState(null),[i,a]=l.useState(!0),[d,h]=l.useState(""),[u,p]=l.useState(!1);async function f(){a(!0),h("");try{const e=await kr(),t=await fetch("/api/invoices",{headers:e});if(!t.ok)throw new Error("Erreur");const n=await t.json();r(n.invoices),s(n.paymentMethod)}catch{h(e.converter.account.billing.loadError)}finally{a(!1)}}l.useEffect(()=>{f()},[]);const m={paid:{label:e.converter.account.billing.statusPaid,class:"text-emerald-400 bg-emerald-400/10"},open:{label:e.converter.account.billing.statusOpen,class:"text-[#e5c07b] bg-[#e5c07b]/10"},void:{label:e.converter.account.billing.statusVoid,class:"text-[#707070] bg-[#707070]/10"},draft:{label:e.converter.account.billing.statusDraft,class:"text-[#707070] bg-[#707070]/10"},uncollectible:{label:e.converter.account.billing.statusUncollectible,class:"text-[#ff6b6b] bg-[#ff6b6b]/10"}};return i?c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(g,{size:18,className:"animate-spin text-[#888]"})}):d?c.jsxs("div",{className:"text-center py-8 space-y-3",children:[c.jsx("p",{className:"text-xs text-[#ff6b6b]",children:d}),c.jsx("button",{onClick:f,className:"text-xs text-[#2b7ff9] hover:underline cursor-pointer",children:e.converter.account.billing.retry})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"rounded-lg border border-[#2e2e2e] bg-[#161616] p-3.5",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#232323] flex items-center justify-center",children:c.jsx(ce,{size:14,className:"text-[#707070]"})}),n?c.jsxs("div",{children:[c.jsxs("p",{className:"text-xs font-medium text-[#ededed]",children:[jr[n.brand]??n.brand," â¢â¢â¢â¢ ",n.last4]}),c.jsxs("p",{className:"text-[10px] text-[#888] mt-0.5",children:["Expire ",String(n.expMonth).padStart(2,"0"),"/",n.expYear]})]}):c.jsx("p",{className:"text-xs text-[#888]",children:e.converter.account.billing.noPaymentMethod})]}),c.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-[10px] font-medium text-[#999] border border-[#2e2e2e] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsx(Q,{size:10}),n?e.converter.account.billing.changeCard:e.converter.account.billing.addCard]})]})}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xs font-medium text-[#999] mb-2.5 flex items-center gap-1.5",children:[c.jsx(z,{size:12}),e.converter.account.billing.invoicesTitle]}),0===t.length?c.jsx("p",{className:"text-xs text-[#888] text-center py-6",children:e.converter.account.billing.noInvoices}):c.jsx("div",{className:"space-y-1.5",children:t.map(t=>{const r=m[t.status??""]??{label:t.status,class:"text-[#707070] bg-[#707070]/10"};return c.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg bg-[#161616] border border-[#2e2e2e]/50 hover:border-[#2e2e2e] transition-colors",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-xs font-medium text-[#ededed]",children:(s=t.amount,i=t.currency,new Intl.NumberFormat("fr-FR",{style:"currency",currency:i}).format(s/100))}),c.jsx("p",{className:"text-[10px] text-[#888] mt-0.5",children:(n=t.date,new Date(1e3*n).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric"}))})]}),c.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${r.class}`,children:r.label}),c.jsxs("div",{className:"flex items-center gap-1",children:[t.pdfUrl&&c.jsx("a",{href:t.pdfUrl,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:e.converter.account.billing.downloadPdf,children:c.jsx(P,{size:12})}),t.hostedUrl&&c.jsx("a",{href:t.hostedUrl,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:e.converter.account.billing.viewInvoice,children:c.jsx(k,{size:12})})]})]},t.id);var n,s,i})})]}),u&&c.jsx(tr,{onClose:()=>{p(!1),f()}})]})}function Tr({onClose:e,onUpgrade:t}){const{t:r}=o(),{signOut:n,profile:s}=a(),i=d(),{closing:h,close:u}=xr(e,150),[f,m]=l.useState("profile"),g="beta"===(null==s?void 0:s.plan)?Sr.filter(e=>"profile"===e):Sr,O={profile:r.converter.account.tabs.profile,subscription:r.converter.account.tabs.subscription,billing:r.converter.account.tabs.billing};return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[60] "+(h?"animate-fade-out"
7:"animate-fade-in"),onClick:u}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4",onClick:u,children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col "+(h?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-[#2e2e2e] flex-shrink-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:r.converter.account.title}),c.jsx("button",{onClick:u,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:c.jsx(p,{size:16})})]}),c.jsx("div",{className:"px-5 pt-3 pb-0 flex-shrink-0",children:c.jsx("div",{className:"flex gap-0.5 p-0.5 bg-[#141414] rounded-lg border border-[#2e2e2e]/50",children:g.map(e=>c.jsx("button",{onClick:()=>m(e),className:"flex-1 py-1.5 rounded-md text-xs font-medium transition-all cursor-pointer "+(f===e?"bg-[#232323] text-[#ededed] shadow-sm":"text-[#888] hover:text-[#999]"),children:O[e]},e))})}),c.jsxs("div",{className:"px-5 py-4 overflow-y-auto flex-1",children:["profile"===f&&c.jsx($r,{onSignOut:async function(){await n(),u(),i("/")}}),"subscription"===f&&c.jsx(_r,{onUpgrade:t,onClose:u}),"billing"===f&&c.jsx(Cr,{})]})]})})]})}const Nr={history:["free","starter","pro","team","beta"],projects:["free","starter","pro","team","beta"],scripts:["free","starter","pro","team","beta"],"shared-preview":["pro","team","beta"],"priority-support":["pro","team","beta"]},Er=["free","starter","pro","team","beta"];const Ar={history:{title:"Accéder à l'historique des conversions",planLabel:"Starter"},projects:{title:"Créer plusieurs projets",planLabel:"Starter"},scripts:{title:"Utiliser des scripts externes (CDN)",planLabel:"Starter"},"shared-preview":{title:"Créer un lien de preview partageable",planLabel:"Pro"},"priority-support":{title:"Accéder au support prioritaire",planLabel:"Pro"}},zr=xt("pk_live_51TAYgsLYNFPv3laeo7lJFAFIs4BznYeT8zZyMg1kM3aeDbgR0YxeKR9VDt8bUYPSSWyCpyUfBoOhR0UDZtuEPF1u00x5duqVAe"),Zr=[{key:"starter",name:"Starter",priceMonthly:19,priceYearly:15,priceYearlyTotal:180,features:[]},{key:"pro",name:"Pro",priceMonthly:29,priceYearly:23,priceYearlyTotal:276,popular:!0,features:[]}],Rr={theme:"night",variables:{colorPrimary:"#2b7ff9",colorBackground:"#141414",colorText:"#ededed",colorTextSecondary:"#707070",colorTextPlaceholder:"#444",colorDanger:"#ff6b6b",fontFamily:'"Inter", system-ui, sans-serif',fontSizeBase:"14px",borderRadius:"10px",spacingUnit:"4px"},rules:{".Input":{border:"1px solid #2a2a2a",boxShadow:"none",backgroundColor:"#0e0e0e"},".Input:focus":{border:"1px solid #2b7ff9",boxShadow:"0 0 0 1px rgba(43,127,249,0.3)"},".Label":{color:"#888",fontSize:"12px",fontWeight:"500"},".Tab":{border:"1px solid #2a2a2a",backgroundColor:"#141414",color:"#888"},".Tab:hover":{color:"#ededed",border:"1px solid #444"},".Tab--selected":{border:"1px solid #2b7ff9",backgroundColor:"#1a1a2e",color:"#ededed"},".Tab--selected:hover":{color:"#ededed",border:"1px solid #2b7ff9"},".TabIcon":{fill:"#888"},".TabIcon--selected":{fill:"#ededed"},".Tab:hover .TabIcon":{fill:"#ededed"},".Tab--selected:hover .TabIcon":{fill:"#ededed"}}};async function Xr(){const{data:{session:e}}=await s.auth.getSession();if(!e)throw new Error("Not authenticated");return{"Content-Type":"application/json",Authorization:`Bearer ${e.access_token}`}}function Mr({plan:e,subscriptionId:t,onSuccess:r}){const{t:n}=o(),s=Gt(),i=It(),[a,d]=l.useState(!1),[h,u]=l.useState("");return c.jsxs("form",{onSubmit:async function(e){if(e.preventDefault(),!s||!i)return;d(!0),u("");const{error:o}=await s.confirmPayment({elements:i,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(o)return u(o.message||n.converter.upgrade.paymentError),void d(!1);const a=await Xr();let l=!1;for(let r=0;r<8;r++){await new Promise(e=>setTimeout(e,2e3));try{if((await fetch("/api/confirm-plan",{method:"POST",headers:a,body:JSON.stringify({subscriptionId:t})})).ok){l=!0;break}}catch{}}l?r():(u(n.converter.upgrade.confirmationFailed),d(!1))},className:"space-y-4",children:[c.jsx(Ut,{options:{layout:"tabs"}}),h&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2",children:h}),c.jsx("button",{type:"submit",disabled:!s||a,className:"w-full py-3 rounded-xl bg-[#2b7ff9] hover:bg-[#1161d4] text-white text-sm font-semibold transition-all disabled:opacity-50 flex items-center justify-center gap-2 shadow-[0_4px_20px_rgba(43,127,249,0.3)]",children:a?c.jsxs(c.Fragment,{children:[c.jsx(g,{size:15,className:"animate-spin"}),n.converter.upgrade.processing]}):e.billingLabel}),c.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-[10px] text-[#888]",children:[c.jsx(Ce,{size:10}),n.converter.upgrade.securePayment]})]})}function Dr({onClose:e,feature:t}){const{t:r,locale:n}=o(),{profile:s,refreshProfile:i}=a(),{closing:d,close:h}=xr(e,150),[u,m]=l.useState("pro"),[O,v]=l.useState("monthly"),[w,S]=l.useState(null),[k,j]=l.useState(null),[Q,P]=l.useState(!1),[$,_]=l.useState(!1),[C,T]=l.useState(!1),[N,E]=l.useState(""),[A,z]=l.useState(null),[Z,R]=l.useState(!1),[X,M]=l.useState(""),[D,L]=l.useState(""),[Y,I]=l.useState(null),[q,W]=l.useState(""),[B,F]=l.useState(!1),G=l.useRef(0),U=(null==s?void 0:s.plan)??"free",H="starter"===U||"pro"===U||"team"
7===U,K=Zr.find(e=>e.key===u)??Zr[1],ee="yearly"===O?K.priceYearlyTotal:K.priceMonthly,te=(()=>{if(!Y)return null;const e=Y.label.match(/^-([\d.]+)(%|â¬|[A-Z]{3})$/i);if(!e)return null;const t=parseFloat(e[1]);return Number.isNaN(t)?null:"%"===e[2]?Math.round(ee*(1-t/100)*100)/100:Math.max(0,Math.round(100*(ee-t))/100)})(),re=te??ee,ne=e=>e%1==0?String(e):e.toFixed(2),se={...K,price:ee,pricePerMonth:"yearly"===O?K.priceYearly:K.priceMonthly,billingLabel:"yearly"===O?r.converter.upgrade.payNow.replace("{price}",ne(re)).replace(r.converter.upgrade.mo,r.converter.upgrade.yr):r.converter.upgrade.payNow.replace("{price}",ne(re)),features:"starter"===K.key?r.converter.upgrade.starterFeatures:r.converter.upgrade.proFeatures};async function ie(e,t=O,n){const s=++G.current;m(e),S(null),E(""),P(!0);const i=void 0===n?(null==Y?void 0:Y.code)??null:n;try{const o=await Xr(),a=await fetch("/api/create-subscription",{method:"POST",headers:o,body:JSON.stringify({plan:e,billing:t,...i?{promotionCode:i}:{}})});if(!a.ok){const n=await a.json();if("invalid_promotion_code"===n.code){if(s!==G.current)return;return I(null),W(r.converter.upgrade.promoInvalid),void(await ie(e,t,null))}throw new Error(n.error||"Erreur")}const{clientSecret:l,subscriptionId:c,promotion:d}=await a.json();if(s!==G.current)return;S(l),j(c),d?(I({code:d.code,label:d.label}),L(""),W("")):null===n&&(I(null),W(""))}catch(o){if(s!==G.current)return;E(o instanceof Error?o.message:r.converter.upgrade.paymentError)}finally{s===G.current&&P(!1)}}async function oe(){const e=D.trim();if(e){W(""),F(!0);try{await ie(u,O,e)}finally{F(!1)}}}return l.useEffect(()=>{const e=t?function(e){const t=Nr[e];for(const r of Er)if(t.includes(r))return r;return"pro"}(t):"pro",r=e===U?"pro":e;H?m(r):ie(r)},[]),l.useEffect(()=>{if(!H)return;let e=!1;return b().then(t=>{e||"year"!==t.cycle&&"month"!==t.cycle||v("year"===t.cycle?"yearly":"monthly")}).catch(()=>{}),()=>{e=!0}},[H]),l.useEffect(()=>{if(!H||u===U)return z(null),void M("");let e=!1;return z(null),M(""),R(!0),x(u).then(t=>{e||z(t)}).catch(t=>{e||M(t instanceof Error?t.message:r.converter.account.subscription.prorationError)}).finally(()=>{e||R(!1)}),()=>{e=!0}},[H,u,U]),c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-[60] "+(d?"animate-fade-out":"animate-fade-in"),onClick:h}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4",onClick:h,children:c.jsxs("div",{className:"relative bg-[#111] border border-[#222] rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto overflow-x-hidden "+(d?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"absolute -top-px -left-px -right-px h-40 bg-gradient-to-b from-[#2b7ff9]/10 to-transparent rounded-t-2xl pointer-events-none"}),c.jsx("button",{onClick:h,className:"absolute top-4 right-4 z-10 p-1.5 rounded-lg text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:16})}),C?c.jsxs("div",{className:"relative px-6 py-20 text-center space-y-4",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[#2b7ff9]/15 flex items-center justify-center mx-auto",children:c.jsx(f,{size:28,className:"text-[#2b7ff9]"})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-base font-semibold text-[#ededed]",children:r.converter.upgrade.welcomeTo.replace("{plan}",se.name)}),c.jsx("p",{className:"text-xs text-[#707070] mt-1",children:r.converter.upgrade.planUpdatedSuccess})]})]}):c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"px-6 pt-6 pb-4",children:[c.jsx("h2",{className:"text-base font-semibold text-[#ededed]",children:t?`${Ar[t].title} ?`:r.converter.upgrade.goFaster}),c.jsx("p",{className:"text-xs text-[#707070] mt-1",children:t?r.converter.upgrade.unlockFeature.replace("{plan}",Ar[t].planLabel):H?r.converter.upgrade.switchPlanOneClick:r.converter.upgrade.chooseYourPlan})]}),!H&&c.jsx("div",{className:"px-6 pb-3",children:c.jsxs("div",{className:"inline-flex gap-1 p-0.5 bg-[#0a0a0a] rounded-lg border border-[#1a1a1a]",children:[c.jsx("button",{onClick:()=>{v("monthly"),ie(u,"monthly")},className:"px-3 py-1.5 rounded-md text-[11px] font-medium transition-all cursor-pointer "+("monthly"===O?"bg-[#1a1a2e] text-[#ededed] shadow-sm":"text-[#666] hover:text-[#888]"),children:r.converter.upgrade.monthly}),c.jsxs("button",{onClick:()=>{v("yearly"),ie(u,"yearly")},className:"px-3 py-1.5 rounded-md text-[11px] font-medium transition-all cursor-pointer flex items-center gap-1.5 "+("yearly"===O?"bg-[#1a1a2e] text-[#ededed] shadow-sm":"text-[#666] hover:text-[#888]"),children:[r.converter.upgrade.yearly,c.jsx("span",{className:"text-[9px] font-bold text-[#9333EA] bg-[#9333EA]/15 px-1.5 py-0.5 rounded-full",children:"-20%"})]})]})}),c.jsx("div",{className:"px-6 pb-4",children:c.jsx("div",{className:"flex gap-1.5 p-1 bg-[#0a0a0a] rounded-xl border border-[#1a1a1a]",children:Zr.map(e=>
7{const t=u===e.key,n=U===e.key,s="pro"===U&&"starter"===e.key,i="yearly"===O?e.priceYearlyTotal:e.priceMonthly;return c.jsxs("button",{onClick:()=>{return!n&&!s&&(t=e.key,void(H?m(t):ie(t)));var t},disabled:n||s,className:`flex-1 relative py-2.5 rounded-lg text-xs font-semibold transition-all ${t?"bg-[#1a1a2e] text-white shadow-sm":"text-[#666] hover:text-[#999]"} ${n||s?"opacity-40 cursor-default":"cursor-pointer"}`,children:[c.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-1.5",children:[e.name,c.jsxs("span",{className:"font-bold "+(t?"text-[#2b7ff9]":""),children:[i,"â¬"]}),n&&c.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-[#2b7ff9]/20 text-[#2b7ff9] font-semibold",children:r.converter.upgrade.currentLabel})]}),t&&c.jsx("div",{className:"absolute inset-0 rounded-lg border border-[#2b7ff9]/20"})]},e.key)})})}),c.jsx("div",{className:"px-6 pb-4",children:c.jsxs("div",{className:"rounded-xl bg-[#0a0a0a] border border-[#1a1a1a] p-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:["pro"===se.key?c.jsx(Oe,{size:14,className:"text-[#2b7ff9]"}):c.jsx(V,{size:14,className:"text-[#2b7ff9]"}),c.jsxs("span",{className:"text-xs font-semibold text-[#ededed]",children:["Plan ",se.name]})]}),c.jsxs("div",{className:"flex flex-col items-end",children:[c.jsxs("div",{className:"flex items-baseline gap-1",children:[null!==te&&c.jsxs("span",{className:"text-xs text-[#666] line-through",children:[se.price,"â¬"]}),c.jsxs("span",{className:"text-lg font-bold text-white",children:[ne(re),"â¬"]}),c.jsxs("span",{className:"text-[10px] text-[#666]",children:["/","yearly"===O?r.converter.upgrade.yr:r.converter.upgrade.mo]})]}),"yearly"===O&&null===te&&c.jsxs("span",{className:"text-[9px] text-[#666]",children:[r.converter.upgrade.ie," ",se.pricePerMonth,"â¬/",r.converter.upgrade.mo]})]})]}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5",children:se.features.map(e=>c.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-[#888]",children:[c.jsx(f,{size:10,className:"text-[#2b7ff9] flex-shrink-0"}),e]},e))})]})}),!H&&c.jsxs("div",{className:"px-6 pb-4",children:[Y?c.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-[#2b7ff9]/10 border border-[#2b7ff9]/30 px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-[#ededed]",children:[c.jsx(f,{size:11,className:"text-[#2b7ff9] flex-shrink-0"}),c.jsx("span",{children:r.converter.upgrade.promoApplied.replace("{code}",Y.code).replace("{label}",Y.label)})]}),c.jsx("button",{type:"button",onClick:async function(){W(""),L(""),await ie(u,O,null)},disabled:Q,className:"text-[10px] text-[#888] hover:text-[#ededed] transition-colors disabled:opacity-50 cursor-pointer",children:r.converter.upgrade.promoRemove})]}):c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{type:"text",value:D,onChange:e=>{L(e.target.value.toUpperCase()),q&&W("")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),oe())},placeholder:r.converter.upgrade.promoCodePlaceholder,disabled:B||Q,className:"flex-1 px-3 py-2.5 text-xs bg-[#0a0a0a] border border-[#3a3a3a] rounded-lg text-[#ededed] placeholder:text-[#666] focus:outline-none focus:border-[#2b7ff9] transition-colors disabled:opacity-50"}),c.jsx("button",{type:"button",onClick:oe,disabled:!D.trim()||B||Q,className:"px-3 py-2.5 text-[11px] font-semibold rounded-lg bg-white text-[#0a0a0a] hover:bg-[#e5e5e5] disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center min-w-[72px] cursor-pointer",children:B?c.jsx(g,{size:11,className:"animate-spin"}):r.converter.upgrade.promoApply})]}),q&&c.jsx("p",{className:"text-[10px] text-[#ff6b6b] mt-1.5",children:q})]}),c.jsx("div",{className:"mx-6 h-px bg-[#1a1a1a]"}),c.jsxs("div",{className:"px-6 py-5",children:[N&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/8 rounded-lg px-3 py-2 mb-4",children:N}),H?c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"rounded-lg bg-[#0a0a0a] border border-[#1a1a1a] px-3 py-2.5",children:c.jsx(vr,{preview:A,loading:Z,error:X,locale:n,t:r})}),c.jsx("button",{onClick:async function(){_(!0),E("");try{await y(u),T(!0),await i(),setTimeout(h,2e3)}catch(e){E(e instanceof Error?e.message:r.converter.upgrade.changePlanError),_(!1)}},disabled:$||Z,className:"w-full py-3 rounded-xl bg-[#2b7ff9] hover:bg-[#1161d4] text-white text-sm font-semibold transition-all disabled:opacity-50 flex items-center justify-center gap-2 shadow-[0_4px_20px_rgba(43,127,249,0.3)]",children:$?c.jsxs(c.Fragment,{children:[c.jsx(g,{size:15,className:"animate-spin"}),r.converter.upgrade.changingPlan]}):c.jsxs(c.Fragment,{children:[c.jsx(J,{size:15}),r.converter.upgrade.switchTo.replace("{name}",se.name).replace("{price}",String(se.price))]})}),c.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-[10px] text-[#888]",children:[c.jsx(Ce,{size:10}),r.converter.upgrade.existingCardUsed]})]}):c.jsxs(c.Fragment,{children:[Q&&c.jsx("div",{className:"flex items-center justify-center py-16",children:c.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c.jsx(g,{size:20,className:"animate-spin text-[#2b7ff9]"}),c.jsx("span",{className:"text-xs text-[#888]",children:r.converter.upgrade.preparingPayment})]})}),w&&!Q&&c.jsx(Yt,{stripe:zr,options:{clientSecret:w,appearance:Rr},children:c.jsx(Mr,{plan:se,subscriptionId:k,onSuccess:async function(){T(!0),await i(),setTimeout(h,2e3)}})})]})]})]})]})})]})}const Lr=[{value:"bug",label:"Bug",emoji:"ð"},{value:"suggestion",label:"Suggestion",emoji:"ð¡"},{value:"other",label:"Autre",emoji:"ð"}];function Yr({onClose:e,plan:t,onUpgrade:r}){const n="pro"===t,{t:i}
7=o(),[a,d]=l.useState(""),[h,u]=l.useState("bug"),[f,m]=l.useState(""),[O,x]=l.useState(""),[b,v]=l.useState(null),[y,w]=l.useState(null),[S,k]=l.useState(!1),[j,Q]=l.useState(!1),[P,$]=l.useState(""),[_,C]=l.useState(!1),T=l.useRef(null);function N(){C(!0),setTimeout(()=>e(),150)}function E(e){if(!e)return;if(!e.type.startsWith("image/"))return;v(e);const t=new FileReader;t.onload=e=>{var t;return w(null==(t=e.target)?void 0:t.result)},t.readAsDataURL(e)}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60 backdrop-blur-sm "+(_?"animate-fade-out":"animate-fade-in"),onClick:N}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4 pointer-events-none",children:c.jsxs("div",{className:"pointer-events-auto w-full max-w-[480px] max-h-[90vh] overflow-y-auto bg-[#1a1a1c] border border-[#2e2e2e] rounded-xl shadow-2xl "+(_?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:i.converter.bugReport.title}),c.jsx("button",{onClick:N,className:"p-1 -mt-0.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors flex-shrink-0",children:c.jsx(p,{size:16})})]}),c.jsx("p",{className:"text-xs text-[#888] mt-1.5 leading-relaxed",children:i.converter.bugReport.description})]}),S?c.jsxs("div",{className:"px-5 py-10 text-center",children:[c.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-xl bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("svg",{className:"w-6 h-6 text-[#98c379]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),c.jsx("p",{className:"text-sm font-medium text-[#ededed]",children:i.converter.bugReport.reportSent}),c.jsx("p",{className:"text-xs text-[#707070] mt-1",children:i.converter.bugReport.thanksFeedback})]}):c.jsxs("form",{onSubmit:async function(e){if(e.preventDefault(),a.trim()&&f.trim()){Q(!0),$("");try{let e;if(b){const t=b.name.split(".").pop()??"png",r=`bug-screenshots/${Date.now()}-${Math.random().toString(36).slice(2)}.${t}`,{error:n}=await s.storage.from("bug-reports").upload(r,b);if(!n){const{data:t}=s.storage.from("bug-reports").getPublicUrl(r);e=t.publicUrl}}const{data:{session:t}}=await s.auth.getSession();if(!t)throw new Error(i.converter.bugReport.notAuthenticated);const r=await fetch("/api/report-bug",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.access_token}`},body:JSON.stringify({title:a.trim(),category:h,description:f.trim(),screenshot_url:e,video_url:O.trim()||void 0})});if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.error||i.converter.bugReport.serverError)}k(!0),setTimeout(()=>N(),1500)}catch(t){$(t instanceof Error?t.message:i.converter.bugReport.sendError)}finally{Q(!1)}}},className:"px-5 py-4 space-y-4",children:[P&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/10 rounded-lg px-3 py-2",children:P}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:i.converter.bugReport.titleLabel}),c.jsx("input",{value:a,onChange:e=>d(e.target.value),placeholder:i.converter.bugReport.titlePlaceholder,required:!0,className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#146EF5] transition-colors placeholder:text-[#888]"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:i.converter.bugReport.categoryLabel}),c.jsx("div",{className:"flex gap-2",children:Lr.map(e=>c.jsxs("button",{type:"button",onClick:()=>u(e.value),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors "+(h===e.value?"bg-[#146EF5]/15 text-[#2b7ff9] border border-[#146EF5]/30":"bg-[#141416] text-[#aaa] border border-[#2e2e2e] hover:border-[#444]"),children:[c.jsx("span",{children:e.emoji}),e.label]},e.value))})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:i.converter.bugReport.descriptionLabel}),c.jsx("textarea",{value:f,onChange:e=>m(e.target.value),placeholder:i.converter.bugReport.descriptionPlaceholder,required:!0,rows:4,className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#146EF5] transition-colors placeholder:text-[#888] resize-none"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:i.converter.bugReport.videoLabel}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Z,{size:14,className:"text-[#888] flex-shrink-0"}),c.jsx("input",{value:O,onChange:e=>x(e.target.value),placeholder:"https://www.loom.com/share/...",type:"url",className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#146EF5] transition-colors placeholder:text-[#888]"})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:i.converter.bugReport.screenshotLabel}),y?c.jsxs("div",{className:"relative group",children:[c.jsx("img",{src:y,alt:"preview",className:"w-full h-32 object-cover rounded-lg border border-[#2e2e2e]"}),c.jsx("button",{type:"button",onClick:()=>{v(null),w(null)},className:"absolute top-2 right-2 p-1 rounded bg-black/60 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:c.jsx(p,{size:12})}),c.jsx("p",{className:"text-[10px] text-[#707070] mt-1",children:null==b?void 0:b.name})]}):c.jsxs("div",{onClick:()=>{var e;return null==(e=T.current)?void 0:e.click()},onDragOver:e=>e.preventDefault(),onDrop:function(e){e.preventDefault(),E(e.dataTransfer.files[0])},className:"flex flex-col items-center justify-center gap-2 py-5 border border-dashed border-[#2e2e2e] rounded-lg cursor-pointer hover:border-[#444] transition-colors",children:[c.jsx("div",{className:"p-2 rounded-lg bg-[#141416]",children:b?c.jsx(R,{size:16,className:"text-[#707070]"}):c.jsx(Xe,{size:16,className:"text-[#707070]"})}),c.jsx("p",{className:"text-xs text-[#707070]",children:i.converter.bugReport.dropImage})]}),c.jsx("input",{ref:T,type:"file",accept:"image/*",className:"hidden",onChange:e=>{var t;return E((null==(t=e.target.files)?void 0:t[0])??null)}})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[c.jsx("button",{type:"button",onClick:N,className:"px-4 py-2 text-xs font-medium text-[#aaa] hover:text-[#ededed] rounded-lg hover:bg-white/5 transition-colors",children:i.common.actions.cancel}),n?c.jsxs("button",{type:"submit",disabled:j,className:"px-4 py-2 text-xs font-semibold text-white bg-[#146EF5] hover:bg-[#2b7ff9] rounded-lg transition-colors shadow-[0_0_12px_rgba(20,110,245,0.2)] disabled:opacity-50 flex items-center gap-1.5",children:[j&&c.jsx(g,{size:12,className:"animate-spin"}),j?i.common.actions.sending:i.converter.bugReport.send]}):c.jsxs("button",{type:"button",onClick:()=>{N(),r()},className:"px-4 py-2 text-xs font-semibold text-white bg-[#146EF5] hover:bg-[#2b7ff9] rounded-lg transition-colors shadow-[0_0_12px_rgba(20,110,245,0.2)] flex items-center gap-1.5",children:[c.jsx(X,{size:12}),"Pro"]})]})]})]})})]})}const Ir="https://mcp.convertex.ai/mcp";function qr(e,t){return new Date(e).toLocaleDateString("fr"===t?"fr-FR":"en-US",{day:"numeric",month:"short",year:"numeric"})}function Vr({n:e,title:t,desc:r,children:n}){return c.jsxs("div",{className:"flex gap-3",children:[c.jsx("div",{className:"w-6 h-6 rounded-full bg-[#2b7ff9]/15 text-[#2b7ff9] text-[11px] font-bold flex items-center justify-center flex-shrink-0 mt-0.5",children:e}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("p",{className:"text-xs font-medium text-[#ededed]",children:t}),c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:r}),n]})]})}function Wr({code:e,copied:t,onCopy:r}){return c.jsxs("div",{className:"relative",children:[c.jsx("pre",{className:"text-[10px] font-mono text-[#98c379] bg-[#0e0e0e] border border-[#2e2e2e] rounded-lg p-3 pr-10 leading-relaxed overflow-x-auto whitespace-pre-wrap break-all",children:e}),c.jsx("button",{onClick:r,className:"absolute top-2 right-2 p-1.5 rounded bg-[#1c1c1c] border border-[#2e2e2e] text-[#707070] hover:text-[#ededed] transition-colors cursor-pointer",children:t?c.jsx(f,{size:12,className:"text-[#98c379]"}):c.jsx($,{size:12})})]})}
7function Br({platform:e,onChange:t,t:r}){return c.jsxs("div",{className:"inline-flex gap-1 p-0.5 bg-[#0e0e0e] rounded-lg border border-[#2e2e2e]/50",children:[c.jsxs("button",{onClick:()=>t("claude-code"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-[11px] font-medium transition-all cursor-pointer "+("claude-code"===e?"bg-[#1c1c1c] text-[#ededed] shadow-sm":"text-[#666] hover:text-[#888]"),children:[c.jsx(Ee,{size:12}),r.converter.skills.claudeCode]}),c.jsxs("button",{onClick:()=>t("claude-desktop"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-[11px] font-medium transition-all cursor-pointer "+("claude-desktop"===e?"bg-[#1c1c1c] text-[#ededed] shadow-sm":"text-[#666] hover:text-[#888]"),children:[c.jsx(ke,{size:12}),r.converter.skills.claudeDesktop]})]})}function Fr(e){const t={command:"npx",args:["-y","mcp-remote",Ir,"--header",`Authorization: Bearer ${e}`]};return`cursor://anysphere.cursor-deeplink/mcp/install?name=convertex&config=${btoa(JSON.stringify(t))}`}function Gr(e){const t={name:"convertex",command:"npx",args:["-y","mcp-remote",Ir,"--header",`Authorization: Bearer ${e}`]};return`vscode:mcp/install?${encodeURIComponent(JSON.stringify(t))}`}function Ur({size:e=14}){return c.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M5.07 1.04L22.15 12.18L13.87 13.37L18.29 22.44L14.69 23.96L10.32 14.72L5.07 19.51V1.04Z",fill:"currentColor"})})}function Hr({size:e=14}){return c.jsx("svg",{width:e,height:e,viewBox:"0 0 100 100",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M71.6 99.2L30.2 82.7 5.5 63.5.3 52.2l5.2-11.3 14.6-6.7L66.6.9 71.6.8l23 11.2v76l-23 11.2zM27.2 65.3l23.8-15L27.2 35.2v30.1zm44.4 18.5V16.2L44.3 50.3l27.3 33.5z"})})}function Kr({platform:e,onChange:t,t:r}){const n=r.converter.skills,s=[{id:"claude-desktop",label:n.claudeDesktop,desc:n.platformExtension,icon:c.jsx(ke,{size:14})},{id:"cursor",label:n.cursor,desc:n.platformOneClick,icon:c.jsx(Ur,{})},{id:"vscode",label:n.vscode,desc:n.platformOneClick,icon:c.jsx(Hr,{})},{id:"claude-code",label:n.claudeCode,desc:n.platformCli,icon:c.jsx(Ee,{size:14})}];return c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-[11px] text-[#888] font-medium",children:n.choosePlatform}),c.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:s.map(({id:r,label:n,desc:s,icon:i})=>c.jsxs("button",{onClick:()=>t(r),className:"flex flex-col items-center gap-1 px-2 py-2.5 rounded-lg border text-center transition-all cursor-pointer "+(e===r?"bg-[#1c1c1c] border-[#2b7ff9]/40 text-[#ededed] shadow-sm":"border-[#2e2e2e] text-[#666] hover:text-[#888] hover:border-[#3e3e3e]"),children:[i,c.jsx("span",{className:"text-[11px] font-medium leading-tight",children:n}),c.jsx("span",{className:"text-[9px] "+(e===r?"text-[#2b7ff9]":"opacity-50"),children:s})]},r))})]})}function Jr({description:e,buttonLabel:t,href:r,icon:n,nodeWarning:s}){return c.jsxs("div",{className:"space-y-3",children:[c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:e}),c.jsxs("a",{href:r,className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-lg text-xs font-medium text-white bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors",children:[n,t,c.jsx(k,{size:12,className:"opacity-60"})]}),c.jsxs("p",{className:"text-[11px] text-[#666] leading-relaxed",children:[s.split("{link}")[0],c.jsx("a",{href:"https://nodejs.org",target:"_blank",rel:"noopener noreferrer",className:"text-[#2b7ff9] hover:underline",children:"Node.js"}),s.split("{link}")[1]]})]})}function en({s:e,displayKey:t,copiedBlock:r,copyTo:n,getConfigJson:s}){const[i,o]=l.useState(!1);return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:e.mcpbDesc}),c.jsxs("a",{href:"/convertex.mcpb",download:!0,className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-lg text-xs font-medium text-white bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors",children:[c.jsx(P,{size:14}),e.mcpbDownloadBtn]})]}),c.jsxs("div",{className:"border-t border-[#2e2e2e] pt-3",children:[c.jsxs("button",{onClick:()=>o(!i),className:"flex items-center gap-1.5 text-[11px] text-[#666] hover:text-[#888] transition-colors cursor-pointer",children:[c.jsx(W,{size:12,className:"transition-transform "+(i?"":"-rotate-90")}),e.manualConfigToggle]}),i&&c.jsxs("div",{className:"mt-3 space-y-2",children:[c.jsx("p",{className:"text-[11px] text-[#666] leading-relaxed",children:e.manualConfigDesc}),c.jsxs("p",{className:"text-[11px] text-[#666] leading-relaxed",children:[e.manualConfigNodeRequired.split("{link}")[0],c.jsx("a",{href:"https://nodejs.org",target:"_blank",rel:"noopener noreferrer",className:"text-[#2b7ff9] hover:underline",children:"Node.js"}),e.manualConfigNodeRequired.split("{link}")[1]]}),c.jsx(Wr,{code:s(t),copied:"json"===r,onCopy:()=>n(s(t),"json")})]})]})]})}
7function tn({t:e,isFramer:t,toolLabel:r}){const[n,i]=l.useState("claude-desktop"),o=e.converter.skills,a=t?o.skillTabIntroFramer:o.skillTabIntro;return c.jsxs("div",{className:"space-y-5",children:[c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:a}),c.jsx(Br,{platform:n,onChange:i,t:e}),"claude-code"===n?c.jsxs("div",{className:"space-y-4",children:[c.jsx(Vr,{n:1,title:o.skillCodeStep1Title,desc:o.skillCodeStep1Desc,children:c.jsx("pre",{className:"text-[10px] font-mono text-[#98c379] bg-[#0e0e0e] border border-[#2e2e2e] rounded-lg p-3 leading-relaxed overflow-x-auto whitespace-pre-wrap break-all cursor-pointer hover:border-[#98c379]/30 transition-colors",onClick:()=>{navigator.clipboard.writeText("npx @convertex/skill install"),s.auth.updateUser({data:{skills_installed:!0}})},children:"npx @convertex/skill install"})}),c.jsx(Vr,{n:2,title:o.skillCodeStep2Title,desc:o.skillCodeStep2Desc,children:c.jsx("pre",{className:"text-[10px] font-mono text-[#98c379] bg-[#0e0e0e] border border-[#2e2e2e] rounded-lg p-3 leading-relaxed overflow-x-auto whitespace-pre-wrap break-all",children:"npx @convertex/skill update"})}),c.jsx(Vr,{n:3,title:o.skillCodeStep3Title,desc:o.skillCodeStep3Desc.replace("{tool}",r)})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx(Vr,{n:1,title:o.skillDesktopStep1Title,desc:o.skillDesktopStep1Desc,children:c.jsxs("a",{href:"/Convertex.zip",download:!0,onClick:()=>s.auth.updateUser({data:{skills_installed:!0}}),className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-xs font-medium text-white bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors",children:[c.jsx(P,{size:14}),o.downloadSkill]})}),c.jsx(Vr,{n:2,title:o.skillDesktopStep2Title,desc:o.skillDesktopStep2Desc}),c.jsx(Vr,{n:3,title:o.skillDesktopStep3Title,desc:o.skillDesktopStep3Desc})]})]})}function rn({t:e,locale:t,onRequestDelete:r,deletedKeyId:n}){const{profile:i}=a(),o=e.converter.skills,[d,h]=l.useState("claude-desktop"),[u,p]=l.useState([]),[m,x]=l.useState(!0),[b,v]=l.useState(!1),[y,w]=l.useState(null),[S,k]=l.useState(!1),[j,Q]=l.useState(null),[P,_]=l.useState(null),[C,T]=l.useState("");async function N(){const{data:e}=await s.from("mcp_api_keys").select("id, name, api_key_prefix, created_at, last_used_at").order("created_at",{ascending:!1});p(e??[]),x(!1)}function E(e,t){navigator.clipboard.writeText(e),Q(t),setTimeout(()=>Q(null),2e3)}function A(){_(null),T("")}async function z(e){const t=C.trim(),r=u.find(t=>t.id===e);if(!r||!t||t===r.name)return void A();p(r=>r.map(r=>r.id===e?{...r,name:t}:r)),_(null),T("");const{error:n}=await s.from("mcp_api_keys").update({name:t}).eq("id",e);n&&p(t=>t.map(t=>t.id===e?{...t,name:r.name}:t))}function Z(e){return`claude mcp add convertex --scope user -- npx -y mcp-remote ${Ir} --header 'Authorization: Bearer ${e}'`}l.useEffect(()=>{N()},[]),l.useEffect(()=>{n&&N()},[n]);const R=y||"YOUR_API_KEY";return c.jsxs("div",{className:"space-y-5",children:[c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:o.mcpTabIntro}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("h3",{className:"text-xs font-medium text-[#ededed] flex items-center gap-1.5",children:[c.jsx(xe,{size:12,className:"text-[#D4A853]"}),o.apiKeysTitle]}),c.jsxs("button",{onClick:async function(){v(!0);const e="cvx_"+crypto.randomUUID().replace(/-/g,""),t=await async function(e){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(r)).map(e=>e.toString(16).padStart(2,"0")).join("")}(e),r=e.slice(0,12),{error:n}=await s.from("mcp_api_keys").insert({user_id:i.id,api_key_hash:t,api_key_prefix:r,name:o.keyName.replace("{n}",String(u.length+1))});n||(w(e),k(!1),await N()),v(!1)},disabled:b||u.length>=3,className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-[10px] font-medium text-[#ededed] bg-[#2b7ff9] hover:bg-[#1161d4] transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",children:[b?c.jsx(g,{size:10,className:"animate-spin"}):c.jsx(Qe,{size:10}),o.generateKey]})]}),m?c.jsx("div",{className:"flex items-center justify-center py-6",children:c.jsx(g,{size:16,className:"animate-spin text-[#888]"})}):0===u.length?c.jsx("p",{className:"text-[11px] text-[#666] text-center py-4",children:o.noApiKeys}):c.jsx("div",{className:"space-y-2",children:u.map(e=>c.jsxs("div",{className:"rounded-lg border border-[#2e2e2e] bg-[#161616] p-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P===e.id?c.jsx("input",{autoFocus:!0,value:C,onChange:e=>T(e.target.value),onBlur:()=>z(e.id),onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),z(e.id)):"Escape"===t.key&&(t.preventDefault(),A())},maxLength:40,placeholder:o.renameKeyPlaceholder,className:"flex-1 min-w-0 text-xs font-medium text-[#ededed] bg-[#0e0e0e] border border-[#2b7ff9]/50 rounded px-2 py-1 outline-none focus:border-[#2b7ff9]"}):c.jsxs("button",{onClick:()=>{return t=e.id,r=e.name,_(t),void T(r);var t,r},title:o.renameKey,className:"group flex items-center gap-1.5 min-w-0 text-left cursor-pointer",children:[c.jsx("span",{className:"text-xs font-medium text-[#ededed] truncate",children:e.name}
7),c.jsx(je,{size:10,className:"text-[#666] opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]}),c.jsx("button",{onClick:()=>r(e.id),className:"p-1 rounded text-[#888] hover:text-[#e06c75] hover:bg-white/5 transition-colors cursor-pointer flex-shrink-0",children:c.jsx(Ze,{size:12})})]}),c.jsxs("code",{className:"block text-[11px] font-mono text-[#707070] bg-[#0e0e0e] rounded px-2 py-1.5",children:[e.api_key_prefix,"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"]}),c.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-[#666]",children:[c.jsx("span",{children:o.createdOn.replace("{date}",qr(e.created_at,t))}),e.last_used_at&&c.jsx("span",{children:o.usedOn.replace("{date}",qr(e.last_used_at,t))})]})]},e.id))})]}),y&&c.jsxs("div",{className:"rounded-lg border border-[#e5c07b]/30 bg-[#e5c07b]/5 p-3 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(O,{size:14,className:"text-[#e5c07b] flex-shrink-0"}),c.jsx("p",{className:"text-xs font-medium text-[#e5c07b]",children:o.copyKeyNow})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"flex-1 text-[11px] font-mono text-[#ededed] bg-[#0e0e0e] border border-[#2e2e2e] rounded px-2 py-1.5 select-all break-all",children:y}),c.jsx("button",{onClick:()=>{navigator.clipboard.writeText(y),k(!0)},className:"p-1.5 rounded bg-[#232323] border border-[#2e2e2e] text-[#707070] hover:text-[#ededed] transition-colors cursor-pointer flex-shrink-0",children:S?c.jsx(f,{size:14,className:"text-[#98c379]"}):c.jsx($,{size:14})})]}),c.jsx("button",{onClick:()=>w(null),className:"text-[10px] text-[#888] hover:text-[#ededed] transition-colors",children:o.keyCopied})]}),c.jsx("div",{className:"h-px bg-[#2e2e2e]"}),c.jsx(Kr,{platform:d,onChange:h,t:e}),y||0!==u.length?"claude-desktop"===d?c.jsx(en,{s:o,displayKey:R,copiedBlock:j,copyTo:E,getConfigJson:function(e){return JSON.stringify({mcpServers:{convertex:{command:"npx",args:["-y","mcp-remote",Ir,"--header",`Authorization: Bearer ${e}`]}}},null,2)}}):"cursor"===d?c.jsx(Jr,{description:o.cursorInstallDesc,buttonLabel:o.cursorInstallBtn,href:Fr(R),icon:c.jsx(Ur,{size:16}),nodeWarning:o.manualConfigNodeRequired}):"vscode"===d?c.jsx(Jr,{description:o.vscodeInstallDesc,buttonLabel:o.vscodeInstallBtn,href:Gr(R),icon:c.jsx(Hr,{size:16}),nodeWarning:o.manualConfigNodeRequired}):c.jsxs("div",{className:"space-y-4",children:[c.jsx(Vr,{n:1,title:o.mcpCodeStep1Title,desc:o.mcpCodeStep1Desc}),c.jsx(Vr,{n:2,title:o.mcpCodeStep2Title,desc:o.mcpCodeStep2Desc,children:c.jsx(Wr,{code:Z(R),copied:"cli"===j,onCopy:()=>E(Z(R),"cli")})}),c.jsx(Vr,{n:3,title:o.mcpCodeStep3Title,desc:o.mcpCodeStep3Desc})]}):c.jsx("p",{className:"text-[11px] text-[#666] text-center py-4",children:o.mcpGenerateFirst})]})}function nn({onClose:e}){const{t:t,locale:r}=o(),{closing:n,close:i}=xr(e,150),a=t.converter.skills,d="framer"===He(e=>e.targetTool),h=d?"Framer":"Webflow",[u,f]=l.useState("skill"),[m,g]=l.useState(null),[O,x]=l.useState(null),b={skill:a.tabSkill,mcp:a.tabMcp};return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[60] "+(n?"animate-fade-out":"animate-fade-in"),onClick:i}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4",onClick:i,children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-2xl max-h-[85vh] flex flex-col "+(n?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-[#2e2e2e] flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 509.64",className:"w-5 h-5 rounded",children:[c.jsx("path",{fill:"#D77655",d:"M115.612 0h280.775C459.974 0 512 52.026 512 115.612v278.415c0 63.587-52.026 115.612-115.613 115.612H115.612C52.026 509.639 0 457.614 0 394.027V115.612C0 52.026 52.026 0 115.612 0z"}),c.jsx("path",{fill:"#FCF2EE",fillRule:"nonzero",d:"M142.27 316.619l73.655-41.326 1.238-3.589-1.238-1.996-3.589-.001-12.31-.759-42.084-1.138-36.498-1.516-35.361-1.896-8.897-1.895-8.34-10.995.859
7-5.484 7.482-5.03 10.717.935 23.683 1.617 35.537 2.452 25.782 1.517 38.193 3.968h6.064l.86-2.451-2.073-1.517-1.618-1.517-36.776-24.922-39.81-26.338-20.852-15.166-11.273-7.683-5.687-7.204-2.451-15.721 10.237-11.273 13.75.935 3.513.936 13.928 10.716 29.749 23.027 38.848 28.612 5.687 4.727 2.275-1.617.278-1.138-2.553-4.271-21.13-38.193-22.546-38.848-10.035-16.101-2.654-9.655c-.935-3.968-1.617-7.304-1.617-11.374l11.652-15.823 6.445-2.073 15.545 2.073 6.547 5.687 9.655 22.092 15.646 34.78 24.265 47.291 7.103 14.028 3.791 12.992 1.416 3.968 2.449-.001v-2.275l1.997-26.641 3.69-32.707 3.589-42.084 1.239-11.854 5.863-14.206 11.652-7.683 9.099 4.348 7.482 10.716-1.036 6.926-4.449 28.915-8.72 45.294-5.687 30.331h3.313l3.792-3.791 15.342-20.372 25.782-32.227 11.374-12.789 13.27-14.129 8.517-6.724 16.1-.001 11.854 17.617-5.307 18.199-16.581 21.029-13.75 17.819-19.716 26.54-12.309 21.231 1.138 1.694 2.932-.278 44.536-9.479 24.062-4.347 28.714-4.928 12.992 6.066 1.416 6.167-5.106 12.613-30.71 7.583-36.018 7.204-53.636 12.689-.657.48.758.935 24.164 2.275 10.337.556h25.301l47.114 3.514 12.309 8.139 7.381 9.959-1.238 7.583-18.957 9.655-25.579-6.066-59.702-14.205-20.474-5.106-2.83-.001v1.694l17.061 16.682 31.266 28.233 39.152 36.397 1.997 8.999-5.03 7.102-5.307-.758-34.401-25.883-13.27-11.651-30.053-25.302-1.996-.001v2.654l6.926 10.136 36.574 54.975 1.895 16.859-2.653 5.485-9.479 3.311-10.414-1.895-21.408-30.054-22.092-33.844-17.819-30.331-2.173 1.238-10.515 113.261-4.929 5.788-11.374 4.348-9.478-7.204-5.03-11.652 5.03-23.027 6.066-30.052 4.928-23.886 4.449-29.674 2.654-9.858-.177-.657-2.173.278-22.37 30.71-34.021 45.977-26.919 28.815-6.445 2.553-11.173-5.789 1.037-10.337 6.243-9.2 37.257-47.392 22.47-29.371 14.508-16.961-.101-2.451h-.859l-98.954 64.251-17.618 2.275-7.583-7.103.936-11.652 3.589-3.791 29.749-20.474z"})]}),c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:a.title})]}),c.jsx("button",{onClick:i,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:c.jsx(p,{size:16})})]}),c.jsx("div",{className:"px-5 pt-3 pb-0 flex-shrink-0",children:c.jsx("div",{className:"flex gap-0.5 p-0.5 bg-[#141414] rounded-lg border border-[#2e2e2e]/50",children:["skill","mcp"].map(e=>c.jsx("button",{onClick:()=>f(e),className:"flex-1 py-1.5 rounded-md text-xs font-medium transition-all cursor-pointer "+(u===e?"bg-[#232323] text-[#ededed] shadow-sm":"text-[#888] hover:text-[#999]"),children:b[e]},e))})}),c.jsxs("div",{className:"px-5 py-4 overflow-y-auto flex-1",children:["skill"===u&&c.jsx(tn,{t:t,isFramer:d,toolLabel:h}),"mcp"===u&&c.jsx(rn,{t:t,locale:r,onRequestDelete:g,deletedKeyId:O})]})]})}),m&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] animate-fade-in",onClick:()=>g(null)}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:()=>g(null),children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:a.revokeKeyTitle})}),c.jsx("div",{className:"px-5 py-4",children:c.jsx("p",{className:"text-xs text-[#707070] leading-relaxed",children:a.revokeKeyMessage})}),c.jsxs("div",{className:"flex gap-2 px-5 py-3 border-t border-[#2e2e2e]",children:[c.jsx("button",{onClick:()=>g(null),className:"flex-1 py-2 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:t.common.actions.cancel}),c.jsx("button",{onClick:()=>async function(e){await s.from("mcp_api_keys").delete().eq("id",e),g(null),x(e)}(m),className:"flex-1 py-2 rounded-lg bg-[#e06c75]/15 border border-[#e06c75]/20 text-xs font-medium text-[#e06c75] hover:bg-[#e06c75]/25 transition-colors cursor-pointer",children:a.revokeBtn})]})]})})]})]})}function sn({onClose:e}){const{t:t}=o(),r=[t.converter.pricingDrawer.features.converter,t.converter.pricingDrawer.features.preview,t.converter.pricingDrawer.features.importStyles,t.converter.pricingDrawer.features.autoDetect,t.converter.pricingDrawer.features.aiIntegration,t.converter.pricingDrawer.features.history,t.converter.pricingDrawer.features.multiProjects,t.converter.pricingDrawer.features.cdnScripts,t.converter.pricingDrawer.features.shareablePreview,t.converter.pricingDrawer.features.prioritySupport],n=[{key:"free",name:"Free",desc:t.converter.pricingDrawer.freeDesc,price:"0",period:t.converter.pricingDrawer.foreverFree,features:r.map((e,t)=>({text:e,included:t<5})),cta:t.converter.pricingDrawer.freeCta,highlight:!1,badge:null},{key:"starter",name:"Starter",desc:t.converter.pricingDrawer.starterDesc,price:"19",period:t.converter.pricingDrawer.perMonth,features:r.map((e,t)=>({text:e,included:t<8})),cta:t.converter.pricingDrawer.starterCta,highlight:!1,badge:null},{key:"pro",name:"Pro",desc:t.converter.pricingDrawer.proDesc,price:"29",period:t.converter.pricingDrawer.perMonth,features:r.map(e=>({text:e,included:!0})),cta:t.converter.pricingDrawer.proCta,highlight:!0,badge:t.converter.pricingDrawer.popular}],s={free:t.converter.pricingDrawer.freeQuota,starter:t.converter.pricingDrawer.starterQuota,pro:t.converter.pricingDrawer.proQuota},{user:i,profile:d}=a(),{closing:h,close:u}=xr(e,250),[m,O]=l.useState(null),x=(null==d?void 0:d.plan)??"free";function b(e){const r=x===e.key,n="pro"===x&&"pro"!==e.key||"starter"===x&&"free"===e.key,s="pro"===e.key;if(r)return c.jsx("button",{disabled:!0,className:"w-full py-3 rounded-xl text-sm font-semibold bg-white/[0.06] text-[#98c379] cursor-default",children:t.converter.pricingDrawer.currentPlan});if(n)return c.jsx("button",{disabled:!0,className:"w-full py-3 rounded-xl text-sm font-semibold bg-white/[0.03] text-[#666] cursor-default",children:e.name});const o="w-full py-3 rounded-xl text-sm font-semibold transition-all duration-200 flex items-center justify-center gap-2 active:scale-[0.98]";return i?c.jsxs("button",{onClick:()=>async function(e){O(e);try{await w(e)}catch{O(null)}}(e.key),disabled:!!m,className:`${o} disabled:opacity-50 ${s?"bg-gradient-to-r from-[#D4A853] to-[#B8942E] text-[#1a1400] hover:from-[#E8C872] hover:to-[#D4A853] shadow-[0_0_20px_rgba(212,168,83,0.2)]":"bg-white text-black hover:bg-white/90"}`,children:[m===e.key&&c.jsx(g,{size:14,className:"animate-spin"}),m===e.key?t.converter.pricingDrawer.redirecting:e.cta]}):c.jsx("button",{onClick:u,className:`${o} ${s?"bg-gradient-to-r from-[#D4A853] to-[#B8942E] text-[#1a1400] hover:from-[#E8C872] hover:to-[#D4A853] shadow-[0_0_20px_rgba(212,168,83,0.2)]":"bg-white text-black hover:bg-white/90"}`,children:e.cta})}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[60] bg-black/80 backdrop-blur-sm "+(h?"animate-fade-out"
7:"animate-fade-in"),onClick:u}),c.jsxs("div",{className:"fixed inset-x-0 bottom-0 z-[61] h-[96vh] bg-[#09090b] border-t border-[#1e1e1e] rounded-t-3xl flex flex-col "+(h?"animate-sheet-up-out":"animate-sheet-up-in"),children:[c.jsxs("div",{className:"flex items-center justify-between px-8 pt-4 pb-0 flex-shrink-0",children:[c.jsx("div",{className:"w-10 h-1 rounded-full bg-[#333] mx-auto absolute left-1/2 -translate-x-1/2 top-3"}),c.jsx("div",{}),c.jsx("button",{onClick:u,className:"p-2 rounded-lg text-[#888] hover:text-white hover:bg-white/5 transition-colors",children:c.jsx(p,{size:18})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c.jsxs("div",{className:"text-center pt-8 pb-12 px-6",children:[c.jsx("h2",{className:"text-4xl font-bold text-white tracking-tight",children:t.converter.pricingDrawer.title}),c.jsx("p",{className:"text-base text-[#707070] mt-3 max-w-md mx-auto",children:t.converter.pricingDrawer.subtitle})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-5 max-w-5xl mx-auto px-6 pb-16",children:n.map(e=>{const t="pro"===e.key;return c.jsxs("div",{className:"relative rounded-2xl p-7 flex flex-col "+(t?"bg-[#0f0f11] border border-[#D4A853]/30 shadow-[0_0_40px_rgba(212,168,83,0.06)]":"bg-[#0f0f11] border border-[#1e1e1e]"),children:[e.badge&&c.jsx("span",{className:"absolute -top-3 left-6 text-[11px] font-semibold px-3 py-1 rounded-full bg-[#D4A853]/15 text-[#E8C872] border border-[#D4A853]/20",children:e.badge}),c.jsx("h3",{className:"text-lg font-semibold mb-1 "+(t?"text-[#E8C872]":"text-white"),children:e.name}),c.jsx("p",{className:"text-sm text-[#888] mb-6",children:e.desc}),c.jsxs("div",{className:"flex items-baseline gap-1.5 mb-2",children:[c.jsx("span",{className:"text-5xl font-extrabold text-white tracking-tight",children:e.price}),c.jsx("span",{className:"text-lg text-[#888] font-medium",children:"â¬"}),c.jsx("span",{className:"text-sm text-[#888] ml-1",children:e.period})]}),c.jsx("p",{className:"text-sm font-medium mb-8 "+(t?"text-[#D4A853]":"text-[#888]"),children:s[e.key]}),b(e),c.jsx("div",{className:"border-t border-[#1e1e1e] my-6"}),c.jsx("ul",{className:"space-y-3.5 flex-1",children:e.features.map(e=>c.jsxs("li",{className:"flex items-center gap-3",children:[e.included?c.jsx(f,{size:15,className:t?"text-[#D4A853]":"text-[#888]",strokeWidth:2.5}):c.jsx(_,{size:15,className:"text-[#888]",strokeWidth:2}),c.jsx("span",{className:"text-sm "+(e.included?"text-[#aaa]":"text-[#888]"),children:e.text})]},e.text))})]},e.key)})})]})]})]})}function on({conversionId:e,userId:t,onClose:r}){const{t:n}=o(),[i,a]=l.useState(""),[d,h]=l.useState(!1),[u,f]=l.useState(!1),[m,O]=l.useState(""),[x,b]=l.useState(!1);function v(){b(!0),setTimeout(()=>r(),150)}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60 backdrop-blur-sm "+(x?"animate-fade-out":"animate-fade-in"),onClick:v}),c.jsx("div",{className:"fixed inset-0 z-[61] flex items-center justify-center p-4 pointer-events-none",children:c.jsxs("div",{className:"pointer-events-auto w-full max-w-[440px] bg-[#1a1a1c] border border-[#2e2e2e] rounded-xl shadow-2xl "+(x?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-[#2e2e2e]",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-[#e5c07b]/10",children:c.jsx(we,{size:14,className:"text-[#e5c07b]"})}),c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:n.converter.feedback.title})]}),c.jsx("button",{onClick:v,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:16})})]}),d?c.jsxs("div",{className:"px-5 py-10 text-center",children:[c.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-xl bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("svg",{className:"w-6 h-6 text-[#98c379]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),c.jsx("p",{className:"text-sm font-medium text-[#ededed]",children:n.converter.feedback.thankYou}),c.jsx("p",{className:"text-xs text-[#707070] mt-1",children:n.converter.feedback.willAnalyze})]}):c.jsxs("form",{onSubmit:async function(r){if(r.preventDefault(),i.trim()){f(!0),O("");try{const{error:r}=await s.from("conversion_feedback").insert({conversion_id:e||void 0,user_id:t||void 0,comment:i.trim(),source:"feedback_dialog"});if(r)throw r;h(!0),setTimeout(()=>v(),1500)}catch(o){O(o instanceof Error?o.message:n.converter.feedback.sendError)}finally{f(!1)}}},className:"px-5 py-4 space-y-4",children:[c.jsx("p",{className:"text-xs text-[#888] leading-relaxed",children:n.converter.feedback.description}),m&&c.jsx("p",{className:"text-xs text-[#ff6b6b] bg-[#ff6b6b]/10 rounded-lg px-3 py-2",children:m}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-[#aaa]",children:n.converter.feedback.questionLabel}),c.jsx("textarea",{value:i,onChange:e=>a(e.target.value),placeholder:n.converter.feedback.placeholder,required:!0,rows:4,autoF
7ocus:!0,className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#e5c07b]/50 transition-colors placeholder:text-[#555] resize-none"})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:v,className:"px-4 py-2 text-xs font-medium text-[#aaa] hover:text-[#ededed] rounded-lg hover:bg-white/5 transition-colors",children:n.common.actions.cancel}),c.jsxs("button",{type:"submit",disabled:u||!i.trim(),className:"px-4 py-2 text-xs font-semibold text-[#171717] bg-[#e5c07b] hover:bg-[#d4af6a] rounded-lg transition-colors disabled:opacity-40 flex items-center gap-1.5",children:[u&&c.jsx(g,{size:12,className:"animate-spin"}),u?n.common.actions.sending:n.converter.feedback.send]})]})]})]})})]})}function an({conversionId:e,userId:t,onClose:r}){const{t:n}=o(),i=n.converter.rating,[a,d]=l.useState(0),[h,u]=l.useState(0),[f,m]=l.useState(""),[O,x]=l.useState(!1),[b,v]=l.useState(!1),[y,w]=l.useState(!1),S=l.useRef(null),k=l.useRef(null),j=l.useRef(!0);function Q(){S.current&&clearTimeout(S.current),w(!0),S.current=setTimeout(()=>{j.current&&r()},250)}return l.useEffect(()=>(j.current=!0,()=>{j.current=!1,S.current&&clearTimeout(S.current),k.current&&clearTimeout(k.current)}),[]),c.jsx("div",{className:"fixed bottom-5 right-5 z-[60] w-[340px] bg-[#1a1a1c]/90 backdrop-blur-xl border border-[#444] rounded-xl shadow-[0_8px_40px_rgba(0,0,0,0.5),0_0_0_1px_rgba(255,255,255,0.06)] ring-1 ring-white/[0.08] "+(y?"animate-sheet-up-out":"animate-sheet-up-in"),children:b?c.jsxs("div",{className:"px-5 py-5 text-center",children:[c.jsx("div",{className:"w-10 h-10 mx-auto mb-3 rounded-xl bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("svg",{className:"w-5 h-5 text-[#98c379]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),c.jsx("p",{className:"text-sm font-medium text-[#ededed]",children:i.thankYou})]}):c.jsxs("div",{className:"px-5 py-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"text-xs font-medium text-[#ededed]",children:i.question}),c.jsx("button",{onClick:Q,className:"p-0.5 rounded text-[#555] hover:text-[#ededed] transition-colors cursor-pointer",children:c.jsx(p,{size:14})})]}),c.jsx("div",{className:"flex items-center gap-1",children:[1,2,3,4,5].map(e=>c.jsx("button",{onClick:()=>d(e),onMouseEnter:()=>u(e),onMouseLeave:()=>u(0),className:"p-0.5 transition-transform hover:scale-110 cursor-pointer",children:c.jsx(B,{size:22,className:"transition-colors "+(e<=(h||a)?"text-[#E8C872] fill-[#E8C872]":"text-[#555] fill-[#555]/20")})},e))}),a>0&&c.jsxs("div",{className:"space-y-2.5 animate-fade-in",children:[c.jsx("textarea",{value:f,onChange:e=>m(e.target.value),placeholder:i.commentPlaceholder,rows:2,className:"w-full px-3 py-2 text-xs text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#E8C872]/40 transition-colors placeholder:text-[#555] resize-none"}),c.jsxs("button",{onClick:async function(){if(0!==a){x(!0);try{if(await s.from("conversion_feedback").insert({conversion_id:e||void 0,user_id:t||void 0,rating:a,comment:f.trim()||null,source:"rating_toast"}),!j.current)return;v(!0),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{j.current&&Q()},1500)}catch{j.current&&Q()}finally{j.current&&x(!1)}}},disabled:O,className:"w-full py-2 text-xs font-semibold text-[#171717] bg-[#E8C872] hover:bg-[#d4b85e] rounded-lg transition-colors disabled:opacity-40 flex items-center justify-center gap-1.5 cursor-pointer",children:[O&&c.jsx(g,{size:12,className:"animate-spin"}),i.send]})]})]})})}function ln({conversionId:e,userId:t,onClose:r,onOpenSkills:n,onOpenUpgrade:i}){const{t:a}=o(),d=a.converter.rating,[h,u]=l.useState(0),[f,m]=l.useState(0),[O,x]=l.useState(""),[b,v]=l.useState(null),[y,w]=l.useState([]),[S,k]=l.useState(!1),[j,Q]=l.useState("rate"),[P,$]=l.useState(!1),[_,C]=l.useState(""),[T,N]=l.useState(""),[E,A]=l.useState(""),[z,Z]=l.useState(!0),[R,X]=l.useState(!1),D=l.useRef(null),L=l.useRef(!0);function Y(){D.current&&clearTimeout(D.current),$(!0),D.current=setTimeout(()=>{L.current&&r()},200)}l.useEffect(()=>(L.current=!0,()=>{L.current=!1,D.current&&clearTimeout(D.current)}),[]),l.useEffect(()=>{function e(e){"Escape"===e.key&&Y()}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);const I=h>0&&h<4,q=h>=4;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[120] bg-black/70 backdrop-blur-md "+(P?"animate-fade-out"
7:"animate-fade-in")}),c.jsx("div",{className:"fixed inset-0 z-[121] flex items-center justify-center p-4 pointer-events-none",children:c.jsxs("div",{className:"pointer-events-auto w-full max-w-[460px] bg-[#1a1a1c] border border-[#2e2e2e] rounded-2xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/[0.04] overflow-hidden "+(P?"animate-modal-out":"animate-modal-in"),translate:"no",children:["rate"===j&&c.jsxs("div",{className:"px-6 py-5 space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h2",{className:"text-base font-semibold text-[#ededed]",children:d.modalTitle}),c.jsx("p",{className:"text-xs text-[#888] leading-relaxed",children:d.modalSubtitle})]}),c.jsx("button",{onClick:Y,className:"p-1 -m-1 rounded text-[#666] hover:text-[#ededed] transition-colors cursor-pointer","aria-label":"Close",children:c.jsx(p,{size:16})})]}),c.jsx("div",{className:"flex items-center justify-center gap-1 py-2",children:[1,2,3,4,5].map(e=>c.jsx("button",{onClick:()=>u(e),onMouseEnter:()=>m(e),onMouseLeave:()=>m(0),className:"p-1.5 transition-transform hover:scale-110 cursor-pointer",children:c.jsx(B,{size:32,className:"transition-colors "+(e<=(f||h)?"text-[#E8C872] fill-[#E8C872]":"text-[#3a3a3a] fill-[#2a2a2a]")})},e))}),I&&c.jsxs("div",{className:"space-y-4 animate-fade-in",children:[c.jsxs("div",{className:"space-y-2 p-3 rounded-lg bg-[#E8C872]/[0.04] border border-[#E8C872]/15",children:[c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx(M,{size:14,className:"text-[#E8C872] mt-0.5 shrink-0"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-xs font-medium text-[#ededed]",children:d.skillQuestion}),c.jsx("p",{className:"text-[11px] text-[#888] leading-relaxed",children:d.skillHint})]})]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5 pt-1",children:[c.jsx("button",{onClick:()=>v(!0),className:"px-2.5 py-1 text-[11px] font-medium rounded-md border transition-colors cursor-pointer "+(!0===b?"bg-[#E8C872]/15 border-[#E8C872]/60 text-[#E8C872]":"bg-transparent border-[#3a3a3a] text-[#aaa] hover:border-[#555]"),children:d.skillYes}),c.jsx("button",{onClick:()=>v(!1),className:"px-2.5 py-1 text-[11px] font-medium rounded-md border transition-colors cursor-pointer "+(!1===b?"bg-[#E8C872]/15 border-[#E8C872]/60 text-[#E8C872]":"bg-transparent border-[#3a3a3a] text-[#aaa] hover:border-[#555]"),children:d.skillNo}),c.jsxs("button",{onClick:()=>{v(!1),n()},className:"px-2.5 py-1 text-[11px] font-medium rounded-md bg-[#E8C872] text-[#171717] hover:bg-[#d4b85e] transition-colors cursor-pointer flex items-center gap-1",children:[d.skillInstall,c.jsx(re,{size:11})]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-xs font-medium text-[#aaa]",children:d.issueTitle}),c.jsx("div",{className:"flex flex-wrap gap-1.5",children:[["layout",d.issueLayout],["classes",d.issueClasses],["styles",d.issueStyles],["other",d.issueOther]].map(([e,t])=>c.jsx("button",{onClick:()=>function(e){w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}(e),className:"px-2.5 py-1 text-[11px] font-medium rounded-md border transition-colors cursor-pointer "+(y.includes(e)?"bg-white/10 border-white/30 text-[#ededed]":"bg-transparent border-[#3a3a3a] text-[#aaa] hover:border-[#555]"),children:t},e))})]})]}),h>0&&c.jsx("textarea",{value:O,onChange:e=>x(e.target.value),placeholder:d.commentPlaceholder,rows:q?3:2,className:"w-full px-3 py-2 text-xs text-[#ededed] bg-[#141416] border border-[#2e2e2e] rounded-lg outline-none focus:border-[#E8C872]/40 transition-colors placeholder:text-[#555] resize-none animate-fade-in"}),c.jsxs("button",{onClick:async function(){if(0!==h&&!S){k(!0);try{await s.from("conversion_feedback").insert({conversion_id:e||void 0,user_id:t||void 0,rating:h,comment:O.trim()||null,skill_used:h<4?b:null,issue_categories:h<4&&y.length?y:null,source:"rating_modal"})}catch{}finally{if(!L.current)return;k(!1),Q(h>=4?"review":"thanks_negative"),h<4&&(D.current=setTimeout(()=>{L.current&&Y()},1800))}}}
7,disabled:0===h||S,className:"w-full py-2.5 text-xs font-semibold text-[#171717] bg-[#E8C872] hover:bg-[#d4b85e] rounded-lg transition-colors disabled:opacity-30 disabled:cursor-not-allowed flex items-center justify-center gap-1.5 cursor-pointer",children:[S&&c.jsx(g,{size:12,className:"animate-spin"}),d.send]}),c.jsx("button",{onClick:i,className:"w-full text-[11px] text-[#888] hover:text-[#E8C872] transition-colors text-center pt-1 cursor-pointer",children:d.upgradeCta})]}),"review"===j&&c.jsxs("div",{className:"px-6 py-5 space-y-4 animate-fade-in",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h2",{className:"text-base font-semibold text-[#ededed]",children:d.reviewTitle}),c.jsx("p",{className:"text-xs text-[#888] leading-relaxed",children:d.reviewBody})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-[11px] font-medium text-[#ddd]",children:d.reviewLabelContent}),c.jsx("textarea",{value:_,onChange:e=>C(e.target.value),placeholder:d.reviewPlaceholder,rows:3,autoFocus:!0,className:"w-full px-3 py-2.5 text-sm text-[#ededed] bg-[#0f0f10] border border-[#3a3a3a] rounded-lg outline-none focus:border-[#E8C872]/60 focus:bg-[#141416] transition-colors placeholder:text-[#888] resize-none"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-[11px] font-medium text-[#ddd]",children:d.reviewLabelName}),c.jsx("input",{type:"text",value:T,onChange:e=>N(e.target.value),placeholder:d.reviewNamePlaceholder,className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#0f0f10] border border-[#3a3a3a] rounded-lg outline-none focus:border-[#E8C872]/60 focus:bg-[#141416] transition-colors placeholder:text-[#888]"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-[11px] font-medium text-[#ddd]",children:d.reviewLabelRole}),c.jsx("input",{type:"text",value:E,onChange:e=>A(e.target.value),placeholder:d.reviewRolePlaceholder,className:"w-full px-3 py-2 text-sm text-[#ededed] bg-[#0f0f10] border border-[#3a3a3a] rounded-lg outline-none focus:border-[#E8C872]/60 focus:bg-[#141416] transition-colors placeholder:text-[#888]"})]})]}),c.jsxs("label",{className:"flex items-start gap-2 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:z,onChange:e=>Z(e.target.checked),className:"mt-0.5 w-3.5 h-3.5 accent-[#E8C872] cursor-pointer"}),c.jsx("span",{className:"text-[11px] text-[#888] leading-relaxed",children:d.reviewConsent})]}),c.jsxs("button",{onClick:async function(){if(R)return;const r=_.trim();if(r){X(!0);try{await s.from("public_reviews").insert({user_id:t||void 0,conversion_id:e||void 0,rating:h,content:r,display_name:T.trim()||null,role:E.trim()||null,allow_public_display:z})}catch{}finally{if(!L.current)return;X(!1),Q("thanks_review"),D.current=setTimeout(()=>{L.current&&Y()},1800)}}},disabled:!_.trim()||R,className:"w-full py-2.5 text-xs font-semibold text-[#171717] bg-[#E8C872] hover:bg-[#d4b85e] rounded-lg transition-colors disabled:opacity-30 disabled:cursor-not-allowed flex items-center justify-center gap-1.5 cursor-pointer",children:[R&&c.jsx(g,{size:12,className:"animate-spin"}),d.reviewSend]}),c.jsx("button",{onClick:Y,className:"w-full py-1 text-[11px] text-[#888] hover:text-[#ededed] transition-colors cursor-pointer",children:d.reviewSkip})]}),"thanks_review"===j&&c.jsxs("div",{className:"px-6 py-8 text-center animate-fade-in",children:[c.jsx("div",{className:"w-10 h-10 mx-auto mb-3 rounded-xl bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("svg",{className:"w-5 h-5 text-[#98c379]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),c.jsx("p",{className:"text-sm font-medium text-[#ededed]",children:d.reviewSent})]}),"thanks_negative"===j&&c.jsxs("div",{className:"px-6 py-8 text-center animate-fade-in",children:[c.jsx("div",{className:"w-10 h-10 mx-auto mb-3 rounded-xl bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("svg",{className:"w-5 h-5 text-[#98c379]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),c.jsx("p",{className:"text-sm font-medium text-[#ededed]",children:d.thankYou})]})]})})]})}
7const cn={blocker:{text:"text-[#ff6b6b]",bg:"bg-[#ff6b6b]/10",border:"border-[#ff6b6b]/30",dot:"bg-[#ff6b6b]"},warning:{text:"text-[#e5c07b]",bg:"bg-[#e5c07b]/10",border:"border-[#e5c07b]/30",dot:"bg-[#e5c07b]"},info:{text:"text-[#61afef]",bg:"bg-[#61afef]/10",border:"border-[#61afef]/30",dot:"bg-[#61afef]"}};function dn({severity:e,size:t=12}){return"blocker"===e?c.jsx(_e,{size:t}):"warning"===e?c.jsx(O,{size:t}):c.jsx(ge,{size:t})}function hn({html:e,css:t,js:r,tool:n,result:s,projectName:i,pageName:a,blockersIgnored:d=!1,onIgnoreBlockers:h}){const{t:u}=o(),m=u.converter.preflight,[g,x]=l.useState(!1),[b,v]=l.useState(!1),[y,w]=l.useState(null),S=l.useRef(null),k=l.useRef(null),j=l.useMemo(()=>mr({html:e,css:t,js:r,tool:n}),[e,t,r,n]),Q=s??j;if(l.useEffect(()=>{if(g)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){S.current&&!S.current.contains(e.target)&&k.current&&!k.current.contains(e.target)&&x(!1)}},[g]),0===Q.total)return null;const{blocker:P,warning:_,info:C}=Q.counts;let T,N,E;return P>0?(T="text-[#ff6b6b] bg-[#ff6b6b]/10 border-[#ff6b6b]/30 hover:bg-[#ff6b6b]/15",N=_e,E=m.issuesCount.replace("{count}",String(Q.total))):_>0?(T="text-[#e5c07b] bg-[#e5c07b]/10 border-[#e5c07b]/30 hover:bg-[#e5c07b]/15",N=O,E=m.issuesCount.replace("{count}",String(Q.total))):(T="text-[#61afef] bg-[#61afef]/10 border-[#61afef]/20 hover:bg-[#61afef]/15",N=ge,E=m.tipsCount.replace("{count}",String(C))),c.jsxs("div",{className:"relative",children:[c.jsxs("button",{ref:k,type:"button",onClick:()=>x(e=>!e),className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-[11px] font-medium transition-colors cursor-pointer ${T}`,title:d?m.ignoredTooltip:m.openPanel,children:[c.jsx(N,{size:12}),c.jsx("span",{children:E})]}),g&&c.jsxs("div",{ref:S,className:"absolute right-0 top-full mt-2 w-[420px] bg-[#1a1a1c] border border-[#2e2e2e] rounded-xl shadow-2xl z-[60] animate-modal-in overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#2e2e2e]",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(N,{size:14}),c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:m.title})]}),c.jsx("button",{onClick:()=>x(!1),className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:14})})]}),P>0&&!d&&c.jsxs("div",{className:"flex items-start gap-2 px-4 py-2.5 bg-[#ff6b6b]/10 border-b border-[#ff6b6b]/30",children:[c.jsx(_e,{size:12,className:"mt-0.5 flex-shrink-0 text-[#ff6b6b]"}),c.jsx("p",{className:"text-[11px] text-[#ff6b6b] leading-snug",children:m.blockedBanner})]}),P>0&&d&&c.jsxs("div",{className:"flex items-start gap-2 px-4 py-2.5 bg-[#e5c07b]/10 border-b border-[#e5c07b]/30",children:[c.jsx(O,{size:12,className:"mt-0.5 flex-shrink-0 text-[#e5c07b]"}),c.jsx("p",{className:"text-[11px] text-[#e5c07b] leading-snug",children:m.blockersIgnoredBanner})]}),c.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-[#2e2e2e] text-[11px]",children:[P>0&&c.jsxs("span",{className:"flex items-center gap-1 text-[#ff6b6b]",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#ff6b6b]"}),P," ",m.blockers]}),_>0&&c.jsxs("span",{className:"flex items-center gap-1 text-[#e5c07b]",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#e5c07b]"}),_," ",m.warnings]}),C>0&&c.jsxs("span",{className:"flex items-center gap-1 text-[#61afef]",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#61afef]"}),C," ",m.tips]})]}),c.jsx("div",{className:"max-h-[360px] overflow-y-auto",children:Q.issues.map(e=>c.jsx(un,{issue:e,expanded:y===e.id,onToggle:()=>w(y===e.id?null:e.id),fixLabel:m.fixLabel,samplesLabel:m.samplesLabel},e.id))}),c.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-t border-[#2e2e2e] bg-[#161618]",children:[c.jsxs("button",{onClick:async function(){const e=function(e,t,r={}){const n="framer"===t.tool,s=pr(t.tool),i=[];i.push(`Utilise la skill /convertex (cible ${s}) pour corriger les problèmes détectés par le pre-flight Convertex.`),i.push(""),r.projectName||r.pageName?(i.push("Lis la page directement dans Convertex via le MCP (get_page) â ne me redemande pas le code :"),r.projectName&&i.push(`- Projet : ${r.projectName}`),r.pageName&&i.push(`- Page : ${r.pageName}`),i.push("")):(i.push("Ouvre la page concernée dans Convertex via le MCP (list_projects â list_pages â get_page) pour lire le code. Ne me redemande pas le code."),i.push("")),i.push("Corrige UNIQUEMENT les zones ci-dessous, ne réécris pas le reste de la page :"),i.push("");const o=[{label:"BLOCKERS (contenu cassé / invisible)",severity:"blocker"},{label:"WARNINGS (features perdues)",severity:"warning"},{label:"à VÃRIFIER",severity:"info"}];for(const a of o){const t=e.issues.filter(e=>e.severity===a.severity);if(0!==t.length){i.push(`## ${a.label}`);for(const e of t)i.push(`- ${e.title} (${e.count} occurrence(s))`),e.samples.length>0&&i.push(` Zones concernées : ${e.samples.slice(0,5).join(", ")}`),i.push(` Fix : ${e.fixHint}`);i.push("")}}return i.push("Consignes :"),i.push("- Corrige seulement les zones listées, garde le rendu visuel identique."),n?i.push("- Framer : pas de JS. Remplace les reveals JS par des animations data-framer-*, et respecte les règles Framer du skill."):i.push("- Webflow : sélecteurs plats, pas de <style> inline, animations via Webflow Interactions / combo-classes."),i.push("- Repousse le résultat dans la page via le MCP (patch_page / update_page). Ne recolle pas le code complet dans la conversation."),i.join("\n")}(Q,{tool:n},{projectName:i,pageName:a});try{await navigator.clipboard.writeText(e),v(!0),setTimeout(()=>v(!1),2e3)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),v(!0),setTimeout(()=>v(!1),2e3)}finally{document.body.removeChild(t)}}},className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[11px] font-semibold transition-colors cursor-pointer "+(b?"bg-[#98c379]/15 text-[#98c379]":"bg-[#D77655] hover:bg-[#c4684a] text-white"),children:[b?c.jsx(f,{size:12}):c.jsx($,{size:12}),b?m.copied:m.copyFixPrompt]}),P>0&&!d&&h&&c.jsx("button",{onClick:()=>{h(),x(!1)},className:"flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[11px] font-medium bg-transparent border border-[#2e2e2e] text-[#aaa] hover:text-[#ededed] hover:border-[#3a3a3a] transition-colors cursor-pointer",title:m.ignoreAndConvert,children:m.ignoreAndConvert})]})]})]})}function un({issue:e,expanded:t,onToggle:r,fixLabel:n,samplesLabel:s}){const i=cn[e.severity];return c.jsxs("div",{className:"border-b border-[#232326] last:border-b-0",children:[c.jsxs("button",{type:"button",onClick:r,className:"w-full flex items-start gap-2.5 px-4 py-3 hover:bg-white/[0.02] text-left transition-colors cursor-pointer",children:[c.jsx("div",{className:`mt-0.5 flex-shrink-0 ${i.text}`,children:c.jsx(dn,{severity:e.severity,size:12})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[12px] font-medium text-[#ededed] leading-snug",children:e.title}),c.jsxs("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${i.bg} ${i.text} flex-shrink-0`,children:["Ã",e.count]})]}),!t&&c.jsx("p",{className:"text-[11px] text-[#707070] mt-1 line-clamp-2",children:e.description})]}),c.jsx(re,{size:12,className:"mt-1 flex-shrink-0 text-[#555] transition-transform "+(t?"rotate-90":"")})]}),t&&c.jsxs("div",{className:"px-4 pb-3 pt-0 space-y-2",children:[c.jsx("p",{className:"text-[11px] text-[#aaa] leading-relaxed",children:e.description}),e.samples.length>0&&c.jsxs("div",{children:[c.jsx("div",{className:"text-[10px] text-[#555] uppercase tracking-wider mb-1",children:s}),c.jsx("div",{className:"flex flex-wrap gap-1",children:e.samples.map(e=>c.jsx("code",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[#0f0f10] border border-[#2a2a2d] text-[#c0c0c0]",children:e},e))})]}),c.jsxs("div",{className:`rounded-md border p-2 ${i.border} ${i.bg}`,children:[c.jsx("div",{className:`text-[10px] uppercase tracking-wider mb-0.5 ${i.text}`,children:n}),c.jsx("div",{className:"text-[11px] text-[#ddd] leading-relaxed",children:e.fixHint})]})]})]})}function pn(e,t){return null==e?null:"string"==typeof e?e:e[t]??e.en??Object.values(e)[0]??null}const fn="cvx_onboarding_done";function mn(){const{t:e}=o(),t=[{target:"",title:e.converter.onboarding.welcomeTitle,description:e.converter.onboarding.welcomeDesc,noVideo:!0},{target:"skills-claude",title:e.converter.onboarding.step1Title,de
7scription:e.converter.onboarding.step1Desc,position:"bottom",vimeoId:"1181256708"},{target:"editor-html",title:e.converter.onboarding.step2Title,description:e.converter.onboarding.step2Desc,position:"right",vimeoId:"1181258959"},{target:"editor-css-tab",title:e.converter.onboarding.step2bTitle,description:e.converter.onboarding.step2bDesc,position:"bottom",vimeoId:"1181258939"},{target:"convert-btn",title:e.converter.onboarding.step3Title,description:e.converter.onboarding.step3Desc,position:"bottom",vimeoId:"1181258985"},{target:"preview-panel",title:e.converter.onboarding.previewTitle,description:e.converter.onboarding.previewDesc,position:"left",vimeoId:"1181259019"},{target:"inspector-btn",title:e.converter.onboarding.inspectorTitle,description:e.converter.onboarding.inspectorDesc,position:"bottom",vimeoId:"1181259019"},{target:"workspace-bar",title:e.converter.onboarding.workspaceTitle,description:e.converter.onboarding.workspaceDesc,position:"bottom",vimeoId:"1181258908"}],[r,n]=l.useState(!1),[i,a]=l.useState(0),[d,h]=l.useState(null),u=l.useRef(null),[f,m]=l.useState(null),[g,O]=l.useState(0);l.useEffect(()=>{localStorage.getItem(fn)||s.auth.getUser().then(({data:e})=>{var t,r;(null==(r=null==(t=e.user)?void 0:t.user_metadata)?void 0:r.onboarding_done)?localStorage.setItem(fn,"1"):setTimeout(()=>n(!0),600)})},[]),l.useEffect(()=>{const e=()=>{a(0),n(!0)};return window.addEventListener("cvx:restart-onboarding",e),()=>window.removeEventListener("cvx:restart-onboarding",e)},[]);const x=l.useCallback(()=>{const e=t[i];if(!e||!e.target)return void h(null);const r=document.querySelector(`[data-tour="${e.target}"]`);h(r?r.getBoundingClientRect():null)},[i]);l.useEffect(()=>{if(r)return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}},[r,x]),l.useEffect(()=>{if(!r)return;const e=t[i];if(!e)return;if(!e.target)return void m(null);if(!d||!u.current)return;const n=u.current.getBoundingClientRect(),s=function(e,t,r,n){const s=12,i=window.innerWidth,o=window.innerHeight,a={bottom:{top:e.bottom+12,left:e.left+e.width/2-t/2},top:{top:e.top-r-12,left:e.left+e.width/2-t/2},right:{top:e.top+e.height/2-r/2,left:e.right+12},left:{top:e.top+e.height/2-r/2,left:e.left-t-12}},l=[n,"bottom","top","right","left"];for(const d of l){const e=a[d];if(e.top>=s&&e.top+r<=o-s&&e.left>=s&&e.left+t<=i-s)return e}const c=a[n];return{top:Math.max(s,Math.min(o-r-s,c.top)),left:Math.max(s,Math.min(i-t-s,c.left))}}(d,n.width,n.height,e.position??"bottom");m(s)},[r,i,d]);const b=l.useCallback(()=>{localStorage.setItem(fn,"1"),n(!1),s.auth.updateUser({data:{onboarding_done:!0}}).catch(()=>{})},[]),v=l.useCallback(()=>{i<t.length-1?(a(e=>e+1),O(e=>e+1)):b()},[i,b]),y=l.useCallback(()=>{i>0&&(a(e=>e-1),O(e=>e+1))},[i]);if(l.useEffect(()=>{if(r)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&b(),"ArrowRight"===e.key&&v(),"ArrowLeft"===e.key&&y()}},[r,b,v,y]),!r)return null;const w=t[i],S=!w.target,k=i===t.length-1;return c.jsxs("div",{className:"fixed inset-0 z-[90]",children:[S?c.jsx("div",{className:"absolute inset-0 bg-black/70 animate-fade-in"}):c.jsxs("svg",{className:"absolute inset-0 w-full h-full animate-fade-in",style:{pointerEvents:"none"},children:[c.jsx("defs",{children:c.jsxs("mask",{id:"tour-mask",children:[c.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),d&&c.jsx("rect",{x:d.left-6,y:d.top-6,width:d.width+12,height:d.height+12,rx:10,ry:10,fill:"black"})]})}),c.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"rgba(0,0,0,0.70)",mask:"url(#tour-mask)",style:{pointerEvents:"auto"}})]}),c.jsx("div",{className:"hidden",children:t.slice(i+1,i+3).map((e,t)=>e.vimeoId&&c.jsx("iframe",{src:`https://player.vimeo.com/video/${e.vimeoId}?background=1&dnt=1&autopause=0&quality=540p`,title:"preload"},e.vimeoId+t))}),!S&&d&&c.jsx("div",{className:"absolute border-2 border-[#146EF5] rounded-[10px] pointer-events-none",style:{left:d.left-6,top:d.top-6,width:d.width+12,height:d.height+12,boxShadow:"0 0 0 4px rgba(20,110,245,0.15), 0 0 20px rgba(20,110,245,0.1)",transition:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"}}),S?c.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",style:{pointerEvents:"auto"},children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-md animate-modal-in",children:[c.jsxs("div",{className:"flex items-center justify-between px-5 pt-5 pb-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#146EF5]/15 flex items-center justify-center",children:c.jsx(M,{size:16,className:"text-[#146EF5]"})}),c.jsx("h2",{className:"text-base font-semibold text-[#ededed]",children:w.title})]}),c.jsx("button",{onClick:b,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:c.jsx(p,{size:16})})]}),!w.noVideo&&c.jsx("div",{className:"px-5 pt-4",children:w.vimeoId?c.jsx("div",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] overflow-hidden",children:c.jsx("iframe",{src:`https://player.vimeo.com/video/${w.vimeoId}?background=1&dnt=1&autopause=0&quality=540p`,title:w.title,allow:"autoplay",className:"w-full h-full border-0"})}):w.video?c.jsx("video",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] object-cover",src:w.video,autoPlay:!0,muted:!0,loop:!0,playsInl
7ine:!0},w.video):c.jsx("div",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-2 text-[#555]",children:[c.jsx("div",{className:"w-12 h-12 rounded-full bg-[#146EF5]/15 flex items-center justify-center",children:c.jsx(G,{size:20,className:"text-[#146EF5] ml-0.5"})}),c.jsx("span",{className:"text-xs",children:e.converter.onboarding.videoComing})]})})}),c.jsx("div",{className:"px-5 pt-3 pb-2",children:c.jsx("p",{className:"text-xs text-[#999] leading-relaxed",children:w.description})}),c.jsxs("div",{className:"flex items-center justify-between px-5 py-4",children:[c.jsx("button",{onClick:b,className:"text-xs text-[#707070] hover:text-[#999] transition-colors cursor-pointer",children:e.converter.onboarding.skipGuide}),c.jsxs("button",{onClick:v,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#146EF5] text-white text-xs font-semibold hover:bg-[#2b7ff9] transition-colors cursor-pointer",children:[e.converter.onboarding.letsGo,c.jsx(re,{size:14})]})]})]},g)}):c.jsxs("div",{ref:u,className:"absolute animate-modal-in",style:{to
7p:(null==f?void 0:f.top)??-9999,left:(null==f?void 0:f.left)??-9999,width:360,pointerEvents:"auto",opacity:f?1:0},children:[c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl overflow-hidden",children:[c.jsxs("div",{className:"px-4 pt-4 pb-2",children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsx("h3",{className:"text-sm font-semibold text-[#ededed] mb-1.5",children:w.title}),c.jsx("button",{onClick:b,className:"p-0.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer flex-shrink-0 -mt-0.5",children:c.jsx(p,{size:14})})]}),c.jsx("p",{className:"text-xs text-[#999] leading-relaxed",children:w.description})]}),!w.noVideo&&c.jsx("div",{className:"px-4 pb-2",children:w.vimeoId?c.jsx("div",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] overflow-hidden",children:c.jsx("iframe",{src:`https://player.vimeo.com/video/${w.vimeoId}?background=1&dnt=1&autopause=0&quality=540p`,title:w.title,allow:"autoplay",className:"w-full h-full border-0"})}):w.video?c.jsx("video",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] object-cover",src:w.video,autoPlay:!0,muted:!0,loop:!0,playsInline:!0},w.video):c.jsx("div",{className:"w-full aspect-video rounded-lg bg-[#0e0e0e] border border-[#2e2e2e] flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-[#555]",children:[c.jsx("div",{className:"w-9 h-9 rounded-full bg-[#146EF5]/15 flex items-center justify-center",children:c.jsx(G,{size:16,className:"text-[#146EF5] ml-0.5"})}),c.jsx("span",{className:"text-[10px]",children:e.converter.onboarding.videoComing})]})})}),c.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[c.jsx("div",{className:"flex items-center gap-1",children:i>0&&c.jsxs("button",{onClick:y,className:"flex items-center gap-0.5 text-xs text-[#707070] hover:text-[#999] transition-colors cursor-pointer pr-1",children:[c.jsx(te,{size:14}),e.converter.onboarding.back]})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex items-center gap-1",children:t.map((e,t)=>c.jsx("div",{className:"w-1.5 h-1.5 rounded-full transition-colors "+(t===i?"bg-[#146EF5]":t<i?"bg-[#146EF5]/40":"bg-[#2e2e2e]")},t))}),c.jsxs("button",{onClick:v,className:"flex items-center gap-1 px-3 py-1.5 rounded-lg bg-[#146EF5] text-white text-xs font-semibold hover:bg-[#2b7ff9] transition-colors cursor-pointer",children:[k?e.converter.onboarding.finish:e.converter.onboarding.next,c.jsx(re,{size:14})]})]})]})]}),c.jsx("div",{className:"flex justify-end mt-2 pr-1",children:c.jsx("button",{onClick:b,className:"text-[11px] text-[#555] hover:text-[#888] transition-colors cursor-pointer",children:"Passer le guide"})})]},g)]})}const gn=[{min:0,label:"rankNewbie",emoji:"ð¥",color:"#666",next:10},{min:10,label:"rankBuilder",emoji:"ð£",color:"#4A9EF5",next:50},{min:50,label:"rankConverter",emoji:"ð¥",color:"#E8863C",next:100},{min:100,label:"rankPowerUser",emoji:"ð",color:"#A855F7",next:500},{min:500,label:"rankLegend",emoji:"â¡",color:"#E8C872",next:null}];function On(e){const t=t=>{t.preventDefault(),e(t)},r=document.createElement("textarea");r.style.position="fixed",r.style.left="-9999px",r.style.opacity="0",r.value=" ",document.body.appendChild(r),r.select(),document.addEventListener("copy",t);let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return document.removeEventListener("copy",t),document.body.removeChild(r),n}function xn({notifications:e,t:t,onMarkRead:r,onMarkAllRead:n,onClose:s,containerRef:i}){const o=t.converter.toolbar;l.useEffect(()=>{function e(e){i.current&&!i.current.contains(e.target)&&s()}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s,i]);const a=e.some(e=>!e.read);return c.jsxs("div",{className:"absolute right-0 top-full mt-2 w-80 bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl z-50 animate-modal-in overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#2e2e2e]",children:[c.jsx("span",{className:"text-sm font-semibold text-[#ededed]",children:o.notificationsTitle}
7),a&&c.jsx("button",{onClick:n,className:"text-[10px] text-[#2b7ff9] hover:text-[#5a9dff] transition-colors cursor-pointer",children:o.notificationsMarkAllRead})]}),c.jsx("div",{className:"max-h-80 overflow-y-auto",children:0===e.length?c.jsxs("div",{className:"flex flex-col items-center justify-center py-10 px-4",children:[c.jsx(Y,{size:28,className:"text-[#333] mb-3"}),c.jsx("p",{className:"text-sm text-[#888] font-medium",children:o.notificationsEmpty}),c.jsx("p",{className:"text-xs text-[#555] mt-1",children:o.notificationsEmptyDesc})]}):e.map(e=>c.jsx("button",{onClick:()=>{e.read||r(e.id),e.link&&window.open(e.link,"_blank","noopener")},className:"w-full text-left px-4 py-3 border-b border-[#2e2e2e]/50 hover:bg-white/[0.03] transition-colors cursor-pointer "+(e.read?"":"bg-[#ef4444]/[0.04]"),children:c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-1.5 h-1.5 rounded-full shrink-0 "+(e.read?"bg-[#444]":"bg-[#ef4444]")}),c.jsx("p",{className:"text-xs leading-snug "+(e.read?"text-[#888]":"text-[#ededed] font-medium"),children:e.title})]}),e.body&&c.jsx("p",{className:"text-[11px] text-[#999] leading-relaxed mt-1 line-clamp-2",children:e.body}),c.jsx("p",{className:"text-[10px] text-[#555] mt-1.5",children:bn(e.created_at)})]})},e.id))})]})}function bn(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const n=Math.floor(r/60);if(n<24)return`${n}h`;const s=Math.floor(n/24);return s<30?`${s}d`:new Date(e).toLocaleDateString()}function vn({t:e,onClose:t}){const{closing:r,close:n}=xr(t),s=e.converter.toolbar;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] "+(r?"animate-fade-out":"animate-fade-in"),onClick:n}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:n,children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm "+(r?"animate-modal-out":"animate-modal-in"),onClick:e=>e.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-[#2e2e2e]",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 48 48",className:"flex-shrink-0",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"ext-chrome-a",x1:"3.22",y1:"15",x2:"44.78",y2:"15",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#d93025"}),c.jsx("stop",{offset:"1",stopColor:"#ea4335"})]}),c.jsxs("linearGradient",{id:"ext-chrome-b",x1:"20.72",y1:"47.68",x2:"41.5",y2:"11.68",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#fcc934"}),c.jsx("stop",{offset:"1",stopColor:"#fbbc04"})]}),c.jsxs("linearGradient",{id:"ext-chrome-c",x1:"26.6",y1:"46.5",x2:"5.82",y2:"10.51",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#1e8e3e"}),c.jsx("stop",{offset:"1",stopColor:"#34a853"})]})]}),c.jsx("circle",{cx:"24",cy:"24",r:"12",fill:"#fff"}),c.jsx("path",{d:"M24,12H44.78a24,24,0,0,0-41.56.003L13.61,30l.01-.002A11.99,11.99,0,0,1,24,12Z",fill:"url(#ext-chrome-a)"}),c.jsx("circle",{cx:"24",cy:"24",r:"9.5",fill:"#1a73e8"}),c.jsx("path",{d:"M34.39,30L24,48A24,24,0,0,0,44.78,12H24l-.003.01A11.99,11.99,0,0,1,34.39,30Z",fill:"url(#ext-chrome-b)"}),c.jsx("path",{d:"M13.61,30L3.22,12.01A24,24,0,0,0,24,48L34.39,30l-.007-.007a11.99,11.99,0,0,1-20.78.007Z",fill:"url(#ext-chrome-c)"})]}),c.jsxs("h3",{className:"text-sm text-[#ededed]",children:[c.jsx("span",{className:"font-semibold",children:"Convertex Extension"})," ",c.jsx("span",{className:"text-[#666] font-normal",children:"·"})," ",c.jsx("span",{className:"text-[#888] font-normal",children:s.extensionAvailable})]})]}),c.jsx("button",{onClick:n,className:"text-[#666] hover:text-[#ededed] transition-colors cursor-pointer",children:c.jsx(p,{size:16})})]}),c.jsxs("div",{className:"px-5 py-5 space-y-5",children:[c.jsx("p",{className:"text-xs text-[#888] leading-relaxed",children:s.extensionDesc}),c.jsxs("a",{href:"https://chromewebstore.google.com/detail/convertex-capture/gfekljcojlcdiipbajpjpdhbnlopcpaa",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full py-2.5 rounded-lg text-xs font-medium bg-[#2b7ff9] hover:bg-[#1161d4] text-white transition-all cursor-pointer",children:[s.extensionInstall,c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M4.5 11.5L11.5 4.5M11.5 4.5H5.5M11.5 4.5V10.5"})})]})]})]})})]})}function yn(){const{t:e,locale:t}=o(),{profile:r,user:n,refreshProfile:i}=a(),[d,u]=l.useState(!1),[p,m]=l.useState(null),{html:O,css:x,js:b,conversionsThisMonth:v,usageLoaded:y,setConversionsThisMonth:w,referenceFiles:k,countNewGeneratedClasses:j,setStylesPanelOpen:Q,history:P,setHistoryPanelOpen:_,syncDetectedScripts:T,conversionState:N,conversionResult:E,conversionError:A,setConversionState:z,setConversionResult:Z,setConversionError:R,resetConversion:X,getMergedReferenceStyles:q,addHistoryEntry:B,autoSaveStyles:G,lastConversionId:U,projects:H,activeProjectId:J,setActiveProject:te,createProject:re,renameProject:ie,deleteProject:ae,reorderProjects:ce,getActiveProject:de,pages:ge,activePageId:Oe,targetTool:xe,components:ve}=He(),ye=!1,Se=({tool:e,size:t=12})=>"framer"===e?c.jsxs("svg",{width:t,height:t,viewBox:"0 0 1080 1080",fill:"none",className:"flex-shrink-0 rounded-full",children:[c.jsx("rect",{width:"1080",height:"1080",rx:"540",fill:"#0099FF"}),c.jsx("path",{d:"M 340 270 L 740 270 L 740 470 L 540 470 Z M 340 470 L 540 470 L 740 670 L 340 670 Z M 340 670 L 540 670 L 540 870 Z",fill:"white"})]}):c.jsxs("svg",{width:t,height:t,viewBox:"0 0 1080 1080",fill:"none",className:"flex-shrink-0 rounded-full",children:[c.jsx("rect",{width:"1080",height:"1080",rx:"540",fill:"#146EF5"}),c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M902.062 348.75L687.217 768.75H485.417L575.329 594.684H571.295C497.118 690.976 386.444 754.365 228.75 768.75V597.093C228.75 597.093 329.63 591.134 388.935 528.784H228.75V348.753H408.781V496.826L412.822 496.809L486.389 348.753H622.541V495.887L626.582 495.881L702.909 348.75H902.062Z",fill:"white"})]}),[ke,Pe]=l.useState(!1),[$e,_e]=l.useState(!1),[Ce,Te]=l.useState(!1),[Ne,Ee]=l.useState(),[Ae,ze]=l.useState(!1),[Re,Xe]=l.useState(0),[Me,De]=l.useState(!1),Le=l.useRef(null),[Ye,Ie]=l.useState(!1),[qe,Ve]=l.useState(!1),[We,Be]=l.useState(!1),[Fe,Ge]=l.useState(!1),[Ue,Ke]=l.useState(""),[Je,et]=l.useState("webflow"),[tt,rt]=l.useState(""),[nt,st]=l.useState(""),[it,ot]=l.useState(!1),[at,lt]=l.useState(""),[ct,dt]=l.useState(!1),[ht,ut]=l.useState(null),[pt,ft]=l.useState(""),[mt,gt]=l.useState(null),[Ot,xt]=l.useState(null),[bt,vt]=l.useState(null),[yt,wt]=l.useState(""),St=l.useRef(null),kt=l.useRef(null),jt=l.useRef(null),Qt=l.useRef(null),[Pt,$t]=l.useState(!1),[_t,Ct]=l.useState(!1),Tt=l.useRef(null),[Nt,Et]=l.useState(null),[At,zt]=l.useState(!1),[Zt,Rt]=l.useState(!1),Xt=l.useRef(null),[Mt,Dt]=l.useState(!1),Lt=l.useRef(null),{notifications:Yt,unreadCount:It,markAsRead:qt,markAllAsRead:Vt}=function(){const{profile:e}=a(),{locale:t}=o(),[r,n]=l.useState([]),[i,c]=l.useState(!0),d=l.useCallback(async()=>
7{if(!e)return;const{data:t,error:r}=await s.rpc("get_notifications",{user_plan:e.plan});!r&&t&&n(t),c(!1)},[e]);l.useEffect(()=>{d()},[d]),l.useEffect(()=>{if(!e)return;const t=s.channel("notifications-realtime").on("postgres_changes",{event:"*",schema:"public",table:"notifications"},()=>{d()}).subscribe();return()=>{s.removeChannel(t)}},[e,d]);const h=r.map(e=>({id:e.id,type:e.type,title:pn(e.title,t)??"",body:pn(e.body,t),link:e.link,created_at:e.created_at,read:e.read})),u=h.filter(e=>!e.read).length;return{notifications:h,unreadCount:u,loading:i,markAsRead:l.useCallback(async t=>{e&&(n(e=>e.map(e=>e.id===t?{...e,read:!0}:e)),await s.from("notification_reads").upsert({notification_id:t,user_id:e.id}))},[e]),markAllAsRead:l.useCallback(async()=>{if(!e)return;const t=r.filter(e=>!e.read);0!==t.length&&(n(e=>e.map(e=>({...e,read:!0}))),await s.from("notification_reads").upsert(t.map(t=>({notification_id:t.id,user_id:e.id}))))},[e,r])}}(),[Wt,Bt]=l.useState(()=>{var e;return!!(null==(e=null==n?void 0:n.user_metadata)?void 0:e.skills_installed)}),[Ft,Gt]=l.useState(!1),Ut=l.useRef(null),[Ht,Kt]=h();l.useEffect(()=>{const e=Ht.get("upgrade");e&&["starter","pro"].includes(e)&&(Te(!0),Ee(void 0),Ht.delete("upgrade"),Kt(Ht,{replace:!0}))},[]);const Jt=l.useCallback(()=>{qe&&!We&&(Be(!0),Ut.current=setTimeout(()=>{Ve(!1),Be(!1),ut(null)},100))},[qe,We]);const er=(null==r?void 0:r.plan)??"free",tr="pro"===er||"team"===er||"beta"===er,rr="starter"===er?100:10,nr=tr?1/0:Math.max(0,rr-v),sr=!tr&&v>=rr,ur=tr?null:function(e,t,r,n=new Date){if(!e)return null;let s=gr(e,n);const i=t?new Date(t):null;if(i&&!Number.isNaN(i.getTime()))for(let a=0;a<3&&Or(s)<=Or(i);a++)s=gr(e,s);const o="fr"===r?"fr-FR":"en-US";return{daysLeft:Math.max(1,Math.ceil((s.getTime()-n.getTime())/864e5)),dateLabel:"fr"===r&&1===s.getDate()?`1er ${s.toLocaleDateString("fr-FR",{month:"long"})} ${s.getFullYear()}`:s.toLocaleDateString(o,{day:"numeric",month:"long",year:"numeric"})}}(null==r?void 0:r.quota_anchor_day,null==r?void 0:r.conversions_reset_at,t),pr="free"===er||"starter"===er,fr=!O.trim(),xr=l.useMemo(()=>mr({html:O,css:x,js:b,tool:xe}),[O,x,b,xe]),br=xr.counts.blocker,vr=l.useMemo(()=>xr.issues.filter(e=>"blocker"===e.severity).map(e=>e.id).sort().join("|"),[xr]),[yr,wr]=l.useState(null),Sr=br>0&&null!==yr&&yr===vr,kr=br>0&&!Sr,jr=fr||sr||kr,Qr=de(),Pr=ge.find(e=>e.id===Oe),[$r,_r]=l.useState([]),[Cr,Nr]=l.useState("closed"),[Er,Ar]=l.useState(""),zr=l.useCallback(async()=>{try{const e=await async function(){const e=await ar(),t=await fetch("/api/framer/list-projects",{method:"GET",headers:e});return(await lr(t)).projects}();_r(e)}catch{_r([])}},[]);l.useEffect(()=>{"framer"===xe&&zr()},[xe,zr]);const Zr=l.useMemo(()=>(null==Qr?void 0:Qr.framerProjectId)?$r.find(e=>e.id===Qr.framerProjectId)??null:null,[Qr,$r]);const Rr=l.useRef(null),[Xr,Mr]=l.useState("idle");l.useEffect(()=>{or().then(e=>w(e.count)).catch(()=>{})},[w]),l.useEffect(()=>{s.auth.getUser().then(({data:{user:e}})=>{e&&s.from("profiles").select("total_conversions_all_time").eq("id",e.id).single().then(({data:e})=>{null!=(null==e?void 0:e.total_conversions_all_time)&&Xe(e.total_conversions_all_time)})})},[]),l.useEffect(()=>{const e=setTimeout(()=>T(),500);return()=>clearTimeout(e)},[O,x,b]),l.useEffect(()=>{ke||s.auth.getUser().then(({data:e})=>{var t,r;(null==(r=null==(t=e.user)?void 0:t.user_metadata)?void 0:r.skills_installed)&&Bt(!0)})},[ke]),l.useEffect(()=>{var e;(null==(e=null==n?void 0:n.user_metadata)?void 0:e.skills_installed)&&Bt(!0)},[n]),l.useEffect(()=>()=>{Qt.current&&clearTimeout(Qt.current),Tt.current&&clearTimeout(Tt.current),Ut.current&&clearTimeout(Ut.current)},[]),l.useEffect(()=>{if(!Nt)return;const e=window.setTimeout(()=>Et(null),7e3);return()=>window.clearTimeout(e)},[Nt]),l.useEffect(()=>{Fe&&kt.current&&kt.current.focus()},[Fe]),l.useEffect(()=>{ht&&jt.current&&(jt.current.focus(),jt.current.select())},[ht]);const Lr=l.useCallback(()=>{const e=He.getState(),t=e.getActiveProject(),r=(null==t?void 0:t.framerProjectId)??null,n=Object.entries(e.components).filter(([,e])=>"string"==typeof e&&e.trim().length>0).map(([e,t])=>
7({slot_id:e,display_name:e,tsx:t}));if("framer"===e.targetTool&&r&&n.length>0){Mr("preparing");const e=async function(e){const t=await ar();return lr(await fetch("/api/framer/prepare-clipboard",{method:"POST",headers:t,body:JSON.stringify(e)}))}({framerProjectId:r,components:n});Rr.current=e,e.then(()=>{Rr.current===e&&Mr("ready")},()=>{Rr.current===e&&(Rr.current=null,Mr("error"))})}else Rr.current=null,Mr("idle")},[]),Ir=l.useCallback(async()=>{var t;if(!jr&&"converting"!==N)if(Wt||(null==(t=null==n?void 0:n.user_metadata)?void 0:t.skills_prompt_seen)){z("converting");try{const e=q(),t=He.getState(),r=t.getActiveProject(),n=(null==r?void 0:r.isDemo)??!1,s=await ir({html:O,css:x,referenceStyles:e,projectId:J??void 0,pageId:t.activePageId??void 0,js:b||void 0,targetTool:xe,...n?{isDemo:!0,demoPageId:t.activePageId??void 0}:{}});if(Z(s.json,s.conversionId),$t(!1),!n){const e=function(e){var t;try{const r=null==(t=null==e?void 0:e.payload)?void 0:t.styles;return Array.isArray(r)?r.length:0}catch{return 0}}(s.json);B(e,s.json,O,x,s.conversionId,b),G(s.json)}null!=s.conversionsThisMonth&&w(s.conversionsThisMonth),Xe(e=>e+1),Lr()}catch(r){const t=r instanceof Error?r.message:e.converter.toolbar.conversionError;R(t),Qt.current=setTimeout(()=>X(),5e3),or().then(e=>w(e.count)).catch(()=>{})}}else Gt(!0)},[jr,N,O,x,b,J,Wt,xe,Lr,z,q,Z,B,G,w,R,X]);async function qr(){if(!E)return;let t=E;const r=(null==Qr?void 0:Qr.framerProjectId)??null;if("framer"===xe&&r){if(Object.entries(ve).filter(([,e])=>"string"==typeof e&&e.trim().length>0).map(([e,t])=>({slot_id:e,display_name:e,tsx:t})).length>0){if("ready"!==Xr||!Rr.current)return void Lr();try{const e=await Rr.current;t=function(e,t,r){const n=JSON.parse(JSON.stringify(e));n.sourceProjectId=r,n.layers&&"object"==typeof n.layers||(n.layers={});const s=n.layers;s.sourceProjectId=r;const i=s.moduleData??{};for(const o of Object.values(t))o.moduleData&&(i[o.codeComponentIdentifier]=o.moduleData);return s.moduleData=i,function e(r){if(Array.isArray(r)){for(const t of r)e(t);return}if(!r||"object"!=typeof r)return;const n=r,s="string"==typeof n.componentSlotId?n.componentSlotId:null,i=s?t[s]:null;if(s&&i){const e=n.id??null,t={__class:"CodeComponentNode",id:dr(),parentid:e,codeComponentIdentifier:i.codeComponentIdentifier,codeComponentPackageVersion:null,slotsAreChildNodes:!1,widthType:"number"==typeof n.widthType?n.widthType:3,heightType:"number"==typeof n.heightType?n.heightType:2,width:"number"==typeof n.width?n.width:200,height:"number"==typeof n.height?n.height:56};return n.children=[t],delete n.componentSlotId,void("dashed"===n.borderStyle&&"rgba(127,127,127,0.55)"===n.borderColor&&(delete n.borderEnabled,delete n.borderStyle,delete n.borderColor,delete n.borderWidth,delete n.borderTop,delete n.borderRight,delete n.borderBottom,delete n.borderLeft,delete n.borderPerSide))}for(const t of Object.values(n))e(t)}(n),function e(t){if(Array.isArray(t)){for(const r of t)e(r);return}if(!t||"object"!=typeof t)return;const r=t;"componentSlotId"in r&&delete r.componentSlotId;for(const n of Object.values(r))e(n)}(n),n}(E,e.slots,e.framerProjectIdShort)}catch(d){const e=d instanceof Error?d.message:"Upload Framer impossible.";return Et(e),void Mr("error")}}}const n=JSON.stringify(t),i=await async function(e,t){if("framer"===t){const t=`<span data-framer-pasteboard="${e.replace(/&/g,"&").replace(/"/g,""")}" data-framer-pasteboard-type="application/x-framer-layers"></span>`;return On(e=>{var r,n;null==(r=e.clipboardData)||r.setData("text/html",t),null==(n=e.clipboardData)||n.setData("text/plain","")})}if(navigator.clipboard&&"undefined"!=typeof ClipboardItem)try{return await navigator.clipboard.write([new ClipboardItem({"application/json":new Blob([e],{type:"application/json"}),"text/plain":new Blob([" "],{type:"text/plain"})})]),!0}catch{}return On(t=>{var r,n;null==(r=t.clipboardData)||r.setData("application/json",e),null==(n=t.clipboardData)||n.setData("text/plain"," ")})}(n,xe);if(!i)return Et(e.converter.toolbar.copyFailed),void async function(e,t){try{let r={};try{const{data:{session:e}}=await s.auth.getSession();e&&(r={Authorization:`Bearer ${e.access_token}`})}catch{}await fetch("/api/report-crash",{method:"POST",headers:{"Content-Type":"application/json",...r},body:JSON.stringify({message:`Clipboard copy failed for ${t}`,url:window.location.href,user_agent:navigator.userAgent,user_message:`tool=${t}; jsonSize=${e}; clipboardApi=${!!navigator.clipboard};
7 clipboardItem=${"undefined"!=typeof ClipboardItem}`})})}catch{}}(n.length,xe);z("copied"),Tt.current=setTimeout(()=>z("success"),2e3),Xt.current&&clearTimeout(Xt.current);const o=parseInt(localStorage.getItem("cvx_copy_count")||"0",10)+1;localStorage.setItem("cvx_copy_count",String(o));const a=JSON.parse(localStorage.getItem("cvx_rated_ids")||"[]"),l=!!U&&a.includes(U),c=(null==Qr?void 0:Qr.isDemo)??!1;l||c||("free"===er?Xt.current=setTimeout(()=>Rt(!0),7e3):o>1&&o%3==0&&(Xt.current=setTimeout(()=>zt(!0),5e3)))}function Vr(e){if(!e)return;const t=JSON.parse(localStorage.getItem("cvx_rated_ids")||"[]");t.includes(e)||(t.push(e),localStorage.setItem("cvx_rated_ids",JSON.stringify(t.slice(-50))))}const Wr=l.useRef(()=>{});Wr.current=()=>{if("success"===N){if("preparing"===Xr)return;if("error"===Xr)return void Lr();qr()}else"idle"!==N&&"error"!==N||Ir()},l.useEffect(()=>{function e(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),Wr.current())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),l.useEffect(()=>{"success"!==N&&"copied"!==N&&(Rr.current=null,"idle"!==Xr&&Mr("idle"))},[N,Xr]),l.useEffect(()=>{"success"===N&&"idle"===Xr&&"framer"===xe&&(null==Qr?void 0:Qr.framerProjectId)&&Object.values(ve).some(e=>"string"==typeof e&&e.trim().length>0)&&Lr()},[N,Xr,xe,null==Qr?void 0:Qr.framerProjectId,ve,Lr]),l.useEffect(()=>{function e(e){St.current&&!St.current.contains(e.target)&&Jt()}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[Jt]);const Br="free"===er?3:"starter"===er?10:1/0,Fr=H.filter(e=>!e.isDemo).length<Br;async function Gr(){const t=Ue.trim().slice(0,30);if(t){if(!Fr)return Ee("projects"),Te(!0),void Ge(!1);if(lt(""),"framer"===Je){const n=tt.trim(),s=nt.trim();if(!n||!s)return void lt(e.converter.connectFramer.credsRequired);dt(!0);try{const e=await cr({label:t,projectUrl:n,apiKey:s});_r(t=>[e,...t.filter(t=>t.id!==e.id)]),await re(t,"framer",e.id)}catch(r){return lt(r instanceof Error?r.message:e.converter.connectFramer.framerConnectError),void dt(!1)}return dt(!1),Ke(""),rt(""),st(""),void Ge(!1)}await re(t,Je),Ke(""),Ge(!1)}}function Ur(){const e=pt.trim().slice(0,30);e&&ht&&(ie(ht,e),ut(null))}const Hr={idle:jr?"bg-[#146EF5]/20 text-[#2b7ff9]/40 cursor-not-allowed":"bg-[#146EF5] text-white hover:bg-[#2b7ff9] shadow-[0_0_12px_rgba(20,110,245,0.25)]",converting:"bg-[#146EF5]/60 text-white/70 cursor-wait",success:"bg-[#98c379] text-[#171717] hover:bg-[#7daf5f] shadow-[0_0_12px_rgba(152,195,121,0.25)]",copied:"bg-[#98c379] text-[#171717]",error:"bg-[#e06c75] text-white hover:bg-[#c85a63]",preparing:"bg-[#e8863c]/80 text-[#171717] cursor-wait shadow-[0_0_12px_rgba(232,134,60,0.2)]",prepError:"bg-[#e06c75] text-white hover:bg-[#c85a63]"},Kr="success"===N&&"preparing"===Xr?"preparing":"success"===N&&"error"===Xr?"prepError":N;const Jr=(null==r?void 0:r.paused_until)?new Date(r.paused_until).toLocaleDateString("en"===t?"en-US":"fr-FR",{day:"numeric",month:"long",year:"numeric"}):null;return c.jsxs(c.Fragment,{children:[(null==r?void 0:r.paused_until)&&Jr&&c.jsxs("div",{className:"flex items-center justify-center gap-2 px-3 py-1 bg-[#2b7ff9]/15 border-b border-[#2b7ff9]/30 text-[#cce2ff] text-[11px] font-medium",children:[c.jsx(ne,{size:12,className:"flex-shrink-0 text-[#2b7ff9]"}),c.jsx("span",{children:e.converter.toolbar.pauseBannerActive.replace("{date}",Jr)}),c.jsxs("button",{onClick:async function(){if(!d){u(!0),m(null);try{await S(),await i()}catch(e){m(e instanceof Error?e.message:"Erreur")}finally{u(!1)}}},disabled:d,className:"px-2 py-0.5 rounded-full bg-[#2b7ff9] text-white text-[10px] font-semibold hover:bg-[#1161d4] transition-colors cursor-pointer whitespace-nowrap disabled:opacity-60 disabled:cursor-wait flex items-center gap-1",children:[d&&c.jsx(g,{size:9,className:"animate-spin"}),d?e.converter.toolbar.pauseBannerResuming:e.converter.toolbar.pauseBannerResume]}),p&&c.jsx("span",{className:"text-[10px] text-[#ff9494] max-w-[200px] truncate",title:p,children:p})]}),!Wt&&c.jsxs("div",{className:"flex items-center justify-center gap-3 px-4 py-2 bg-[#D77655] text-white text-xs font-medium",children:[c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),c.jsx("span",{children:e.converter.skillsBanner.message}),c.jsx("button",{onClick:()=>Pe(!0),className:"px-3 py-1 rounded-full bg-white text-[#D77655] text-[11px] font-semibold hover:bg-white/90 transition-colors cursor-pointer whitespace-nowrap",children:e.converter.skillsBanner.cta}),c.jsx("button",{onClick:()=>{s.auth.updateUser({data:{skills_installed:!0,skills_prompt_seen:!0}}),Bt(!0)},className:"text-[11px] text-white/60 hover:text-white underline underline-offset-2 transition-colors cursor-pointer whitespace-nowrap",children:e.converter.skillsBanner.alreadyInstalled})]}),c.jsxs("div",{className:"flex items-center justify-between h-12 min-h-12 px-4 bg-[#0e0e0e] border-b border-[#2e2e2e] select-none",children:[c.jsxs("div",{className:"flex items-center gap-6 min-w-0 overflow-hidden",children:[c.jsxs("a",{href:"https://convertex.ai/",target:"_blank",rel:"noopener noreferrer",className:"no-underline flex items-center",children:[c.jsx("img",{src:"/logo-convertex.png",alt:"Convertex",className:"w-6 h-6 rounded-md"}),c.jsx("span",{className:"font-bold text-lg text-white tracking-tight ml-2",children:"Convertex"})]}),c.jsx("div",{className:"w-px h-5 bg-[#2e2e2e]"}),c.jsxs("nav",{className:"flex items-center gap-5 overflow-hidden min-w-0",children:[c.jsx("a",{href:"https://convertex.ai/roadmap",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white transition-colors no-u
7nderline whitespace-nowrap",children:e.common.nav.roadmap}),c.jsx("a",{href:"https://university.convertex.ai",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white transition-colors no-underline whitespace-nowrap",children:e.common.nav.university}),c.jsx("a",{href:"https://convertex.ai/examples",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white transition-colors no-underline whitespace-nowrap",children:e.common.nav.useCases}),c.jsx("a",{href:"https://convertex.ai/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white transition-colors no-underline whitespace-nowrap",children:e.common.nav.pricing})]})]}),c.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[(()=>{const t=function(e){for(let t=gn.length-1;t>=0;t--)if(e>=gn[t].min)return gn[t];return gn[0]}(Re),r=t.next?(Re-t.min)/(t.next-t.min)*100:100,n=t.next?gn.find(e=>e.min===t.next):null;return c.jsxs("div",{ref:Le,className:"relative",onMouseEnter:()=>De(!0),onMouseLeave:()=>De(!1),children:[c.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded text-xs cursor-default transition-colors hover:bg-white/5",children:[c.jsx("span",{className:"text-sm leading-none",children:t.emoji}),c.jsx("span",{className:"font-semibold tabular-nums text-white",children:c.jsx(D,{value:Re})}),c.jsx("span",{className:"text-[#888] font-normal hidden xl:inline",children:"conv."})]}),Me&&c.jsxs("div",{className:"absolute top-full right-0 mt-2 w-56 bg-[#1f1f1f] border border-[#2e2e2e] rounded-lg shadow-2xl z-50 p-3 animate-dropdown-in",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"text-base",children:t.emoji}),c.jsx("span",{className:"text-[13px] font-bold text-white",children:e.converter.toolbar[t.label]})]}),c.jsx("p",{className:"text-[11px] text-[#aaa] mb-3",children:e.converter.toolbar.totalConversions.replace("{count}",String(Re))}),n?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-full h-1.5 bg-[#2a2a2a] rounded-full overflow-hidden mb-2",children:c.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${r}%`,background:"linear-gradient(90deg, #4F46E5, #9333EA, #C026D3)"}})}),c.jsx("p",{className:"text-[10px] text-[#666] mb-3",children:e.converter.toolbar.rankProgress.replace("{remaining}",String(t.next-Re)).replace("{rank}",`${n.emoji} ${e.converter.toolbar[n.label]}`)})]}):c.jsx("p",{className:"text-[10px] font-medium mb-3",style:{color:t.color},children:e.converter.toolbar.rankMaxed}),c.jsx("div",{className:"border-t border-[#2e2e2e] pt-2 flex flex-col gap-1",children:gn.map(r=>{const n=r.min===t.min,s=Re>=r.min;return c.jsxs("div",{className:"flex items-center gap-2 text-[10px] px-1.5 py-0.5 rounded "+(n?"bg-white/5":""),children:[c.jsx("span",{className:"text-xs "+(s?"":"grayscale opacity-40"),children:r.emoji}),c.jsx("span",{className:s?"text-[#ccc]":"text-[#555]",children:e.converter.toolbar[r.label]}),c.jsxs("span",{className:"ml-auto text-[9px] text-[#555] tabular-nums",children:[r.min,"+"]}),n&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full ml-0.5",style:{background:r.color}})]},r.label)})})]})]})})(),c.jsx("div",{className:"w-px h-4 bg-[#2e2e2e]"}),"beta"!==er&&c.jsx("button",{onClick:()=>ze(!0),className:"p-1.5 rounded text-[#666] hover:text-white hover:bg-white/5 transition-colors",title:e.converter.toolbar.vipAssistance,children:c.jsx(me,{size:16})}),c.jsx("a",{href:"https://discord.gg/ks2XjaZnyU",target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded text-[#666] hover:text-white hover:bg-white/5 transition-colors",title:e.converter.toolbar.help,children:c.jsx(be,{size:16})}),c.jsx("button",{onClick:()=>(localStorage.removeItem(fn),s.auth.updateUser({data:{onboarding_done:!1}}).catch(()=>{}),void window.dispatchEvent(new Event("cvx:restart-onboarding"))),className:"p-1.5 rounded text-[#666] hover:text-white hover:bg-white/5 transition-colors",title:e.converter.toolbar.reviewGuide,children:c.jsx(L,{size:16})}),c.jsxs("button",{"data-tour":"skills-claude",onClick:()=>Pe(!0),className:"flex items-center gap-1.5 px-2 py-1 rounded text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 509.64",className:"w-3.5 h-3.5 rounded-sm",children:[c.jsx("path",{fill:"#D77655",d:"M115.612 0h280.775C459.974 0 512 52.026 512 115.612v278.415c0 63.587-52.026 115.612-115.613 115.612H115.612C52.026 509.639 0 457.614 0 394.027V115.612C0 52.026 52.026 0 115.612 0z"}),c.jsx("path",{fill:"#FCF2EE",fillRule:"nonzero",d:"M142.27 316.619l73.655-41.326 1.238-3.589-1.238-1.996-3.589-.001-12.31-.759-42.084-1.138-36.498-1.516-35.361-1.896-8.897-1.895-8.34-10.995.859
7-5.484 7.482-5.03 10.717.935 23.683 1.617 35.537 2.452 25.782 1.517 38.193 3.968h6.064l.86-2.451-2.073-1.517-1.618-1.517-36.776-24.922-39.81-26.338-20.852-15.166-11.273-7.683-5.687-7.204-2.451-15.721 10.237-11.273 13.75.935 3.513.936 13.928 10.716 29.749 23.027 38.848 28.612 5.687 4.727 2.275-1.617.278-1.138-2.553-4.271-21.13-38.193-22.546-38.848-10.035-16.101-2.654-9.655c-.935-3.968-1.617-7.304-1.617-11.374l11.652-15.823 6.445-2.073 15.545 2.073 6.547 5.687 9.655 22.092 15.646 34.78 24.265 47.291 7.103 14.028 3.791 12.992 1.416 3.968 2.449-.001v-2.275l1.997-26.641 3.69-32.707 3.589-42.084 1.239-11.854 5.863-14.206 11.652-7.683 9.099 4.348 7.482 10.716-1.036 6.926-4.449 28.915-8.72 45.294-5.687 30.331h3.313l3.792-3.791 15.342-20.372 25.782-32.227 11.374-12.789 13.27-14.129 8.517-6.724 16.1-.001 11.854 17.617-5.307 18.199-16.581 21.029-13.75 17.819-19.716 26.54-12.309 21.231 1.138 1.694 2.932-.278 44.536-9.479 24.062-4.347 28.714-4.928 12.992 6.066 1.416 6.167-5.106 12.613-30.71 7.583-36.018 7.204-53.636 12.689-.657.48.758.935 24.164 2.275 10.337.556h25.301l47.114 3.514 12.309 8.139 7.381 9.959-1.238 7.583-18.957 9.655-25.579-6.066-59.702-14.205-20.474-5.106-2.83-.001v1.694l17.061 16.682 31.266 28.233 39.152 36.397 1.997 8.999-5.03 7.102-5.307-.758-34.401-25.883-13.27-11.651-30.053-25.302-1.996-.001v2.654l6.926 10.136 36.574 54.975 1.895 16.859-2.653 5.485-9.479 3.311-10.414-1.895-21.408-30.054-22.092-33.844-17.819-30.331-2.173 1.238-10.515 113.261-4.929 5.788-11.374 4.348-9.478-7.204-5.03-11.652 5.03-23.027 6.066-30.052 4.928-23.886 4.449-29.674 2.654-9.858-.177-.657-2.173.278-22.37 30.71-34.021 45.977-26.919 28.815-6.445 2.553-11.173-5.789 1.037-10.337 6.243-9.2 37.257-47.392 22.47-29.371 14.508-16.961-.101-2.451h-.859l-98.954 64.251-17.618 2.275-7.583-7.103.936-11.652 3.589-3.791 29.749-20.474z"})]}),c.jsx("span",{className:"hidden 2xl:inline",children:e.converter.toolbar.skillsClaude})]}),c.jsxs("button",{onClick:()=>Ct(!0),className:"relative flex items-center gap-1.5 px-2 py-1 rounded text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:[c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 48 48",className:"flex-shrink-0",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"tb-chrome-a",x1:"3.22",y1:"15",x2:"44.78",y2:"15",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#d93025"}),c.jsx("stop",{offset:"1",stopColor:"#ea4335"})]}),c.jsxs("linearGradient",{id:"tb-chrome-b",x1:"20.72",y1:"47.68",x2:"41.5",y2:"11.68",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#fcc934"}),c.jsx("stop",{offset:"1",stopColor:"#fbbc04"})]}),c.jsxs("linearGradient",{id:"tb-chrome-c",x1:"26.6",y1:"46.5",x2:"5.82",y2:"10.51",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#1e8e3e"}),c.jsx("stop",{offset:"1",stopColor:"#34a853"})]})]}),c.jsx("circle",{cx:"24",cy:"24",r:"12",fill:"#fff"}),c.jsx("path",{d:"M24,12H44.78a24,24,0,0,0-41.56.003L13.61,30l.01-.002A11.99,11.99,0,0,1,24,12Z",fill:"url(#tb-chrome-a)"}),c.jsx("circle",{cx:"24",cy:"24",r:"9.5",fill:"#1a73e8"}),c.jsx("path",{d:"M34.39,30L24,48A24,24,0,0,0,44.78,12H24l-.003.01A11.99,11.99,0,0,1,34.39,30Z",fill:"url(#tb-chrome-b)"}),c.jsx("path",{d:"M13.61,30L3.22,12.01A24,24,0,0,0,24,48L34.39,30l-.007-.007a11.99,11.99,0,0,1-20.78.007Z",fill:"url(#tb-chrome-c)"})]}),c.jsx("span",{className:"hidden 2xl:inline",children:e.converter.toolbar.extensionTitle})]})]}),c.jsx("div",{className:"w-px h-5 bg-[#2e2e2e]"}),c.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[tr?c.jsxs("span",{className:"text-[#ededed]",children:[c.jsx("span",{className:"font-semibold "+("team"===er?"text-[#A8B4FF]":"beta"===er?"text-[#98c379]":"text-[#E8C872]"),children:"team"===er?"Team":"beta"===er?e.converter.toolbar.betaPlan:"Pro"})," ",c.jsxs("span",{className:"text-[#707070]",children:["· ",e.converter.toolbar.unlimited]})]}):c.jsxs("span",{className:"text-[#888]",children:[c.jsx("span",{className:"text-[#ededed] font-medium capitalize",children:"free"===er?"Free":"Starter"})," ",c.jsxs("span",{className:"text-[#707070]",children:["· ",e.converter.toolbar.limited]})]}),pr&&c.jsxs("button",{onClick:()=>{Ee(void 0),Te(!0)},className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-white text-[10px] font-semibold transition-opacity "+(0===nr?"bg-[#2b7ff9] animate-pulse":"bg-gradient-to-r from-[#146EF5] to-[#2b7ff9] hover:opacity-90"),children:[c.jsx(M,{size:10}),0===nr?e.converter.toolbar.unlock:e.converter.toolbar.upgrade]})]}),c.jsx("div",{className:"w-px h-5 bg-[#2e2e2e]"}),c.jsxs("div",{className:"relative",ref:Lt,children:[c.jsxs("button",{onClick:()=>Dt(e=>!e),className:"relative p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",title:e.converter.toolbar.notificationsTitle,children:[c.jsx(Y,{size:18}),It>
70&&c.jsx("span",{className:"absolute top-0 right-0 min-w-[14px] h-3.5 px-[3px] flex items-center justify-center rounded-full bg-[#ef4444] text-[9px] font-bold text-white leading-none",children:It>9?"9+":It})]}),Mt&&c.jsx(xn,{notifications:Yt,t:e,onMarkRead:qt,onMarkAllRead:Vt,onClose:()=>Dt(!1),containerRef:Lt})]}),c.jsx("button",{onClick:()=>_e(!0),className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:e.converter.account.title,children:c.jsx(se,{size:18})})]})]}),c.jsxs("div",{"data-tour":"workspace-bar",className:"flex items-center justify-between h-10 min-h-10 px-3 bg-[#141414] border-b border-[#2e2e2e] select-none",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[H.length>0&&c.jsxs("div",{className:"relative",ref:St,children:[c.jsxs("button",{onClick:function(){qe?Jt():(Ve(!0),Be(!1))},className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs text-[#ededed] hover:bg-white/5 transition-colors max-w-[180px]",children:[c.jsx(pe,{size:14,className:"text-[#e5c07b] flex-shrink-0"}),c.jsx("span",{className:"truncate",children:(null==Qr?void 0:Qr.isDemo)?e.converter.page.demoProjectName:(null==Qr?void 0:Qr.name)??"Projet"}),c.jsx(W,{size:12,className:"text-[#707070] flex-shrink-0 transition-transform "+(qe?"rotate-180":"")})]}),qe&&c.jsxs("div",{className:"absolute top-full left-0 mt-1 w-64 bg-[#1f1f1f] border border-[#2e2e2e] rounded-lg shadow-2xl z-50 overflow-hidden "+(We?"animate-dropdown-out":"animate-dropdown-in"),children:[c.jsx("div",{className:"px-3 py-2 border-b border-[#2e2e2e]",children:c.jsx("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider",children:e.converter.toolbar.projectsLabel})}),c.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:H.map((t,r)=>c.jsxs("div",{draggable:ht!==t.id,onDragStart:()=>xt(r),onDragOver:e=>{e.preventDefault(),vt(r)},onDragEnd:()=>{null!==Ot&&null!==bt&&Ot!==bt&&ce(Ot,bt),xt(null),vt(null)},className:`flex items-center gap-2 px-3 py-2 text-xs cursor-pointer transition-colors group/item ${t.id===J?"bg-[#146EF5]/10 text-[#ededed]":"text-[#aaa] hover:bg-white/5 hover:text-[#ededed]"}${bt===r&&null!==Ot&&Ot!==r?" border-t border-[#146EF5]":""}`,onClick:()=>{ht!==t.id&&(te(t.id),Jt())},children:[c.jsxs("span",{className:"w-3 flex-shrink-0 relative flex items-center justify-center",children:[c.jsx(fe,{size:12,className:"text-[#707070] absolute opacity-0 group-hover/item:opacity-100 cursor-grab active:cursor-grabbing transition-opacity"}),t.id===J?c.jsx(f,{size:12,className:"text-[#98c379] group-hover/item:opacity-0 transition-opacity"}):c.jsx("span",{className:"w-3"})]}),!t.isDemo&&c.jsx(Se,{tool:t.tool}),ye,ht===t.id?c.jsx("input",{ref:jt,value:pt,onChange:e=>ft(e.target.value),onBlur:Ur,onKeyDown:e=>{"Enter"===e.key&&Ur(),"Escape"===e.key&&ut(null)},onClick:e=>e.stopPropagation(),maxLength:30,className:"flex-1 text-xs text-[#ededed] bg-[#171717] border border-[#146EF5] rounded px-1.5 py-0.5 outline-none"}):c.jsx("span",{className:"flex-1 truncate",children:t.isDemo?e.converter.page.demoProjectName:t.name}),c.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/item:opacity-100 transition-opacity",children:[!t.isDemo&&c.jsx("button",{onClick:e=>{e.stopPropagation(),ut(t.id),ft(t.name)},className:"p-0.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/10",title:e.common.actions.rename,children:c.jsx(je,{size:10})}),H.length>1&&c.jsx("button",{onClick:r=>{r.stopPropagation(),gt({id:t.id,name:t.isDemo?e.converter.page.demoProjectName:t.name}),wt("")},className:"p-0.5 rounded text-[#707070] hover:text-[#e06c75] hover:bg-white/10",title:e.common.actions.delete,children:c.jsx(Ze,{size:10})})]})]},t.id))}),c.jsx("div",{className:"border-t border-[#2e2e2e] px-3 py-2",children:c.jsxs("button",{onClick:()=>{et("webflow"),Ke(""),Ge(!0),Jt()},className:"flex items-center gap-1.5 text-xs text-[#707070] hover:text-[#ededed] transition-colors w-full",children:[c.jsx(Qe,{size:12}),e.converter.toolbar.newProject]})})]})]}),"framer"!==xe&&c.jsxs("button",{onClick:()=>Q(!0),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs transition-colors "+(Qr&&!Qr.stylesEnabled?"text-[#777] hover:bg-white/5":"text-[#ededed] hover:bg-white/5"),children:[c.jsx(I,{size:14,className:Qr&&!Qr.stylesEnabled?"opacity-50":""}),c.jsx("span",{className:"hidden md:inline",children:e.converter.toolbar.savedStyles}),Qr&&!Qr.stylesEnabled?c.jsx("span",{className:"text-[10px] text-[#777] uppercase tracking-wider font-semibold",children:"OFF"}):k.length>0?c.jsx("span",{className:"min-w-[18px] h-[18px] flex items-center justify-center rounded-full bg-[#146EF5]/20 text-[#2b7ff9] text-[10px] font-semibold",children:k.length}):null]}),ye,"framer"===xe&&Qr&&!Qr.isDemo&&c.jsxs("button",{type:"button",onClick:()=>{Ar(""),Nr("edit")},className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs text-[#ededed] hover:bg-white/5 transition-colors",title:Zr?`Destination Framer : ${Zr.label}`:"Cliquez pour lier une destination Framer",children:[c.jsxs("span",{className:"relative inline-flex",children:[c.jsx(le,{size:14,className:"text-[#61DAFB]"}),c.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full ring-1 ring-[#1b1f27] "+(Zr?"bg-[#2b7ff9]":"bg-[#e5c07b]")})]}),c.jsx("span",{className:"hidden sm:inline max-w-[140px] truncate",children:Zr?Zr.label:e.converter.connectFramer.badgeLink})]}),c.jsxs("button",{onClick:()=>{_(!0)},className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs text-[#ededed] hover:bg-white/5 transition-colors",children:[c.jsx(F,{size:14}),c.jsx("span",{className:"hidden md:inline",children:e.converter.toolbar.history}),P.length>0&&c.jsx("span",{className:"min-w-[18px] h-[18px] flex items-center justify-center rounded-full bg-[#e5c07b]/20 text-[#e5c07b] text-[10px] font-semibold",children:P.length})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[("success"===N||"copied"===N)&&c.jsxs("button",{onClick:()=>$t(!0),className:"flex items-center gap-1 px-2 py-1 rounded text-[11px] text-[#5c6370] hover:text-[#e5c07b] transition-colors",title:e.converter.toolbar.reportConversionProblem,children:[c.jsx(we,{size:11}),e.converter.toolbar.feedbackProblem]}
7),y&&!tr&&c.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[ur&&c.jsxs("span",{className:"relative flex items-center group/renew cursor-help",children:[c.jsx(ee,{size:13,className:"text-[#888] group-hover/renew:text-white transition-colors"}),c.jsx("span",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full pt-2 z-[60] opacity-0 translate-y-0.5 transition-[opacity,transform] duration-75 group-hover/renew:opacity-100 group-hover/renew:translate-y-0 group-hover/renew:pointer-events-auto",children:c.jsxs("span",{className:"block w-[210px] rounded-lg border border-black/10 bg-white p-2.5 text-left shadow-xl",children:[c.jsx("span",{className:"block text-xs font-medium leading-snug text-[#1a1a1c]",children:e.converter.usage.renewsTooltip.replace("{date}",ur.dateLabel).replace("{n}",String(ur.daysLeft))}),c.jsxs("button",{onClick:()=>{Ee(void 0),Te(!0)},className:"mt-2 flex w-full items-center justify-center gap-1 rounded-md bg-gradient-to-r from-[#146EF5] to-[#2b7ff9] px-2 py-1 text-[11px] font-semibold text-white hover:opacity-90 transition-opacity cursor-pointer",children:[c.jsx(M,{size:11}),e.converter.usage.upgradeCta]})]})})]}),c.jsx(V,{size:12,className:0===nr?"text-[#ff6b6b]":"text-[#2b7ff9]"}),c.jsxs("span",{className:0===nr?"text-[#ff6b6b]":"text-[#888]",children:[c.jsx("span",{className:"font-semibold "+(0===nr?"text-[#ff6b6b]":"text-white"),children:nr}),"/",rr]})]}),"error"===N&&A&&c.jsx("span",{className:"text-[10px] text-[#e06c75] max-w-[120px] truncate hidden xl:inline",title:A,children:A.split("\n")[0]}),c.jsx(hn,{html:O,css:x,js:b,tool:xe,result:xr,projectName:null==Qr?void 0:Qr.name,pageName:null==Pr?void 0:Pr.name,blockersIgnored:Sr,onIgnoreBlockers:()=>wr(vr)}),c.jsxs("button",{"data-tour":"convert-btn",onClick:function(){Wr.current()},disabled:"converting"===N||"copied"===N||"success"===N&&"preparing"===Xr,className:`\n flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-xs font-semibold\n transition-all duration-200 ease-out\n disabled:pointer-events-none\n ${Hr[Kr]}\n `,title:"error"===N?A:kr?e.converter.preflight.blockedTooltip.replace("{count}",String(br)):"idle"===N?`${"framer"===xe?e.converter.toolbar.convertToFramer:e.converter.toolbar.convert} (${navigator.userAgent.includes("Mac")?"â":"Ctrl"}+Enter)`:void 0,children:["idle"===N&&c.jsxs(c.Fragment,{children:[c.jsx(K,{size:12}),"framer"===xe?e.converter.toolbar.convertToFramer:e.converter.toolbar.convert]}),"converting"===N&&c.jsxs(c.Fragment,{children:[c.jsx(g,{size:12,className:"animate-spin"}),e.converter.toolbar.converting]}),"success"===N&&"preparing"===Xr&&c.jsxs(c.Fragment,{children:[c.jsx(g,{size:12,className:"animate-spin"}),e.converter.toolbar.preparingComponents]}),"success"===N&&"error"===Xr&&c.jsxs(c.Fragment,{children:[c.jsx(C,{size:12}),e.converter.toolbar.retryPreparation]}),"success"===N&&"preparing"!==Xr&&"error"!==Xr&&c.jsxs(c.Fragment,{children:[c.jsx(oe,{size:12}),"framer"===xe?e.converter.toolbar.copyForFramer:e.converter.toolbar.copyForWebflow]}),"copied"===N&&c.jsxs(c.Fragment,{children:[c.jsx(f,{size:12}),e.converter.toolbar.copiedShort]}),"error"===N&&c.jsxs(c.Fragment,{children:[c.jsx(C,{size:12}),e.converter.toolbar.error]})]})]})]}),$e&&c.jsx(Tr,{onClose:()=>_e(!1),onUpgrade:()=>{Ee(void 0),Te(!0)}}),Ce&&c.jsx(Dr,{feature:Ne,onClose:()=>{Te(!1),Ee(void 0),or().then(e=>w(e.count)).catch(()=>{})}}),Ae&&c.jsx(Yr,{onClose:()=>ze(!1),plan:er,onUpgrade:()=>{Ee("priority-support"),Te(!0)}}),Pt&&c.jsx(on,{conversionId:U,userId:null==r?void 0:r.id,onClose:()=>$t(!1)}),ke&&c.jsx(nn,{onClose:()=>Pe(!1)}),Ye&&c.jsx(sn,{onClose:()=>Ie(!1)}),_t&&c.jsx(vn,{t:e,onClose:()=>Ct(!1)}),"closed"!==Cr&&c.jsx(hr,{withConvertexProjectName:"create"===Cr,initialConvertexProjectName:Er,initialLabel:"create"===Cr?Er:(null==Zr?void 0:Zr.label)??"",initialProjectUrl:"edit"===Cr?(null==Zr?void 0:Zr.project_url)??"":"",title:"create"===Cr?e.converter.connectFramer.titleCreate:e.converter.connectFramer.titleLink,subtitle:"create"===Cr?e.converter.connectFramer.subt
7itleCreate:e.converter.connectFramer.subtitleLink,submitLabel:"create"===Cr?e.converter.connectFramer.submitCreate:e.converter.connectFramer.submitLink,onClose:()=>{Nr("closed"),Ar("")},onConnected:async function(e,t){_r(t=>[e,...t.filter(t=>t.id!==e.id)]),"create"===Cr&&t?await He.getState().createProject(t,"framer",e.id):"edit"===Cr&&J&&await He.getState().setProjectFramerDestination(J,e.id),Ar("")}}),Ft&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] animate-fade-in",onClick:()=>{s.auth.updateUser({data:{skills_prompt_seen:!0,skills_installed:!0}}),Bt(!0),Gt(!1)}}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:c.jsxs("div",{className:"px-6 py-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#D77655]/15 flex items-center justify-center flex-shrink-0",children:c.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#D77655",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.skillsPrompt.title})]}),c.jsx("p",{className:"text-xs text-[#888] leading-relaxed",children:e.converter.skillsPrompt.description.replace("{tool}","framer"===xe?"Framer":"Webflow")}),c.jsxs("div",{className:"flex flex-col gap-2 pt-1",children:[c.jsx("button",{onClick:()=>{s.auth.updateUser({data:{skills_prompt_seen:!0,skills_installed:!0}}),Bt(!0),Gt(!1),Pe(!0)},className:"w-full py-2.5 rounded-lg text-xs font-semibold text-white bg-[#D77655] hover:bg-[#c4684a] transition-colors cursor-pointer",children:e.converter.skillsPrompt.install}),c.jsx("button",{onClick:()=>{s.auth.updateUser({data:{skills_prompt_seen:!0,skills_installed:!0}}),Bt(!0),Gt(!1)},className:"w-full py-2.5 rounded-lg text-xs font-medium text-[#666] hover:text-[#aaa] transition-colors cursor-pointer",children:e.converter.skillsPrompt.skip})]})]})})})]}),At&&c.jsx(an,{conversionId:U,userId:null==r?void 0:r.id,onClose:()=>{zt(!1),Vr(U)}}),Zt&&c.jsx(ln,{conversionId:U,userId:null==r?void 0:r.id,onClose:()=>{Rt(!1),Vr(U)},onOpenSkills:()=>{Rt(!1),Vr(U),Pe(!0)},onOpenUpgrade:()=>{Rt(!1),Vr(U),Ee(void 0),Te(!0)}}),Fe&&(()=>{const t=()=>{ct||(Ge(!1),Ke(""),rt(""),st(""),lt(""))},r=!("framer"!==Je||tt.trim()&&nt.trim());return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-md z-[70] animate-fade-in",onClick:t}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:t,children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.toolbar.newProject})}),c.jsxs("div",{className:"px-5 py-4 space-y-3",children:[c.jsxs("div",{className:"flex gap-1.5 p-1 bg-[#141414] rounded-lg",children:[c.jsxs("button",{onClick:()=>et("webflow"),disabled:ct,className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-xs font-medium transition-colors cursor-pointer "+("webflow"===Je?"bg-[#146EF5]/15 text-[#ededed] ring-1 ring-[#146EF5]/30":"text-[#888] hover:text-[#ededed]"),children:[c.jsx(Se,{tool:"webflow",size:14}),"Webflow"]}),c.jsxs("button",{onClick:()=>et("framer"),disabled:ct,className:"flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-xs font-medium transition-colors cursor-pointer "+("framer"===Je?"bg-[#0099FF]/15 text-[#ededed] ring-1 ring-[#0099FF]/30":"text-[#888] hover:text-[#ededed]"),children:[c.jsx(Se,{tool:"framer",size:14}),"Framer",c.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-semibold uppercase tracking-wider bg-white/5 text-[#aaa] ring-1 ring-white/10",children:"Beta"})]})]}),c.jsx("input",{ref:kt,type:"text",value:Ue,onChange:e=>Ke(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Gr(),"Escape"===e.key&&t()},maxLength:30,placeholder:e.converter.toolbar.projectPlaceholder,autoFocus:!0,disabled:ct,className:"w-full px-3 py-2 rounded-lg bg-[#141414] border border-[#2e2e2e] text-xs text-[#ededed] placeholder-[#555] focus:border-[#146EF5]/50 focus:outline-none transition-colors disabled:opacity-50"}),"framer"===Je&&c.jsxs("div",{className:"space-y-2 pt-1",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[11px] font-medium text-[#c4c4c4] mb-1",children:e.converter.connectFramer.projectLink}
7),c.jsx("input",{type:"url",value:tt,onChange:e=>rt(e.target.value),placeholder:"https://framer.com/projects/...",disabled:ct,className:"w-full px-3 py-2 rounded-lg bg-[#141414] border border-[#2e2e2e] text-xs text-[#ededed] placeholder-[#555] focus:border-[#0099FF]/50 focus:outline-none transition-colors disabled:opacity-50"})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"block text-[11px] font-medium text-[#c4c4c4] mb-1 flex items-center justify-between",children:[c.jsx("span",{children:e.converter.connectFramer.apiKey}),c.jsx("span",{className:"text-[10px] text-[#6a6a6a]",children:e.converter.connectFramer.apiKeyHintShort})]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:it?"text":"password",value:nt,onChange:e=>st(e.target.value),placeholder:"fr_...",disabled:ct,className:"w-full px-3 py-2 pr-9 rounded-lg bg-[#141414] border border-[#2e2e2e] text-xs text-[#ededed] placeholder-[#555] font-mono focus:border-[#0099FF]/50 focus:outline-none transition-colors disabled:opacity-50"}),c.jsx("button",{type:"button",tabIndex:-1,onClick:()=>ot(e=>!e),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[#6a6a6a] hover:text-[#ededed] p-1",children:it?c.jsx(he,{size:12}):c.jsx(ue,{size:12})})]}),c.jsx("p",{className:"text-[10px] text-[#6a6a6a] mt-1",children:e.converter.connectFramer.apiKeyEncryptedNote})]})]}),at&&c.jsx("div",{className:"px-3 py-2 bg-red-500/10 border border-red-500/30 rounded-md text-[11px] text-red-300",children:at})]}),c.jsxs("div",{className:"flex gap-2 px-5 py-3 border-t border-[#2e2e2e]",children:[c.jsx("button",{onClick:t,disabled:ct,className:"flex-1 py-2 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer disabled:opacity-40",children:e.common.actions.cancel}),c.jsxs("button",{onClick:Gr,disabled:!Ue.trim()||r||ct,className:"flex-1 py-2 rounded-lg bg-[#146EF5] text-xs font-medium text-white hover:bg-[#2b7ff9] transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2",children:[ct&&c.jsx(g,{size:12,className:"animate-spin"}),ct?e.converter.connectFramer.connecting:e.common.actions.create]})]})]})})]})})(),mt&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] animate-fade-in",onClick:()=>gt(null)}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:()=>gt(null),children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.toolbar.deleteProjectTitle})}),c.jsxs("div",{className:"px-5 py-4 space-y-3",children:[c.jsxs("p",{className:"text-xs text-[#707070] leading-relaxed",children:[e.converter.toolbar.deleteProjectMessage.split('"{name}"')[0],c.jsxs("span",{className:"text-[#ededed] font-medium",children:['"',mt.name,'"']}),e.converter.toolbar.deleteProjectMessage.split('"{name}"')[1]]}),c.jsxs("div",{children:[c.jsxs("label",{className:"text-[10px] text-[#888] mb-1.5 flex items-center gap-1 flex-wrap",children:[c.jsx("span",{children:e.converter.toolbar.deleteProjectConfirmLabel.split("{name}")[0]}),c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx("span",{className:"text-[#ededed] font-mono",children:mt.name}),c.jsx("button",{type:"button",onClick:()=>wt(mt.name),title:e.common.actions.copy,"aria-label":e.common.actions.copy,className:"p-0.5 rounded text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:c.jsx($,{size:10})})]}),c.jsx("span",{children:e.converter.toolbar.deleteProjectConfirmLabel.split("{name}")[1]})]}),c.jsx("input",{type:"text",value:yt,onChange:e=>wt(e.target.value),placeholder:mt.name,autoFocus:!0,className:"w-full px-3 py-2 rounded-lg bg-[#141414] border border-[#2e2e2e] text-xs text-[#ededed] placeholder-[#555] focus:border-[#e06c75]/50 focus:outline-none transition-colors"})]})]}),c.jsxs("div",{className:"flex gap-2 px-5 py-3 border-t border-[#2e2e2e]",children:[c.jsx("button",{onClick:()=>gt(null),className:"flex-1 py-2 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:e.common.actions.cancel}),c.jsx("button",{onClick:()=>{ae(mt.id),gt(null)},disabled:yt!==mt.name,className:"flex-1 py-2 rounded-lg bg-[#e06c75]/15 border border-[#e06c75]/20 text-xs font-medium text-[#e06c75] hover:bg-[#e06c75]/25 transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",children:e.converter.toolbar.deleteProjectConfirmBtn})]})]})})]}),Nt&&c.jsx("div",{className:"fixed top-6 left-1/2 -translate-x-1/2 bg-[#1f1f1f] text-[#ededed] px-5 py-3 rounded-[10px] text-[13px] font-medium border border-[#e06c75] shadow-[0_8px_32px_rgba(0,0,0,0.4)] max-w-[420px] text-center z-[99999] pointer-events-none animate-fade-in",role:"alert",children:Nt})]})}let wn=[],Sn=[];function kn(e){if(e<768)return!1;for(let t=0,r=wn.length;;){let n=t+r>>1;if(e<wn[n])r=n;else{if(!(e>=Sn[n]))return!0;t=n+1}if(t==r)return!1}}function jn(e){return e>=127462&&e<=127487}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14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s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,r=0;t<e.length;t++)(t%2?Sn:wn).push(r+=e[t])})();function Qn(e,t,r=!0,n=!0){return(r?Pn:$n)(e,t,n)}function Pn(e,t,r){if(t==e.length)return t;t&&Cn(e.charCodeAt(t))&&Tn(e.charCodeAt(t-1))&&t--;let n=_n(e,t);for(t+=Nn(n);t<e.length;){let s=_n(e,t);if(8205==n||8205==s||r&&kn(s))t+=Nn(s),n=s;else{if(!jn(s))break;{let r=0,n=t-2;for(;n>=0&&jn(_n(e,n));)r++,n-=2;if(r%2==0)break;t+=2}}}return t}function $n(e,t,r){for(;t>0;){let n=Pn(e,t-2,r);
vendor: 67,380 bytes, line 7
7if(n<t)return n;t--}return 0}function _n(e,t){let r=e.charCodeAt(t);if(!Tn(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return Cn(n)?n-56320+(r-55296<<10)+65536:r}function Cn(e){return e>=56320&&e<57344}function Tn(e){return e>=55296&&e<56320}function Nn(e){return e<65536?1:2}class En{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Yn(this,e,t);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(t,this.length,n,1),zn.from(n,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Yn(this,e,t);let r=[];return this.decompose(e,t,r,0),zn.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new Xn(this),s=new Xn(e);for(let i=t,o=t;;){if(n.next(i),s.next(i),i=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(o+=n.value.length,n.done||o>=r)return!0}}iter(e=1){return new Xn(this,e)}iterRange(e,t=this.length){return new Mn(this,e,t)}iterLines(e,t){let r;if(null==e)r=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Dn(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new An(e):zn.from(An.split(e,[])):En.empty}}class An extends En{constructor(e,t=function(e){let t=-1;for(let r of e)t+=r.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,n){for(let s=0;;s++){let i=this.text[s],o=n+i.length;if((t?r:o)>=e)return new Ln(n,o,r,i);n=o+1,r++}}decompose(e,t,r,n){let s=e<=0&&t>=this.length?this:new An(Rn(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=r.pop(),t=Zn(s.text,e.text.slice(),0,s.length);if(t.length<=32)r.push(new An(t,e.length+s.length));else{let e=t.length>>1;r.push(new An(t.slice(0,e)),new An(t.slice(e)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof An))return super.replace(e,t,r);[e,t]=Yn(this,e,t);let n=Zn(this.text,Zn(r.text,Rn(this.text,0,e)),t),s=this.length+r.length-(t-e);return n.length<=32?new An(n,s):zn.from(An.split(n,[]),s)}sliceString(e,t=this.length,r="\n"){[e,t]=Yn(this,e,t);let n="";for(let s=0,i=0;s<=t&&i<this.text.length;i++){let o=this.text[i],a=s+o.length;s>e&&i&&(n+=r),e<a&&t>s&&(n+=o.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],n=-1;for(let s of e)r.push(s),n+=s.length+1,32==r.length&&(t.push(new An(r,n)),r=[],n=-1);return n>-1&&t.push(new An(r,n)),t}}class zn extends En{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,n){for(let s=0;;s++){let i=this.children[s],o=n+i.length,a=r+i.lines-1;if((t?a:o)>=e)return i.lineInner(e,t,r,n);n=o+1,r=a+1}}decompose(e,t,r,n){for(let s=0,i=0;i<=t&&s<this.children.length;s++){let o=this.children[s],a=i+o.length;if(e<=a&&t>=i){let s=n&((i<=e?1:0)|(a>=t?2:0));i>=e&&a<=t&&!s?r.push(o):o.decompose(e-i,t-i,r,s)}i=a+1}}replace(e,t,r){if([e,t]=Yn(this,e,t),r.lines<this.lines)for(let n=0,s=0;n<this.children.length;n++){let i=this.children[n],o=s+i.length;if(e>=s&&t<=o){let a=i.replace(e-s,t-s,r),l=this.lines-i.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new zn(s,this.length-(t-e)+r.length)}return super.replace(s,o,a)}s=o+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r="\n"){[e,t]=Yn(this,e,t);let n="";for(let s=0,i=0;s<this.children.length&&i<=t;s++){let o=this.children[s],a=i+o.length;i>e&&s&&(n+=r),e<a&&t>i&&(n+=o.sliceString(e-i,t-i,r)),i=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof zn))return 0;let r=0,[n,s,i,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==i||s==o)return r;let a=this.children[n],l=e.children[s];if(a!=l)return r+a.scanIdentical(l,t);r+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let u of e)r+=u.lines;if(r<32){let r=[];for(let t of e)t.flatten(r);return new An(r,t)}let n=Math.max(32,r>>5),s=n<<1,i=n>>1,o=[],a=0,l=-1,c=[];function d(e){let t;if(e.lines>s&&e instanceof zn)for(let r of e.children)d(r);else e.lines>i&&(a>i||!a)?(h(),o.push(e)):e instanceof An&&a&&(t=c[c.length-1])instanceof An&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new An(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>n&&h(),a+=e.lines,l+=e.length+1,c.push(e))}function h(){0!=a&&(o.push(1==c.length?c[0]:zn.from(c,l)),l=-1,a=c.length=0)}for(let u of e)d(u);return h(),1==o.length?o[0]:new zn(o,t)}}function Zn(e,t,r=0,n=1e9){for(let s=0,i=0,o=!0;i<e.length&&s<=n;i++){let a=e[i],l=s+a.length;l>=r&&(l>n&&(a=a.slice(0,n-s)),s<r&&(a=a.slice(r-s)),o?(t[t.length-1]+=a,o=!1):t.push(a)),s=l+1}return t}function Rn(e,t,r){return Zn(e,[""],t,r)}En.empty=new An([""],0);class Xn{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof An?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],s=this.offsets[r],i=s>>1,o=n instanceof An?n.text.length:n.children.length;if(i==(t>0?o:0)){if(0==r)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(t>0?0:1)){if(this.offsets[r]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof An){let s=n.text[i+(t<0?-1:0)];if(this.offsets[r]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{let s=n.children[i+(t<0?-1:0)];e>s.length?(e-=s.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(s),this.offsets.push(t>0?1:(s instanceof An?s.text.length:s.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Mn{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Xn(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=r?n:t<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Dn{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(En.prototype[Symbol.iterator]=function(){return this.iter()},Xn.prototype[Symbol.iterator]=Mn.prototype[Symbol.iterator]=Dn.prototype[Symbol.iterator]=function(){return this});class Ln{constructor(e,t,r,n){this.from=e,this.to=t,this.number=r,this.text=n}get length(){return this.to-this.from}}function Yn(e,t,r){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,r))]}function In(e,t,r=!0,n=!0){return Qn(e,t,r,n)}function qn(e,t){let r=e.charCodeAt(t);if(!(n=r,n>=55296&&n<56320&&t+1!=e.length))return r;var n;let s=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(s)?s-56320+(r-55296<<10)+65536:r}function Vn(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Wn(e){return e<65536?1:2}const Bn=/\r\n?|\n/;var Fn=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Fn||(Fn={}));class Gn{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,n=0;t<this.sections.length;){let s=this.sections[t++],i=this.sections[t++];i<0?(e(r,n,s),n+=s):n+=i,r+=s}}iterChangedRanges(e,t=!1){Jn(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];n<0?e.push(r,n):e.push(n,r)}return new Gn(e)}composeDesc(e){return this.empty?e:e.empty?this:ts(this,e)}mapDesc(e,t=!1){return e.empty?this:es(this,e,t)}mapPos(e,t=-1,r=Fn.Simple){let n=0,s=0;for(let i=0;i<this.sections.length;){let o=this.sections[i++],a=this.sections[i++],l=n+o;if(a<0){if(l>e)return s+(e-n);s+=o}else{if(r!=Fn.Simple&&l>=e&&(r==Fn.TrackDel&&n<e&&l>e||r==Fn.TrackBefore&&n<e||r==Fn.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!o)return e==n||t<0?s:s+a;s+=a}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return s}touchesRange(e,t=e){for(let r=0,n=0;r<this.sections.length&&n<=t;){let s=n+this.sections[r++];if(this.sections[r++]>=0&&n<=t&&s>=e)return!(n<e&&s>t)||"cover";n=s}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+r+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Gn(e)}static create(e){return new Gn(e)}}class Un extends Gn{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Jn(this,(t,r,n,s,i)=>e=e.replace(n,n+(r-t),i),!1),e}mapDesc(e,t=!1){return es(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let n=0,s=0;n<t.length;n+=2){let i=t[n],o=t[n+1];if(o>=0){t[n]=o,t[n+1]=i;let a=n>>1;for(;r.length<a;)r.push(En.empty);r.push(i?e.slice(s,s+i):En.empty)}s+=i}return new Un(t,r)}compose(e){return this.empty?e:e.empty?this:ts(this,e,!0)}map(e,t=!1){return e.empty?this:es(this,e,t,!0)}iterChanges(e,t=!1){Jn(this,e,t)}get desc(){return Gn.create(this.sections)}filter(e){let t=[],r=[],n=[],s=new rs(this);e:for(let i=0,o=0;;){let a=i==e.length?1e9:e[i++];for(;o<a||o==a&&0==s.len;){if(s.done)break e;let e=Math.min(s.len,a-o);Hn(n,e,-1);let i=-1==s.ins?-1:0==s.off?s.ins:0;Hn(t,e,i),i>0&&Kn(r,t,s.text),s.forward(e),o+=e}let l=e[i++];for(;o<l;){if(s.done)break e;let e=Math.min(s.len,l-o);Hn(t,e,-1),Hn(n,e,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(e),o+=e}}return{changes:new Un(t,r),filtered:Gn.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],n=this.sections[t+1];n<0?e.push(r):0==n?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let n=[],s=[],i=0,o=null;function a(e=!1){if(!e&&!n.length)return;i<t&&Hn(n,t-i,-1);let r=new Un(n,s);o=o?o.compose(r.map(o)):r,n=[],s=[],i=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof Un){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),o=o?o.compose(l.map(o)):l}else{let{from:e,to:o=e,insert:c}=l;if(e>o||e<0||o>t)throw new RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let d=c?"string"==typeof c?En.of(c.split(r||Bn)):c:En.empty,h=d.length;if(e==o&&0==h)return;e<i&&a(),e>i&&Hn(n,e-i,-1),Hn(n,o-e,h),Kn(s,n,d),i=o}}(e),a(!o),o}static empty(e){return new Un(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let n=0;n<e.length;n++){let s=e[n];if("number"==typeof s)t.push(s,-1);else{if(!Array.isArray(s)||"number"!=typeof s[0]||s.some((e,t)=>t&&"string"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)t.push(s[0],0);else{for(;r.length<n;)r.push(En.empty);r[n]=En.of(s.slice(1)),t.push(s[0],r[n].length)}}}return new Un(t,r)}static createSet(e,t){return new Un(e,t)}}function Hn(e,t,r,n=!1){if(0==t&&r<=0)return;let s=e.length-2;s>=0&&r<=0&&r==e[s+1]?e[s]+=t:s>=0&&0==t&&0==e[s]?e[s+1]+=r:n?(e[s]+=t,e[s+1]+=r):e.push(t,r)}function Kn(e,t,r){if(0==r.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(r);else{for(;e.length<n;)e.push(En.empty);e.push(r)}}function Jn(e,t,r){let n=e.inserted;for(let s=0,i=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)s+=a,i+=a;else{let c=s,d=i,h=En.empty;for(;c+=a,d+=l,l&&n&&(h=h.append(n[o-2>>1])),!(r||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(s,c,i,d,h),s=c,i=d}}}function es(e,t,r,n=!1){let s=[],i=n?[]:null,o=new rs(e),a=new rs(t);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);Hn(s,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||l==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!r))){let e=a.len;for(Hn(s,a.ins,-1);e;){let t=Math.min(o.len,e);o.ins>=0&&l<o.i&&o.len<=t&&(Hn(s,0,o.ins),i&&Kn(i,s,o.text),l=o.i),o.forward(t),e-=t}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return i?Un.createSet(s,i):Gn.create(s);throw new Error("Mismatched change set lengths")}{let e=0,t=o.len;for(;t;)if(-1==a.ins){let r=Math.min(t,a.len);e+=r,t-=r,a.forward(r)}else{if(!(0==a.ins&&a.len<t))break;t-=a.len,a.next()}Hn(s,e,l<o.i?o.ins:0),i&&l<o.i&&Kn(i,s,o.text),l=o.i,o.forward(o.len-t)}}}}function ts(e,t,r=!1){let n=[],s=r?[]:null,i=new rs(e),o=new rs(t);for(let a=!1;;){if(i.done&&o.done)return s?Un.createSet(n,s):Gn.create(n);if(0==i.ins)Hn(n,i.len,0,a),i.next();else if(0!=o.len||o.done){if(i.done||o.done)throw new Error("Mismatched change set lengths");{let e=Math.min(i.len2,o.len),t=n.length;if(-1==i.ins){let t=-1==o.ins?-1:o.off?0:o.ins;Hn(n,e,t,a),s&&t&&Kn(s,n,o.text)}else-1==o.ins?(Hn(n,i.off?0:i.len,e,a),s&&Kn(s,n,i.textBit(e))):(Hn(n,i.off?0:i.len,o.off?0:o.ins,a),s&&!o.off&&Kn(s,n,o.text));a=(i.ins>e||o.ins>=0&&o.len>e)&&(a||n.length>t),i.forward2(e),o.forward(e)}}else Hn(n,0,o.ins,a),s&&Kn(s,n,o.text),o.next()}}class rs{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?En.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?En.empty:t[r].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ns{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new ns(r,n,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return ss.range(e,t,void 0,void 0,r);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ss.range(this.anchor,n,void 0,void 0,r)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||this.goalColumn!=e.goalColumn||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return ss.range(e.anchor,e.head)}static create(e,t,r){return new ns(e,t,r)}}class ss{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ss.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new ss([this.main],0)}addRange(e,t=!0){return ss.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,ss.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ss(e.ranges.map(e=>ns.fromJSON(e)),e.main)}static single(e,t=e){return new ss([ss.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;n<e.length;n++){let s=e[n];if(s.empty?s.from<=r:s.from<r)return ss.normalized(e.slice(),t);r=s.to}return new ss(e,t)}static cursor(e,t=0,r,n){return ns.create(e,e,(0==t?0:t<0?8:16)|(null==r?7:Math.min(6,r))|(null!=n?n:16777215)<<6)}static range(e,t,r,n,s){let i=(null!=r?r:16777215)<<6|(null==n?7:Math.min(6,n));return s||e==t||(s=t<e?1:-1),t<e?ns.create(t,e,48|i):ns.create(e,t,(s?s<0?8:16:0)|i)}static normalized(e,t=0){let r=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(r);for(let n=1;n<e.length;n++){let r=e[n],s=e[n-1];if(r.empty?r.from<=s.to:r.from<s.to){let i=s.from,o=Math.max(r.to,s.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?ss.range(o,i):ss.range(i,o))}}return new ss(e,t)}}function is(e,t){for(let r of e.ranges)if(r.to>t)throw new RangeError("Selection points outside of document")}let os=0;class as{constructor(e,t,r,n,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=n,this.id=os++,this.default=e([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(e={}){return new as(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:ls),!!e.static,e.enables)}of(e){return new cs([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new cs(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new cs(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],r=>t(r.field(e)))}}function ls(e,t){return e==t||e.length==t.length&&e.every((e,r)=>e===t[r])}class cs{constructor(e,t,r,n){this.dependencies=e,this.facet=t,this.type=r,this.value=n,this.id=os++}dynamicSlot(e){var t;let r=this.value,n=this.facet.compareInput,s=this.id,i=e[s]>>1,o=2==this.type,a=!1,l=!1,c=[];for(let d of this.dependencies)"doc"==d?a=!0:"selection"==d?l=!0:1&(null!==(t=e[d.id])&&void 0!==t?t:1)||c.push(e[d.id]);return{create:e=>(e.values[i]=r(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||hs(e,c)){let t=r(e);if(o?!ds(t,e.values[i],n):!n(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[s];if(null!=l){let s=Qs(t,l);if(this.dependencies.every(r=>r instanceof as?t.facet(r)===e.facet(r):!(r instanceof fs)||t.field(r,!1)==e.field(r,!1))||(o?ds(a=r(e),s,n):n(a=r(e),s)))return e.values[i]=s,0}else a=r(e);return e.values[i]=a,1}}}}function ds(e,t,r){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}function hs(e,t){let r=!1;for(let n of t)1&js(e,n)&&(r=!0);return r}function us(e,t,r){let n=r.map(t=>e[t.id]),s=r.map(e=>e.type),i=n.filter(e=>!(1&e)),o=e[t.id]>>1;function a(e){let r=[];for(let t=0;t<n.length;t++){let i=Qs(e,n[t]);if(2==s[t])for(let e of i)r.push(e);else r.push(i)}return t.combine(r)}return{create(e){for(let t of n)js(e,t);return e.values[o]=a(e),1},update(e,r){if(!hs(e,i))return 0;let n=a(e);return t.compare(n,e.values[o])?0:(e.values[o]=n,1)},reconfigure(e,s){let i=hs(e,n),l=s.config.facets[t.id],c=s.facet(t);if(l&&!i&&ls(r,l))return e.values[o]=c,0;let d=a(e);return t.compare(d,c)?(e.values[o]=c,0):(e.values[o]=d,1)}}}const ps=as.define({static:!0});class fs{constructor(e,t,r,n,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=n,this.spec=s,this.provides=void 0}static define(e){let t=new fs(os++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ps).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,r)=>{let n=e.values[t],s=this.updateF(n,r);return this.compareF(n,s)?0:(e.values[t]=s,1)},reconfigure:(e,r)=>{let n,s=e.facet(ps),i=r.facet(ps);return(n=s.find(e=>e.field==this))&&n!=i.find(e=>e.field==this)?(e.values[t]=n.create(e),1):null!=r.config.address[this.id]?(e.values[t]=r.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,ps.of({field:this,create:e})]}get extension(){return this}}const ms=4,gs=3,Os=2,xs=1;function bs(e){return t=>new ys(t,e)}const vs={highest:bs(0),high:bs(xs),default:bs(Os),low:bs(gs),lowest:bs(ms)};class ys{constructor(e,t){this.inner=e,this.prec=t}}class ws{of(e){return new Ss(this,e)}reconfigure(e){return ws.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Ss{constructor(e,t){this.compartment=e,this.inner=t}}class ks{constructor(e,t,r,n,s,i){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=n,this.staticValues=s,this.facets=i,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let n=[],s=Object.create(null),i=new Map;for(let h of function(e,t,r){let n=[[],[],[],[],[]],s=new Map;function i(e,o){let a=s.get(e);if(null!=a){if(a<=o)return;let t=n[a].indexOf(e);t>-1&&n[a].splice(t,1),e instanceof Ss&&r.delete(e.compartment)}if(s.set(e,o),Array.isArray(e))for(let t of e)i(t,o);else if(e instanceof Ss){if(r.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(e.compartment)||e.inner;r.set(e.compartment,n),i(n,o)}else if(e instanceof ys)i(e.inner,e.prec);else if(e instanceof fs)n[o].push(e),e.provides&&i(e.provides,o);else if(e instanceof cs)n[o].push(e),e.facet.extensions&&i(e.facet.extensions,Os);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(t,o)}}return i(e,Os),n.reduce((e,t)=>e.concat(t))}(e,t,i))h instanceof fs?n.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let o=Object.create(null),a=[],l=[];for(let h of n)o[h.id]=l.length<<1,l.push(e=>h.slot(e));let c=null==r?void 0:r.config.facets;for(let h in s){let e=s[h],t=e[0].facet,n=c&&c[h]||[];if(e.every(e=>0==e.type))if(o[t.id]=a.length<<1|1,ls(n,e))a.push(r.facet(t));else{let n=t.combine(e.map(e=>e.value));a.push(r&&t.compare(n,r.facet(t))?r.facet(t):n)}else{for(let t of e)0==t.type?(o[t.id]=a.length<<1|1,a.push(t.value)):(o[t.id]=l.length<<1,l.push(e=>t.dynamicSlot(e)));o[t.id]=l.length<<1,l.push(r=>us(r,t,e))}}let d=l.map(e=>e(o));return new ks(e,i,d,o,a,s)}}function js(e,t){if(1&t)return 2;let r=t>>1,n=e.status[r];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[r]=4;let s=e.computeSlot(e,e.config.dynamicSlots[r]);return e.status[r]=2|s}function Qs(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Ps=as.define(),$s=as.define({combine:e=>e.some(e=>e),static:!0}),_s=as.define({combine:e=>e.length?e[0]:void 0,static:!0}),Cs=as.define(),Ts=as.define(),Ns=as.define(),Es=as.define({combine:e=>!!e.length&&e[0]});class As{constructor(e,t){this.type=e,this.value=t}static define(){return new zs}}class zs{of(e){return new As(this,e)}}class Zs{constructor(e){this.map=e}of(e){return new Rs(this,e)}}class Rs{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new Rs(this.type,t)}is(e){return this.type==e}static define(e={}){return new Zs(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let n of e){let e=n.map(t);e&&r.push(e)}return r}}Rs.reconfigure=Rs.define(),Rs.appendConfig=Rs.define();class Xs{constructor(e,t,r,n,s,i){this.startState=e,this.changes=t,this.selection=r,this.effects=n,this.annotations=s,this.scrollIntoView=i,this._doc=null,this._state=null,r&&is(r,t.newLength),s.some(e=>e.type==Xs.time)||(this.annotations=s.concat(Xs.time.of(Date.now())))}static create(e,t,r,n,s,i){return new Xs(e,t,r,n,s,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Xs.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function Ms(e,t){let r=[];for(let n=0,s=0;;){let i,o;if(n<e.length&&(s==t.length||t[s]>=e[n]))i=e[n++],o=e[n++];else{if(!(s<t.length))return r;i=t[s++],o=t[s++]}!r.length||r[r.length-1]<i?r.push(i,o):r[r.length-1]<o&&(r[r.length-1]=o)}}function Ds(e,t,r){var n;let s,i,o;return r?(s=t.changes,i=Un.empty(t.changes.length),o=e.changes.compose(t.changes)):(s=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(i):null===(n=e.selection)||void 0===n?void 0:n.map(s),effects:Rs.mapEffects(e.effects,s).concat(Rs.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Ls(e,t,r){let n=t.selection,s=qs(t.annotations);return t.userEvent&&(s=s.concat(Xs.userEvent.of(t.userEvent))),{changes:t.changes instanceof Un?t.changes:Un.of(t.changes||[],r,e.facet(_s)),selection:n&&(n instanceof ss?n:ss.single(n.anchor,n.head)),effects:qs(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}function Ys(e,t,r){let n=Ls(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(r=!1);for(let i=1;i<t.length;i++){!1===t[i].filter&&(r=!1);let s=!!t[i].sequential;n=Ds(n,Ls(e,t[i],s?n.changes.newLength:e.doc.length),s)}let s=Xs.create(e,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return function(e){let t=e.startState,r=t.facet(Ns),n=e;for(let s=r.length-1;s>=0;s--){let i=r[s](e);i&&Object.keys(i).length&&(n=Ds(n,Ls(t,i,e.changes.newLength),!0))}return n==e?e:Xs.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(r?function(e){let t=e.startState,r=!0;for(let s of t.facet(Cs)){let t=s(e);if(!1===t){r=!1;break}Array.isArray(t)&&(r=!0===r?t:Ms(r,t))}if(!0!==r){let n,s;if(!1===r)s=e.changes.invertedDesc,n=Un.empty(t.doc.length);else{let t=e.changes.filter(r);n=t.changes,s=t.filtered.mapDesc(t.changes).invertedDesc}e=Xs.create(t,n,e.selection&&e.selection.map(s),Rs.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}let n=t.facet(Ts);for(let s=n.length-1;s>=0;s--){let r=n[s](e);e=r instanceof Xs?r:Array.isArray(r)&&1==r.length&&r[0]instanceof Xs?r[0]:Ys(t,qs(r),!1)}return e}(s):s)}Xs.time=As.define(),Xs.userEvent=As.define(),Xs.addToHistory=As.define(),Xs.remote=As.define();const Is=[];function qs(e){return null==e?Is:Array.isArray(e)?e:[e]}var Vs=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Vs||(Vs={}));const Ws=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Bs;try{Bs=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Cx){}function Fs(e){return t=>{if(!/\S/.test(t))return Vs.Space;if(function(e){if(Bs)return Bs.test(e);for(let t=0;t<e.length;t++){let r=e[t];if(/\w/.test(r)||r>"Â"&&(r.toUpperCase()!=r.toLowerCase()||Ws.test(r)))return!0}return!1}(t))return Vs.Word;for(let r=0;r<e.length;r++)if(t.indexOf(e[r])>-1)return Vs.Word;return Vs.Other}}class Gs{constructor(e,t,r,n,s,i){this.config=e,this.doc=t,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,i&&(i._state=this);for(let o=0;o<this.config.dynamicSlots.length;o++)js(this,o<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(null!=r)return js(this,r),Qs(this,r);if(t)throw new RangeError("Field is not present in this state")}update(...e){return Ys(this,e,!0)}applyTransaction(e){let t,r=this.config,{base:n,compartments:s}=r;for(let o of e.effects)o.is(ws.reconfigure)?(r&&(s=new Map,r.compartments.forEach((e,t)=>s.set(t,e)),r=null),s.set(o.value.compartment,o.value.extension)):o.is(Rs.reconfigure)?(r=null,n=o.value):o.is(Rs.appendConfig)&&(r=null,n=qs(n).concat(o.value));if(r)t=e.startState.values.slice();else{r=ks.resolve(n,s,this),t=new Gs(r,this.doc,this.selection,r.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values}let i=e.startState.facet($s)?e.newSelection:e.newSelection.asSingle();new Gs(r,e.newDoc,i,t,(t,r)=>r.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ss.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),n=this.changes(r.changes),s=[r.range],i=qs(r.effects);for(let o=1;o<t.ranges.length;o++){let r=e(t.ranges[o]),a=this.changes(r.changes),l=a.map(n);for(let e=0;e<o;e++)s[e]=s[e].map(l);let c=n.mapDesc(a,!0);s.push(r.range.map(c)),n=n.compose(l),i=Rs.mapEffects(i,l).concat(Rs.mapEffects(qs(r.effects),c))}return{changes:n,selection:ss.create(s,t.mainIndex),effects:i}}changes(e=[]){return e instanceof Un?e:Un.of(e,this.doc.length,this.facet(Gs.lineSeparator))}toText(e){return En.of(e.split(this.facet(Gs.lineSeparator)||Bn))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(js(this,t),Qs(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let n=e[r];n instanceof fs&&null!=this.config.address[n.id]&&(t[r]=n.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(r)for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let t=r[s],i=e[s];n.push(t.init(e=>t.spec.fromJSON(i,e)))}return Gs.create({doc:e.doc,selection:ss.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=ks.resolve(e.extensions||[],new Map),r=e.doc instanceof En?e.doc:En.of((e.doc||"").split(t.staticFacet(Gs.lineSeparator)||Bn)),n=e.selection?e.selection instanceof ss?e.selection:ss.single(e.selection.anchor,e.selection.head):ss.single(0);return is(n,r.length),t.staticFacet($s)||(n=n.asSingle()),new Gs(t,r,n,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(Gs.tabSize)}get lineBreak(){return this.facet(Gs.lineSeparator)||"\n"}get readOnly(){return this.facet(Es)}phrase(e,...t){for(let r of this.facet(Gs.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,r)=>{if("$"==r)return"$";let n=+(r||1);return!n||n>t.length?e:t[n-1]})),e}languageDataAt(e,t,r=-1){let n=[];for(let s of this.facet(Ps))for(let i of s(this,t,r))Object.prototype.hasOwnProperty.call(i,e)&&n.push(i[e]);return n}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return Fs(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),i=e-r,o=e-r;for(;i>0;){let e=In(t,i,!1);if(s(t.slice(e,i))!=Vs.Word)break;i=e}for(;o<n;){let e=In(t,o);if(s(t.slice(o,e))!=Vs.Word)break;o=e}return i==o?null:ss.range(i+r,o+r)}}function Us(e,t,r={}){let n={};for(let s of e)for(let e of Object.keys(s)){let t=s[e],i=n[e];if(void 0===i)n[e]=t;else if(i===t||void 0===t);else{if(!Object.hasOwnProperty.call(r,e))throw new Error("Config merge conflict for field "+e);n[e]=r[e](i,t)}}for(let s in t)void 0===n[s]&&(n[s]=t[s]);return n}Gs.allowMultipleSelections=$s,Gs.tabSize=as.define({combine:e=>e.length?e[0]:4}),Gs.lineSeparator=_s,Gs.readOnly=Es,Gs.phrases=as.define({compare(e,t){let r=Object.keys(e),n=Object.keys(t);return r.length==n.length&&r.every(r=>e[r]==t[r])}}),Gs.languageData=Ps,Gs.changeFilter=Cs,Gs.transactionFilter=Ts,Gs.transactionExtender=Ns,ws.reconfigure=Rs.define();class Hs{eq(e){return this==e}range(e,t=e){return Js.create(e,t,this)}}function Ks(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}Hs.prototype.startSide=Hs.prototype.endSide=0,Hs.prototype.point=!1,Hs.prototype.mapMode=Fn.TrackDel;let Js=class e{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(t,r,n){return new e(t,r,n)}};function ei(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class ti{constructor(e,t,r,n){this.from=e,this.to=t,this.value=r,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,n=0){let s=r?this.to:this.from;for(let i=n,o=s.length;;){if(i==o)return i;let n=i+o>>1,a=s[n]-e||(r?this.value[n].endSide:this.value[n].startSide)-t;if(n==i)return a>=0?i:o;a>=0?o=n:i=n+1}}between(e,t,r,n){for(let s=this.findIndex(t,-1e9,!0),i=this.findIndex(r,1e9,!1,s);s<i;s++)if(!1===n(this.from[s]+e,this.to[s]+e,this.value[s]))return!1}map(e,t){let r=[],n=[],s=[],i=-1,o=-1;for(let a=0;a<this.value.length;a++){let l,c,d=this.value[a],h=this.from[a]+e,u=this.to[a]+e;if(h==u){let e=t.mapPos(h,d.startSide,d.mapMode);if(null==e)continue;if(l=c=e,d.startSide!=d.endSide&&(c=t.mapPos(h,d.endSide),c<l))continue}else if(l=t.mapPos(h,d.startSide),c=t.mapPos(u,d.endSide),l>c||l==c&&d.startSide>0&&d.endSide<=0)continue;(c-l||d.endSide-d.startSide)<0||(i<0&&(i=l),d.point&&(o=Math.max(o,c-l)),r.push(d),n.push(l-i),s.push(c-i))}return{mapped:r.length?new ti(n,s,r,o):null,pos:i}}}class ri{constructor(e,t,r,n){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=n}static create(e,t,r,n){return new ri(e,t,r,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:n=0,filterTo:s=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(r&&(t=t.slice().sort(ei)),this.isEmpty)return t.length?ri.of(t):this;let o=new ii(this,null,-1).goto(0),a=0,l=[],c=new ni;for(;o.value||a<t.length;)if(a<t.length&&(o.from-t[a].from||o.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(o.chunkIndex)<t[a].from)&&(!i||n>this.chunkEnd(o.chunkIndex)||s<this.chunkPos[o.chunkIndex])&&c.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!i||n>o.to||s<o.from||i(o.from,o.to,o.value))&&(c.addInner(o.from,o.to,o.value)||l.push(Js.create(o.from,o.to,o.value))),o.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?ri.empty:this.nextLayer.update({add:l,filter:i,filterFrom:n,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],n=-1;for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i],a=e.touchesRange(s,s+o.length);if(!1===a)n=Math.max(n,o.maxPoint),t.push(o),r.push(e.mapPos(s));else if(!0===a){let{mapped:i,pos:a}=o.map(s,e);i&&(n=Math.max(n,i.maxPoint),t.push(i),r.push(a))}}let s=this.nextLayer.map(e);return 0==t.length?s:new ri(r,t,s||ri.empty,n)}between(e,t,r){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let s=this.chunkPos[n],i=this.chunk[n];if(t>=s&&e<=s+i.length&&!1===i.between(s,e-s,t-s,r))return}this.nextLayer.between(e,t,r)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,r,n,s=-1){let i=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s),a=si(i,o,r),l=new li(i,a,s),c=new li(o,a,s);r.iterGaps((e,t,r)=>ci(l,e,c,t,r,n)),r.empty&&0==r.length&&ci(l,0,c,0,0,n)}static eq(e,t,r=0,n){null==n&&(n=999999999);let s=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),i=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(s.length!=i.length)return!1;if(!s.length)return!0;let o=si(s,i),a=new li(s,o,0).goto(r),l=new li(i,o,0).goto(r);for(;;){if(a.to!=l.to||!di(a.active,l.active)||a.point&&(!l.point||!Ks(a.point,l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,r,n,s=-1){let i=new li(e,null,s).goto(t),o=t,a=i.openStart;for(;;){let e=Math.min(i.to,r);if(i.point){let r=i.activeForPoint(i.to),s=i.pointFrom<t?r.length+1:i.point.startSide<0?r.length:Math.min(r.length,a);n.point(o,e,i.point,r,s,i.pointRank),a=Math.min(i.openEnd(e),r.length)}else e>o&&(n.span(o,e,i.active,a),a=i.openEnd(e));if(i.to>r)return a+(i.point&&i.to>r?1:0);o=i.to,i.next()}}static of(e,t=!1){let r=new ni;for(let n of e instanceof Js?[e]:t?function(e){if(e.length>1)for(let t=e[0],r=1;r<e.length;r++){let n=e[r];if(ei(t,n)>0)return e.slice().sort(ei);t=n}return e}(e):e)r.add(n.from,n.to,n.value);return r.finish()}static join(e){if(!e.length)return ri.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let n=e[r];n!=ri.empty;n=n.nextLayer)t=new ri(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}}ri.empty=new ri([],[],null,-1),ri.empty.nextLayer=ri.empty;class ni{finishChunk(e){this.chunks.push(new ti(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new ni)).add(e,t,r)}addInner(e,t,r){let n=e-this.lastTo||r.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(ri.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=ri.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function si(e,t,r){let n=new Map;for(let i of e)for(let e=0;e<i.chunk.length;e++)i.chunk[e].maxPoint<=0&&n.set(i.chunk[e],i.chunkPos[e]);let s=new Set;for(let i of t)for(let e=0;e<i.chunk.length;e++){let t=n.get(i.chunk[e]);null==t||(r?r.mapPos(t):t)!=i.chunkPos[e]||(null==r?void 0:r.touchesRange(t,t+i.chunk[e].length))||s.add(i.chunk[e])}return s}class ii{constructor(e,t,r,n=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class oi{constructor(e){this.heap=e}static from(e,t=null,r=-1){let n=[];for(let s=0;s<e.length;s++)for(let i=e[s];!i.isEmpty;i=i.nextLayer)i.maxPoint>=r&&n.push(new ii(i,t,r,s));return 1==n.length?n[0]:new oi(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)ai(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)ai(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ai(this.heap,0)}}}function ai(e,t){for(let r=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let s=e[n];if(n+1<e.length&&s.compare(e[n+1])>=0&&(s=e[n+1],n++),r.compare(s)<0)break;e[n]=r,e[t]=s,t=n}}class li{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=oi.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){hi(this.active,e),hi(this.activeTo,e),hi(this.activeRank,e),this.minActive=pi(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:n,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||n-this.activeTo[t])>0;)t++;ui(this.active,t,r),ui(this.activeTo,t,n),ui(this.activeRank,t,s),e&&ui(e,t,this.cursor.from),this.minActive=pi(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),r&&hi(r,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(r),this.cursor.next()}}}if(r){this.openStart=0;for(let t=r.length-1;t>=0&&r[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function ci(e,t,r,n,s,i){e.goto(t),r.goto(n);let o=n+s,a=n,l=n-t,c=!!i.boundChange;for(let d=!1;;){let t=e.to+l-r.to,n=t||e.endSide-r.endSide,s=n<0?e.to+l:r.to,h=Math.min(s,o);if(e.point||r.point?(e.point&&r.point&&Ks(e.point,r.point)&&di(e.activeForPoint(e.to),r.activeForPoint(r.to))||i.comparePoint(a,h,e.point,r.point),d=!1):(d&&i.boundChange(a),h>a&&!di(e.active,r.active)&&i.compareRange(a,h,e.active,r.active),c&&h<o&&(t||e.openEnd(s)!=r.openEnd(s))&&(d=!0)),s>o)break;a=s,n<=0&&e.next(),n>=0&&r.next()}}function di(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r]&&!Ks(e[r],t[r]))return!1;return!0}function hi(e,t){for(let r=t,n=e.length-1;r<n;r++)e[r]=e[r+1];e.pop()}function ui(e,t,r){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=r}function pi(e,t){let r=-1,n=1e9;for(let s=0;s<t.length;s++)(t[s]-n||e[s].endSide-e[r].endSide)<0&&(r=s,n=t[s]);return r}function fi(e,t,r=e.length){let n=0;for(let s=0;s<r&&s<e.length;)9==e.charCodeAt(s)?(n+=t-n%t,s++):(n++,s=In(e,s));return n}const mi="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),gi="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Oi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class xi{constructor(e,t){this.rules=[];let{finish:r}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function s(e,t,i,o){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let r in t){let o=t[r];if(/&/.test(r))s(r.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,i);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+r+") should be a primitive value.");s(n(r),o,a,c)}else null!=o&&a.push(r.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(a.length||c)&&i.push((!r||l||o?e:e.map(r)).join(", ")+" {"+a.join(" ")+"}")}for(let i in e)s(n(i),e[i],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Oi[mi]||1;return Oi[mi]=e+1,"ͼ"+e.toString(36)}static mount(e,t,r){let n=e[gi],s=r&&r.nonce;n?s&&n.setNonce(s):n=new vi(e,s),n.mount(Array.isArray(t)?t:[t],e)}}let bi=new Map;class vi{constructor(e,t){let r=e.ownerDocument||e,n=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=bi.get(r);if(t)return e[gi]=t;this.sheet=new n.CSSStyleSheet,bi.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[gi]=this}mount(e,t){let r=this.sheet,n=0,s=0;for(let i=0;i<e.length;i++){let t=e[i],o=this.modules.indexOf(t);if(o<s&&o>-1&&(this.modules.splice(o,1),s--,o=-1),-1==o){if(this.modules.splice(s++,0,t),r)for(let e=0;e<t.rules.length;e++)r.insertRule(t.rules[e],n++)}else{for(;s<o;)n+=this.modules[s++].rules.length;n+=t.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let r=t.head||t;this.styleTag.parentNode!=r&&r.insertBefore(this.styleTag,r.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var yi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},wi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Si="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ki="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ji=0;ji<10;ji++)yi[48+ji]=yi[96+ji]=String(ji);for(ji=1;ji<=24;ji++)yi[ji+111]="F"+ji;for(ji=65;ji<=90;ji++)yi[ji]=String.fromCharCode(ji+32),wi[ji]=String.fromCharCode(ji);for(var Qi in yi)wi.hasOwnProperty(Qi)||(wi[Qi]=yi[Qi]);let Pi="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},$i="undefined"!=typeof document?document:{documentElement:{style:{}}};const _i=/Edge\/(\d+)/.exec(Pi.userAgent),Ci=/MSIE \d/.test(Pi.userAgent),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pi.userAgent),Ni=!!(Ci||Ti||_i),Ei=!Ni&&/gecko\/(\d+)/i.test(Pi.userAgent),Ai=!Ni&&/Chrome\/(\d+)/.exec(Pi.userAgent),zi="webkitFontSmoothing"in $i.documentElement.style,Zi=!Ni&&/Apple Computer/.test(Pi.vendor),Ri=Zi&&(/Mobile\/\w+/.test(Pi.userAgent)||Pi.maxTouchPoints>2);var Xi={mac:Ri||/Mac/.test(Pi.platform),windows:/Win/.test(Pi.platform),linux:/Linux|X11/.test(Pi.platform),ie:Ni,ie_version:Ci?$i.documentMode||6:Ti?+Ti[1]:_i?+_i[1]:0,gecko:Ei,gecko_version:Ei?+(/Firefox\/(\d+)/.exec(Pi.userAgent)||[0,0])[1]:0,chrome:!!Ai,chrome_version:Ai?+Ai[1]:0,ios:Ri,android:/Android\b/.test(Pi.userAgent),webkit_version:zi?+(/\bAppleWebKit\/(\d+)/.exec(Pi.userAgent)||[0,0])[1]:0,safari:Zi,safari_version:Zi?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Pi.userAgent)||[0,0])[1]:0,tabSize:null!=$i.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function Mi(e,t){for(let r in e)"class"==r&&t.class?t.class+=" "+e.class:"style"==r&&t.style?t.style+=";"+e.style:t[r]=e[r];return t}const Di=Object.create(null);function Li(e,t,r){if(e==t)return!0;e||(e=Di),t||(t=Di);let n=Object.keys(e),s=Object.keys(t);if(n.length-0!=s.length-0)return!1;for(let i of n)if(i!=r&&(-1==s.indexOf(i)||e[i]!==t[i]))return!1;return!0}function Yi(e,t,r){let n=!1;if(t)for(let s in t)r&&s in r||(n=!0,"style"==s?e.style.cssText="":e.removeAttribute(s));if(r)for(let s in r)t&&t[s]==r[s]||(n=!0,"style"==s?e.style.cssText=r[s]:e.setAttribute(s,r[s]));return n}function Ii(e){let t=Object.create(null);for(let r=0;r<e.attributes.length;r++){let n=e.attributes[r];t[n.name]=n.value}return t}class qi{eq(e){return!1}updateDOM(e,t,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Vi=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Vi||(Vi={}));class Wi extends Hs{constructor(e,t,r,n){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=n}get heightRelevant(){return!1}static mark(e){return new Bi(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Gi(e,t,t,r,e.widget||null,!1)}static replace(e){let t,r,n=!!e.block;if(e.isBlockGap)t=-5e8,r=4e8;else{let{start:s,end:i}=Ui(e,n);t=(s?n?-3e8:-1:5e8)-1,r=1+(i?n?2e8:1:-6e8)}return new Gi(e,t,r,n,e.widget||null,!0)}static line(e){return new Fi(e)}static set(e,t=!1){return ri.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Wi.none=ri.empty;class Bi extends Wi{constructor(e){let{start:t,end:r}=Ui(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Mi(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Di}eq(e){return this==e||e instanceof Bi&&this.tagName==e.tagName&&Li(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Bi.prototype.point=!1;class Fi extends Wi{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Fi&&this.spec.class==e.spec.class&&Li(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Fi.prototype.mapMode=Fn.TrackBefore,Fi.prototype.point=!0;class Gi extends Wi{constructor(e,t,r,n,s,i){super(t,r,s,e),this.block=n,this.isReplace=i,this.mapMode=n?t<=0?Fn.TrackBefore:Fn.TrackAfter:Fn.TrackDel}get type(){return this.startSide!=this.endSide?Vi.WidgetRange:this.startSide<=0?Vi.WidgetBefore:Vi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Gi&&(t=this.widget,r=e.widget,t==r||!!(t&&r&&t.compare(r)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,r}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Ui(e,t=!1){let{inclusiveStart:r,inclusiveEnd:n}=e;return null==r&&(r=e.inclusive),null==n&&(n=e.inclusive),{start:null!=r?r:t,end:null!=n?n:t}}function Hi(e,t,r,n=0){let s=r.length-1;s>=0&&r[s]+n>=e?r[s]=Math.max(r[s],t):r.push(e,t)}Gi.prototype.point=!0;class Ki extends Hs{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Ki&&this.tagName==e.tagName&&Li(this.attributes,e.attributes)}static create(e){return new Ki(e.tagName,e.attributes||Di)}static set(e,t=!1){return ri.of(e,t)}}function Ji(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function eo(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function to(e,t){if(!t.anchorNode)return!1;try{return eo(e,t.anchorNode)}catch(Cx){return!1}}function ro(e){return 3==e.nodeType?Oo(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function no(e,t,r,n){return!!r&&(oo(e,t,r,n,-1)||oo(e,t,r,n,1))}function so(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function io(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function oo(e,t,r,n,s){for(;;){if(e==r&&t==n)return!0;if(t==(s<0?0:ao(e))){if("DIV"==e.nodeName)return!1;let r=e.parentNode;if(!r||1!=r.nodeType)return!1;t=so(e)+(s<0?0:1),e=r}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(s<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=s<0?ao(e):0}}}function ao(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function lo(e,t){let r=t?e.left:e.right;return{left:r,right:r,top:e.top,bottom:e.bottom}}function co(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function ho(e,t){let r=t.width/e.offsetWidth,n=t.height/e.offsetHeight;return(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.width-e.offsetWidth)<1)&&(r=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.height-e.offsetHeight)<1)&&(n=1),{scaleX:r,scaleY:n}}function uo(e,t=!0){let r=e.ownerDocument,n=null,s=null;for(let i=e.parentNode;i&&(i!=r.body&&(t&&!n||!s));)if(1==i.nodeType)!s&&i.scrollHeight>i.clientHeight&&(s=i),t&&!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:n,y:s}}Ki.prototype.startSide=Ki.prototype.endSide=-1;class po{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?ao(t):0),r,Math.min(e.focusOffset,r?ao(r):0))}set(e,t,r,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=n}}let fo,mo=null;function go(e){if(e.setActive)return e.setActive();if(mo)return e.focus(mo);let t=[];for(let r=e;r&&(t.push(r,r.scrollTop,r.scrollLeft),r!=r.ownerDocument);r=r.parentNode);if(e.focus(null==mo?{get preventScroll(){return mo={preventScroll:!0},!0}}:void 0),!mo){mo=!1;for(let e=0;e<t.length;){let r=t[e++],n=t[e++],s=t[e++];r.scrollTop!=n&&(r.scrollTop=n),r.scrollLeft!=s&&(r.scrollLeft=s)}}}function Oo(e,t,r=t){let n=fo||(fo=document.createRange());return n.setEnd(e,r),n.setStart(e,t),n}function xo(e,t,r,n){let s={key:t,code:t,keyCode:r,which:r,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let i=new KeyboardEvent("keydown",s);i.synthetic=!0,e.dispatchEvent(i);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function bo(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function vo(e,t){for(let r=e,n=t;;){if(3==r.nodeType&&n>0)return{node:r,offset:n};if(1==r.nodeType&&n>0){if("false"==r.contentEditable)return null;r=r.childNodes[n-1],n=ao(r)}else{if(!r.parentNode||io(r))return null;n=so(r),r=r.parentNode}}}function yo(e,t){for(let r=e,n=t;;){if(3==r.nodeType&&n<r.nodeValue.length)return{node:r,offset:n};if(1==r.nodeType&&n<r.childNodes.length){if("false"==r.contentEditable)return null;r=r.childNodes[n],n=0}else{if(!r.parentNode||io(r))return null;n=so(r)+1,r=r.parentNode}}}Xi.safari&&Xi.safari_version>=26&&(mo=!1);class wo{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new wo(e.parentNode,so(e),t)}static after(e,t){return new wo(e.parentNode,so(e)+1,t)}}var So=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(So||(So={}));const ko=So.LTR,jo=So.RTL;function Qo(e){let t=[];for(let r=0;r<e.length;r++)t.push(1<<+e[r]);return t}const Po=Qo("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),$o=Qo("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),_o=Object.create(null),Co=[];for(let Tx of["()","[]","{}"]){let e=Tx.charCodeAt(0),t=Tx.charCodeAt(1);_o[e]=t,_o[t]=-e}function To(e){return e<=247?Po[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?$o[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const No=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Eo{get dir(){return this.level%2?jo:ko}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,n){let s=-1;for(let i=0;i<e.length;i++){let o=e[i];if(o.from<=t&&o.to>=t){if(o.level==r)return i;(s<0||(0!=n?n<0?o.from<t:o.to>t:e[s].level>o.level))&&(s=i)}}if(s<0)throw new RangeError("Index out of range");return s}}function Ao(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],s=t[r];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!Ao(n.inner,s.inner))return!1}return!0}const zo=[];function Zo(e,t,r,n,s,i,o){let a=n%2?2:1;if(n%2==s%2)for(let l=t,c=0;l<r;){let t=!0,d=!1;if(c==i.length||l<i[c].from){let e=zo[l];e!=a&&(t=!1,d=16==e)}let h=t||1!=a?null:[],u=t?n:n+1,p=l;e:for(;;)if(c<i.length&&p==i[c].from){if(d)break e;let f=i[c];if(!t)for(let e=f.to,t=c+1;;){if(e==r)break e;if(!(t<i.length&&i[t].from==e)){if(zo[e]==a)break e;break}e=i[t++].to}if(c++,h)h.push(f);else{f.from>l&&o.push(new Eo(l,f.from,u)),Ro(e,f.direction==ko!=!(u%2)?n+1:n,s,f.inner,f.from,f.to,o),l=f.to}p=f.to}else{if(p==r||(t?zo[p]!=a:zo[p]==a))break;p++}h?Zo(e,l,p,n+1,s,h,o):l<p&&o.push(new Eo(l,p,u)),l=p}else for(let l=r,c=i.length;l>t;){let r=!0,d=!1;if(!c||l>i[c-1].to){let e=zo[l-1];e!=a&&(r=!1,d=16==e)}let h=r||1!=a?null:[],u=r?n:n+1,p=l;e:for(;;)if(c&&p==i[c-1].to){if(d)break e;let f=i[--c];if(!r)for(let e=f.from,r=c;;){if(e==t)break e;if(!r||i[r-1].to!=e){if(zo[e-1]==a)break e;break}e=i[--r].from}if(h)h.push(f);else{f.to<l&&o.push(new Eo(f.to,l,u)),Ro(e,f.direction==ko!=!(u%2)?n+1:n,s,f.inner,f.from,f.to,o),l=f.from}p=f.from}else{if(p==t||(r?zo[p-1]!=a:zo[p-1]==a))break;p--}h?Zo(e,p,l,n+1,s,h,o):p<l&&o.push(new Eo(p,l,u)),l=p}}function Ro(e,t,r,n,s,i,o){let a=t%2?2:1;!function(e,t,r,n,s){for(let i=0;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:r,l=i?256:s;for(let t=o,r=l,n=l;t<a;t++){let s=To(e.charCodeAt(t));512==s?s=r:8==s&&4==n&&(s=16),zo[t]=4==s?2:s,7&s&&(n=s),r=s}for(let e=o,t=l,n=l;e<a;e++){let s=zo[e];if(128==s)e<a-1&&t==zo[e+1]&&24&t?s=zo[e]=t:zo[e]=256;else if(64==s){let s=e+1;for(;s<a&&64==zo[s];)s++;let i=e&&8==t||s<r&&8==zo[s]?1==n?1:8:256;for(let t=e;t<s;t++)zo[t]=i;e=s-1}else 8==s&&1==n&&(zo[e]=1);t=s,7&s&&(n=s)}}}(e,s,i,n,a),function(e,t,r,n,s){let i=1==s?2:1;for(let o=0,a=0,l=0;o<=n.length;o++){let c=o?n[o-1].to:t,d=o<n.length?n[o].from:r;for(let t,r,n,o=c;o<d;o++)if(r=_o[t=e.charCodeAt(o)])if(r<0){for(let e=a-3;e>=0;e-=3)if(Co[e+1]==-r){let t=Co[e+2],r=2&t?s:4&t?1&t?i:s:0;r&&(zo[o]=zo[Co[e]]=r),a=e;break}}else{if(189==Co.length)break;Co[a++]=o,Co[a++]=t,Co[a++]=l}else if(2==(n=zo[o])||1==n){let e=n==s;l=e?0:1;for(let t=a-3;t>=0;t-=3){let r=Co[t+2];if(2&r)break;if(e)Co[t+2]|=2;else{if(4&r)break;Co[t+2]|=4}}}}}(e,s,i,n,a),function(e,t,r,n){for(let s=0,i=n;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:t;for(let l=o;l<a;){let o=zo[l];if(256==o){let o=l+1;for(;;)if(o==a){if(s==r.length)break;o=r[s++].to,a=s<r.length?r[s].from:t}else{if(256!=zo[o])break;o++}let c=1==i,d=c==(1==(o<t?zo[o]:n))?c?1:2:n;for(let t=o,n=s,i=n?r[n-1].to:e;t>l;)t==i&&(t=r[--n].from,i=n?r[n-1].to:e),zo[--t]=d;l=o}else i=o,l++}}}(s,i,n,a),Zo(e,s,i,t,r,n,o)}function Xo(e){return[new Eo(0,e,0)]}let Mo="";function Do(e,t,r,n,s){var i;let o=n.head-e.from,a=Eo.find(t,o,null!==(i=n.bidiLevel)&&void 0!==i?i:-1,n.assoc),l=t[a],c=l.side(s,r);if(o==c){let e=a+=s?1:-1;if(e<0||e>=t.length)return null;l=t[a=e],o=l.side(!s,r),c=l.side(s,r)}let d=In(e.text,o,l.forward(s,r));(d<l.from||d>l.to)&&(d=c),Mo=e.text.slice(Math.min(o,d),Math.max(o,d));let h=a==(s?t.length-1:0)?null:t[a+(s?1:-1)];return h&&d==c&&h.level+(s?0:1)<l.level?ss.cursor(h.side(!s,r)+e.from,h.forward(s,r)?1:-1,h.level):ss.cursor(d+e.from,l.forward(s,r)?-1:1,l.level)}function Lo(e,t,r){for(let n=t;n<r;n++){let t=To(e.charCodeAt(n));if(1==t)return ko;if(2==t||4==t)return jo}return ko}const Yo=as.define(),Io=as.define(),qo=as.define(),Vo=as.define(),Wo=as.define(),Bo=as.define(),Fo=as.define(),Go=as.define(),Uo=as.define(),Ho=as.define({combine:e=>e.some(e=>e)}),Ko=as.define({combine:e=>e.some(e=>e)}),Jo=as.define();class ea{constructor(e,t="nearest",r="nearest",n=5,s=5,i=!1){this.range=e,this.y=t,this.x=r,this.yMargin=n,this.xMargin=s,this.isSnapshot=i}map(e){return e.empty?this:new ea(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ea(ss.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ta=Rs.define({map:(e,t)=>e.map(t)}),ra=Rs.define();function na(e,t,r){let n=e.facet(Vo);n.length?n[0](t):window.onerror&&window.onerror(String(t),r,void 0,void 0,t)}const sa=as.define({combine:e=>!e.length||e[0]});let ia=0;const oa=as.define({combine:e=>e.filter((t,r)=>{for(let n=0;n<r;n++)if(e[n].plugin==t.plugin)return!1;return!0})});class aa{constructor(e,t,r,n,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=n,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(oa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(oa.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:n,provide:s,decorations:i}=t||{};return new aa(ia++,e,r,n,e=>{let t=[];return i&&t.push(ha.of(t=>{let r=t.plugin(e);return r?i(r):Wi.none})),s&&t.push(s(e)),t})}static fromClass(e,t){return aa.define((t,r)=>new e(t,r),t)}}class la{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(na(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(Cx){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){na(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(r){na(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ca=as.define(),da=as.define(),ha=as.define(),ua=as.define(),pa=as.define(),fa=as.define(),ma=as.define();function ga(e,t){let r=e.state.facet(ma);if(!r.length)return r;let n=r.map(t=>t instanceof Function?t(e):t),s=[];return ri.spans(n,t.from,t.to,{point(){},span(e,r,n,i){let o=e-t.from,a=r-t.from,l=s;for(let s=n.length-1;s>=0;s--,i--){let e,r=n[s].spec.bidiIsolate;if(null==r&&(r=Lo(t.text,o,a)),i>0&&l.length&&(e=l[l.length-1]).to==o&&e.direction==r)e.to=a,l=e.inner;else{let e={from:o,to:a,direction:r,inner:[]};l.push(e),l=e.inner}}}}),s}const Oa=as.define();function xa(e){let t=0,r=0,n=0,s=0;for(let i of e.state.facet(Oa)){let o=i(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(r=Math.max(r,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(s=Math.max(s,o.bottom)))}return{left:t,right:r,top:n,bottom:s}}const ba=as.define();class va{constructor(e,t,r,n){this.fromA=e,this.toA=t,this.fromB=r,this.toB=n}join(e){return new va(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>
7r.toA)){if(n.toA<r.fromA)break;r=r.join(n),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(0==t.length)return e;let r=[];for(let n=0,s=0,i=0;;){let o=n<e.length?e[n].fromB:1e9,a=s<t.length?t[s]:1e9,l=Math.min(o,a);if(1e9==l)break;let c=l+i,d=l,h=c;for(;;)if(s<t.length&&t[s]<=d){let r=t[s+1];s+=2,d=Math.max(d,r);for(let t=n;t<e.length&&e[t].fromB<=d;t++)i=e[t].toA-e[t].toB;h=Math.max(h,r+i)}else{if(!(n<e.length&&e[n].fromB<=d))break;{let t=e[n++];d=Math.max(d,t.toB),h=Math.max(h,t.toA),i=t.toA-t.toB}}r.push(new va(c,h,l,d))}return r}}class ya{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Un.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges((e,t,r,s)=>n.push(new va(e,t,r,s))),this.changedRanges=n}static create(e,t,r){return new ya(e,t,r)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}const wa=[];class Sa{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return wa}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let r=e.attributes.length-1;r>=0;r--){let n=e.attributes[r].name;null==t[n]&&e.removeAttribute(n)}for(let r in t){let n=t[r];"style"==r?e.style.cssText=n:e.getAttribute(r)!=n&&e.setAttribute(r,n)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let n of this.children){if(n==e)return r;r+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=so(this.dom),n=this.length?e>0:t>0;return new wo(this.parent.dom,r+(n?1:0),0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Qa)return e;return null}static get(e){return e.cmTile}}class ka extends Sa{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t,r=this.dom,n=null,s=(null==e?void 0:e.node)==r?e:null,i=0;for(let o of this.children){if(o.sync(e),i+=o.length+o.breakAfter,t=n?n.nextSibling:r.firstChild,s&&t!=o.dom&&(s.written=!0),o.dom.parentNode==r)for(;t&&t!=o.dom;)t=ja(t);else r.insertBefore(o.dom,t);n=o.dom}for(t=n?n.nextSibling:r.firstChild,s&&t&&(s.written=!0);t;)t=ja(t);this.length=i}}function ja(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Qa extends ka{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Sa.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,n=0,s=0;;)if(n==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,n=t.pop()}else{let i=r.children[n++];if(i instanceof Pa)t.push(n),r=i,n=0;else{let t=s+i.length,r=e(i,s);if(void 0!==r)return r;s=t+i.breakAfter}}}resolveBlock(e,t){let r,n,s=-1,i=-1;
7if(this.blockTiles((o,a)=>{let l=a+o.length;if(e>=a&&e<=l){if(o.isWidget()&&t>=-1&&t<=1){if(32&o.flags)return!0;16&o.flags&&(r=void 0)}(a<e||e==l&&(t<-1?o.length:o.covers(1)))&&(!r||!o.isWidget()&&r.isWidget())&&(r=o,s=e-a),(l>e||e==a&&(t>1?o.length:o.covers(-1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,i=e-a)}}),!r&&!n)throw new Error("No tile at position "+e);return r&&t<0||!n?{tile:r,offset:s}:{tile:n,offset:i}}}class Pa extends ka{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Pa(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class $a extends ka{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let n=new $a(t||document.createElement("div"),e);return t&&r||(n.flags|=4),n}get domAttrs(){return this.attrs}resolveInline(e,t,r){let n=null,s=-1,i=null,o=-1;!function e(a,l){for(let c=0,d=0;c<a.children.length&&d<=l;c++){let h=a.children[c],u=d+h.length;u>=l&&(h.isComposite()?e(h,l-d):(!i||i.isHidden&&(t>0||r&&_a(i,h)))&&(u>l||32&h.flags)?(i=h,o=l-d):(d<l||16&h.flags&&!h.isHidden)&&(n=h,s=l-d)),d=u}}(this,e);let a=(t<0?n:i)||n||i;return a?{tile:a,offset:a==n?s:o}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let r=ro(t);return r[r.length-1]||null}(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:e,offset:n}=r;if(this.dom.contains(e.dom))return e.isText()?new wo(e.dom,Math.min(e.dom.nodeValue.length,n)):e.domPosFor(n,16&e.flags?1:32&e.flags?-1:t);let s=r.tile.parent,i=!1;for(let t of s.children){if(i)return new wo(t.dom,0);t==r.tile&&(i=!0)}}return new wo(this.dom,0)}}function _a(e,t){let r=e.coordsIn(0,1),n=t.coordsIn(0,1);return r&&n&&n.top<r.bottom}class Ca extends ka{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new Ca(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Ta extends Sa{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let n=e,s=e,i=0;0==e&&t<0||e==r&&t>=0?Xi.chrome||Xi.gecko||(e?(n--,i=1):s<r&&(s++,i=-1)):t<0?n--:s<r&&s++;let o=Oo(this.dom,n,s).getClientRects();if(!o.length)return null;let a=o[(i?i<0:t>=0)?0:o.length-1];return Xi.safari&&!i&&0==a.width&&(a=Array.prototype.find.call(o,e=>e.width)||a),i?lo(a,i<0):a||null}static of(e,t){let r=new Ta(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Na extends Sa{constructor(e,t,r,n){super(e,t,n),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;if(r)return lo(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),r=null;if(!t.length)return null;let n=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let s=n?t.length-1:0;r=t[s],!(e>0?0==s:s==t.length-1||r.top<r.bottom);s+=n?-1:1);return lo(r,!n)}}get overrideDOMText(){if(!this.length)return En.empty;let{root:e}=this;if(!e)return En.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,n,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Na(s,r,e,n)}}class Ea extends Sa{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return En.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class Aa{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:n,index:s,beforeBreak:i,parents:o}=this;for(;e||t>0;)if(n.isComposite())if(i){if(!e)break;r&&r.break(),e--,i=!1}else if(s==n.children.length){if(!e&&!o.length)break;r&&r.leave(n),i=!!n.breakAfter,({tile:n,index:s}=o.pop()),s++}else{let a=n.children[s],l=a.breakAfter;!(t>
70?a.length<=e:a.length<e)||r&&!1===r.skip(a,0,a.length)&&a.isComposite?(o.push({tile:n,index:s}),n=a,s=0,r&&a.isComposite()&&r.enter(a)):(i=!!l,s++,e-=a.length)}else if(s==n.length)i=!!n.breakAfter,({tile:n,index:s}=o.pop()),s++;else{if(!e)break;{let t=Math.min(e,n.length-s);r&&r.skip(n,s,s+t),e-=t,s+=t}}return this.tile=n,this.index=s,this.beforeBreak=i,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class za{constructor(e,t,r,n){this.from=e,this.to=t,this.wrapper=r,this.rank=n}}class Za{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,n){var s;this.flushBuffer();let i=this.ensureMarks(t,r),o=i.lastChild;if(o&&o.isText()&&!(8&o.flags)&&o.length+e.length<512){this.cache.reused.set(o,2),(i.children[i.children.length-1]=new Ta(o.dom,o.text+e)).parent=i}else i.append(n||Ta.of(e,null===(s=this.cache.find(Ta))||void 0===s?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?Ia(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let n=r;for(let o=t.marks.length-1;o>=0;o--){let e=t.marks[o],r=n.lastChild;if(r instanceof Ca&&r.mark.eq(e.mark))r.dom!=e.dom&&r.setDOM(Ia(e.dom)),n=r;else{if(this.cache.reused.get(e)){let t=Sa.get(e.dom);t&&t.setDOM(Ia(e.dom))}let t=Ca.of(e.mark,e.dom);n.append(t),n=t}this.cache.reused.set(e,2)}let s=Sa.get(e.text);s&&this.cache.reused.set(s,2);let i=new Ta(e.text,e.text.nodeValue);i.flags|=8,n.append(i)}addInlineWidget(e,t,r){let n=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);n||this.flushBuffer();let s=this.ensureMarks(t,r);n||16&e.flags||s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){(this.afterWidget||this.lastBlock).length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=Ya);let n=$a.start(e,t||(null===(r=this.cache.find($a))||void 0===r?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let n=this.curLine;for(let s=e.length-1;s>=0;s--){let i,o=e[s];if(t>0&&(i=n.lastChild)&&i instanceof Ca&&i.mark.eq(o))n=i,t--;else{let e=Ca.of(o,null===(r=this.cache.find(Ca,e=>e.mark.eq(o)))||void 0===r?void 0:r.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;e&&La(this.curLine,!1)&&("BR"==e.dom.nodeName||!e.isWidget()||Xi.ios&&La(this.curLine,!0))||this.curLine.append(this.cache.findWidget(Va,0,32)||new Na(Va.toDOM(),0,Va,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new za(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let n=t.lastChild;if(r.from<this.pos&&n instanceof Pa&&n.wrapper.eq(r.wrapper))t=n;else{let n=Pa.of(r.wrapper,null===(e=this.cache.find(Pa,e=>e.wrapper.eq(r.wrapper)))||void 0===e?void 0:e.dom);t.append(n),t=n}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(Ea,void 0,1);return r&&(r.flags=t),r||new Ea(t)}flushBuffer(){!this.afterWidget||32&this.afterWidget.flags||(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class Ra{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:r,done:n}=this.cursor.next(this.skipCount);if(this.skipCount=0,n)throw new Error("Ran out of text content when drawing inline views");this.text=t;let s=this.textOff=Math.min(e,t.length);return r?null:t.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Xa=[Na,$a,Ta,Ca,Ea,Pa,Qa];for(let Tx=0;Tx<Xa.length;Tx++)Xa[Tx].bucket=Tx;class Ma{constructor(e){this.view=e,this.buckets=Xa.map(()=>[]),this.index=Xa.map(()=>0),this.reused=new Map}
7add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let n=e.bucket,s=this.buckets[n],i=this.index[n];for(let o=s.length-1;o>=0;o--){let e=(o+i)%s.length,a=s[e];if((!t||t(a))&&!this.reused.has(a))return s.splice(e,1),e<i&&this.index[n]--,this.reused.set(a,r),a}return null}findWidget(e,t,r){let n=this.buckets[0];if(n.length)for(let s=0,i=0;;s++){if(s==n.length){if(i)return null;i=1,s=0}let o=n[s];if(!this.reused.has(o)&&(0==i?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return n.splice(s,1),s<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(497&o.flags)==r?(this.reused.set(o,1),o):(this.reused.set(o,2),new Na(o.dom,t,e,-498&o.flags|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class Da{constructor(e,t,r,n,s){this.view=e,this.decorations=n,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new Ma(e),this.text=new Ra(e.state.doc),this.builder=new Za(this.cache,new Qa(e,e.contentDOM),ri.iter(r)),this.cache.reused.set(t,2),this.old=new Aa(t),this.reuseWalker={skip:(e,t,r)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let n=0,s=0,i=0;;){let o=i<e.length?e[i++]:null,a=o?o.fromA:this.old.root.length;if(a>n){let e=a-n;this.preserve(e,!i,!o),n=a,s+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(s,o.toB)),s=o.toB,n=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let n=function(e){let t=[];for(let r=e.parents.length;r>1;r--){let n=r==e.parents.length?e.tile:e.parents[r].tile;n instanceof Ca&&t.push(n.mark)}return t}(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(e,t,r)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(r-t);else{let i=r>0||t<e.length?Na.of(e.widget,this.view,r-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&i.flags?(i.flags&=-2,this.builder.addBlockWidget(i)):(this.builder.ensureLine(null),this.builder.addInlineWidget(i,n,s),s=n.length)}else if(e.isText())this.builder.ensureLine(null),t||r!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,r),n,s)):this.builder.addText(e.text,n,s,this.cache.reuse(e)),s=n.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof Ea)this.cache.add(e);else{if(!(e instanceof Ca))return!1;this.builder.ensureLine(null),this.builder.addMark(e,n,s),this.cache.reused.set(e,1),s=n.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof Ca&&n.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?n.length&&(n.length=s=0):e instanceof Ca&&(n.shift(),s=Math.min(s,n.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,n=this.builder,s=0,i=ri.spans(this.decorations,e,t,{point:(e,t,i,o,a,l)=>{if(i instanceof Gi){if(this.disallowBlockEffectsFor[l]){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=o.length,a>o.length)n.continueWidget(t-e);else{let s=i.widget||(i.block?qa.block:qa.inline),l=function(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;e.block&&(t|=256);return t}(i),c=this.cache.findWidget(s,t-e,l)||Na.of(s,this.view,t-e,l);i.block?(i.startSide>0&&n.addLineStartIfNotCovered(r),n.addBlockWidget(c)):(n.ensureLine(r),n.addInlineWidget(c,o,a))}r=null}else r=function(e,t){let r=t.spec.attributes,n=t.spec.class;if(!r&&!n)return e;e||(e={class:"cm-line"});r&&Mi(r,e);n&&(e.class+=" "+n);return e}(r,i);t>e&&this.text.skip(t-e)},span:(e,t,s,i)=>{for(let o=e;o<t;){let a=this.text.next(Math.min(512,t-o));null==a?(n.addLineStartIfNotCovered(r),n.addBreak(),o++):(n.ensureLine(r),n.addText(a,s,o==e?i:s.length),o+=a.length),r=null}}});n.addLineStartIfNotCovered(r),this.openWidget=i>s,this.openMarks=i}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let n=e.parentNode;;n=n.parentNode){let e=Sa.get(n);if(n==this.view.contentDOM)break;e instanceof Ca?t.push(e):(null==e?void 0:e.isLine())?r=e:e instanceof Pa||("DIV"!=n.nodeName||r||n==this.view.contentDOM?r||t.push(Ca.of(new Bi({tagName:n.nodeName.toLowerCase(),attributes:Ii(n)}),n)):r=new $a(n,Ya))}return{line:r,marks:t}}}function La(e,t){let r=e=>{for(let n of e.children)if((t?n.isText():n.length)||r(n))return!0;return!1};return r(e)}const Ya={class:"cm-line"};function Ia(e){let t=Sa.get(e);return t&&t.setDOM(e.cloneNode()),e}class qa extends qi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}
7updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}qa.inline=new qa("span"),qa.block=new qa("div");const Va=new class extends qi{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Wa{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Wi.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Qa(e,e.contentDOM),this.updateInner([new va(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?n=this.domChanged.newSel.head:function(e,t){let r=!1;t&&e.iterChangedRanges((e,n)=>{e<t.to&&n>t.from&&(r=!0)});return r}(e.changes,this.hasComposition)||e.selectionSet||(n=e.state.selection.main.head));let s=n>-1?function(e,t,r){let n=Fa(e,r);if(!n)return null;let{node:s,from:i,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(n.from,n.to)!=a)return null;let l=t.invertedDesc;return{range:new va(l.mapPos(i),l.mapPos(o),i,o),text:s}}(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:n}=this.hasComposition;r=new va(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Xi.ie||Xi.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,o=this.blockWrappers;this.updateDeco();let a=function(e,t,r){let n=new Ga;return ri.compare(e,t,r,n),n.changes}(i,this.decorations,e.changes);a.length&&(r=va.extendWithRanges(r,a));let l=function(e,t,r){let n=new Ua;return ri.compare(e,t,r,n),n.changes}(o,this.blockWrappers,e.changes);return l.length&&(r=va.extendWithRanges(r,l)),s&&!r.some(e=>e.fromA<=s.range.fromA&&e.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),!(2&this.tile.flags&&0==r.length)&&(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let r=this.tile,n=new Da(this.view,r,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Sa.get(t.text)&&n.cache.reused.set(Sa.get(t.text),2),this.tile=n.run(e,t),Ba(r,n.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let n=Xi.chrome||Xi.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(n),!n||!n.written&&r.selectionRange.focusNode==n.node&&this.tile.dom.contains(n.node)||(this.forceSelection=!0),this.tile.dom.style.height=""});let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof Ha&&n.push(s.dom);r.updateGaps(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(ra)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let{dom:r}=this.tile,n=this.view.root.activeElement,s=n==r,i=!s&&!(this.view.state.facet(sa)||r.tabIndex>-1)&&to(r,this.view.observer.selectionRange)&&!(n&&r.contains(n));if(!(s||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let a,l,c=this.view.state.selection.main;if(c.empty?l=a=this.inlineDOMNearPos(c.anchor,c.assoc||1):(l=this.inl
vendor: 1,601 bytes, line 7
7ineDOMNearPos(c.head,c.head==c.from?1:-1),a=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),Xi.gecko&&c.empty&&!this.hasComposition&&(1==(d=a).node.nodeType&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new wo(e,0),o=!0}var d;let h=this.view.observer.selectionRange;!o&&h.focusNode&&(no(a.node,a.offset,h.anchorNode,h.anchorOffset)&&no(l.node,l.offset,h.focusNode,h.focusOffset)||this.suppressWidgetCursorChange(h,c))||(this.view.observer.ignore(()=>{Xi.android&&Xi.chrome&&r.contains(h.focusNode)&&function(e,t){for(let r=e;r&&r!=t;r=r.assignedSlot||r.parentNode)if(1==r.nodeType&&"false"==r.contentEditable)return!0;return!1}(h.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let e=Ji(this.view.root);if(e)if(c.empty){if(Xi.gecko){let e=(t=a.node,s=a.offset,1!=t.nodeType?0:(s&&"false"==t.childNodes[s-1].contentEditable?1:0)|(s<t.childNodes.length&&"false"==t.childNodes[s].contentEditable?2:0));if(e&&3!=e){let t=(1==e?vo:yo)(a.node,a.offset);t&&(a=new wo(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=c.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=c.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(Cx){}}else{let t=document.createRange();c.anchor>c.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}
vendor: 4,779 bytes, line 7
7else;var t,s;i&&this.view.root.activeElement==r&&(r.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new wo(h.anchorNode,h.anchorOffset),this.impreciseHead=l.precise?null:new wo(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&no(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ji(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!(r&&t.empty&&t.assoc&&r.modify))return;let i=this.lineAt(t.head,t.assoc);if(!i)return;let o=i.posAtStart;if(t.head==o||t.head==o+i.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(c.node,c.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=t.from&&r.collapse(n,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let n=r.posAtStart;if(!r.isComposite())return r.isText()?e==r.dom?n+t:n+(t?r.length:0):n;{let s;if(e==r.dom)s=r.dom.childNodes[t];else{let n=0==ao(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==r.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}s=n<0?e:e.nextSibling}if(s==r.dom.firstChild)return n;for(;s&&!Sa.get(s);)s=s.nextSibling;if(!s)return n+r.length;for(let e=0,t=n;;e++){let n=r.children[e];if(n.dom==s)return t;t+=n.length+n.breakAfter}}}domAtPos(e,t){let{tile:r,offset:n}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(n,t)}inlineDOMNearPos(e,t){let r,n,s=-1,i=!1,o=-1,a=!1;return this.tile.blockTiles((t,l)=>{if(t.isWidget()){if(32&t.flags&&l>=e)return!0;16&t.flags&&(i=!0)}else{let c=l+t.length;if(l<=e&&(r=t,s=e-l,i=c<e),c>=e&&!n&&(n=t,o=e-l,a=l>e),l>e&&n)return!0}}),r||n?(i&&n?r=null:a&&r&&(n=null),r&&t<0||!n?r.domIn(s,t):n.domIn(o,t)):this.domAtPos(e,t)}coordsAt(e,t){let{tile:r,offset:n}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof Ha?null:r.coordsInWidget(n,t,!0):r.coordsIn(n,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;return function e(t,r){if(t.isComposite())for(let n of t.children){if(n.length>=r){let t=e(n,r);if(t)return t}if((r-=n.length)<0)break}else if(t.isText()&&r<t.length){let e=In(t.text,r);if(e==r)return null;let n=Oo(t.dom,r,e).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}}return null}(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:n}=e,s=this.view.contentDOM.clientWidth,i=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==So.LTR,l=0,c=(e,d,h)=>{for(let u=0;u<e.children.length&&!(d>n);u++){let n=e.children[u],p=d+n.length,f=n.dom.getBoundingClientRect(),{height:m}=f;if(h&&!u&&(l+=f.top-h.top),n instanceof Pa)p>r&&c(n,d,f);else if(d>=r&&(l>0&&t.push(-l),t.push(m+l),l=0,i)){let e=n.dom.lastChild,t=e?ro(e):[];if(t.length){let e=t[t.length-1],r=a?e.right-f.left:f.right-e.left;r>o&&(o=r,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=p)}}h&&u==e.children.length-1&&(l+=h.bottom-f.bottom),d=p+n.breakAfter}};return c(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?So.RTL:So.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t,r=0;for(let n of e.children){if(!n.isText()||/[^ -~]/.test(n.text))return;let e=ro(n.dom);if(1!=e.length)return;r+=e[0].width,t=e[0].height}if(r)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:r/e.length,textHeight:t}}});if(e)return e;let t,r,n,s=document.createElement("div");return s.className="cm-line",s.style.width="99999px",s.style.position="absolute",s.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(s);let e=ro(s.firstChild)[0];t=s.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,n=e&&e.height?e.height:t,s.remove()}),{lineHeight:t,charWidth:r,textHeight:n}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],i=s?s.from-1:this.view.state.doc.length;if(i>r){let n=(t.lineBlockAt(i).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Wi.replace({widget:new Ha(n),block:!0,inclusive:!0,isBlockGap:!0}).range(r,i))}if(!s)break;r=s.to+1}return Wi.set(e)}
7updateDeco(){let e=1,t=this.view.state.facet(ha).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),r=!1,n=this.view.state.facet(pa).map((e,t)=>{let n="function"==typeof e;return n&&(r=!0),n?e(this.view):e});for(n.length&&(this.dynamicDecorationMap[e++]=r,t.push(ri.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(ua).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){var t;if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}for(let d of this.view.state.facet(Jo))try{if(d(this.view,e.range,e))return!0}catch(c){na(this.view.state,c,"scroll handler")}let r,{range:n}=e,s=this.coordsAt(n.head,null!==(t=n.assoc)&&void 0!==t?t:n.empty?0:n.head>n.anchor?-1:1);if(!s)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(s={left:Math.min(s.left,r.left),top:Math.min(s.top,r.top),right:Math.max(s.right,r.right),bottom:Math.max(s.bottom,r.bottom)});let i=xa(this.view),o={left:s.left-i.left,top:s.top-i.top,right:s.right+i.right,bottom:s.bottom+i.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;if(function(e,t,r,n,s,i,o,a){let l=e.ownerDocument,c=l.defaultView||window;for(let d=e,h=!1;d&&!h;)if(1==d.nodeType){let e,u=d==l.body,p=1,f=1;if(u)e=co(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(h=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let t=d.getBoundingClientRect();({scaleX:p,scaleY:f}=ho(d,t)),e={left:t.left,right:t.left+d.clientWidth*p,top:t.top,bottom:t.top+d.clientHeight*f}}let m=0,g=0;if("nearest"==s)t.top<e.top?(g=t.top-(e.top+o),r>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,r<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let n=t.bottom-t.top,i=e.bottom-e.top;g=("center"==s&&n<=i?t.top+n/2-i/2:"start"==s||"center"==s&&r<0?t.top-o:t.bottom-i+o)-e.top}if("nearest"==n?t.left<e.left?(m=t.left-(e.left+i),r>0&&t.right>e.right+m&&(m=t.right-e.right+i)):t.right>e.right&&(m=t.right-e.right+i,r<0&&t.left<e.left+m&&(m=t.left-(e.left+i))):m=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==a?t.left-i:t.right-(e.right-e.left)+i)-e.left,m||g)if(u)c.scrollBy(m,g);else{let e=0,r=0;if(g){let e=d.scrollTop;d.scrollTop+=g/f,r=(d.scrollTop-e)*f}if(m){let t=d.scrollLeft;d.scrollLeft+=m/p,e=(d.scrollLeft-t)*p}t={left:t.left-e,top:t.top-r,right:t.right-e,bottom:t.bottom-r},e&&Math.abs(e-m)<1&&(n="nearest"),r&&Math.abs(r-g)<1&&(s="nearest")}if(u)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),d=d.assignedSlot||d.parentNode}else{if(11!=d.nodeType)break;d=d.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==So.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(s.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||s.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(n.head,1);e&&e.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Ba(this.tile)}}function Ba(e,t){let r=null==t?void 0:t.get(e);if(1!=r){null==r&&e.destroy();for(let r of e.children)Ba(r,t)}}function Fa(e,t){let r=e.observer.selectionRange;if(!r.focusNode)return null;let n=vo(r.focusNode,r.focusOffset),s=yo(r.focusNode,r.focusOffset),i=n||s;if(s&&n&&s.node!=n.node){let t=Sa.get(s.node);if(!t||t.isText()&&t.text!=s.node.nodeValue)i=s;else if(e.docView.lastCompositionAfterCursor){let e=Sa.get(n.node);!e||e.isText()&&e.text!=n.node.nodeValue||(i=s)}}if(e.docView.lastCompositionAfterCursor=i!=n,!i)return null;let o=t-i.offset;return{from:o,to:o+i.node.nodeValue.length,node:i.node}}let Ga=class{constructor(){this.changes=[]}compareRange(e,t){Hi(e,t,this.changes)}comparePoint(e,t){Hi(e,t,this.changes)}boundChange(e){Hi(e,e,this.changes)}};class Ua{constructor(){this.changes=[]}compareRange(e,t){Hi(e,t,this.changes)}comparePoint(){}boundChange(e){Hi(e,e,this.changes)}}class Ha extends qi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");
7return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Ka(e,t,r,n,s){let i=Math.round((n-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&r.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((s-r.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(r.from,r.to);return r.from+function(e,t,r){for(let n=0,s=0;;){if(s>=t)return n;if(n==e.length)break;s+=9==e.charCodeAt(n)?r-s%r:1,n=In(e,n)}return e.length}(o,i,e.state.tabSize)}function Ja(e,t,r,n){let s=function(e,t,r){let n=e.lineBlockAt(t);if(Array.isArray(n.type)){let e;for(let s of n.type){if(s.from>t)break;if(!(s.to<t)){if(s.from<t&&s.to>t)return s;e&&(s.type!=Vi.Text||e.type==s.type&&!(r<0?s.from<t:s.to>t))||(e=s)}}return e||n}return n}(e,t.head,t.assoc||-1),i=n&&s.type==Vi.Text&&(e.lineWrapping||s.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>s.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(s.from),o=e.posAtCoords({x:r==(n==So.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=o)return ss.cursor(o,r?-1:1)}return ss.cursor(r?s.to:s.from,r?-1:1)}function el(e,t,r,n){let s=e.state.doc.lineAt(t.head),i=e.bidiSpans(s),o=e.textDirectionAt(s.from);for(let a=t,l=null;;){let t=Do(s,i,o,a,r),c=Mo;if(!t){if(s.number==(r?e.state.doc.lines:1))return a;c="\n",s=e.state.doc.line(s.number+(r?1:-1)),i=e.bidiSpans(s),t=e.visualLineSide(s,!r)}if(l){if(!l(c))return a}else{if(!n)return t;l=n(c)}a=t}}function tl(e,t,r){for(;;){let n=0;for(let s of e)s.between(t-1,t+1,(e,s,i)=>{if(t>e&&t<s){let i=n||r||(t-e<s-t?-1:1);t=i<0?e:s,n=i}});if(!n)return t}}function rl(e,t){let r=null;for(let n=0;n<t.ranges.length;n++){let s=t.ranges[n],i=null;if(s.empty){let t=tl(e,s.from,0);t!=s.from&&(i=ss.cursor(t,-1))}else{let t=tl(e,s.from,-1),r=tl(e,s.to,1);t==s.from&&r==s.to||(i=ss.range(s.from==s.anchor?t:r,s.from==s.head?t:r))}i&&(r||(r=t.ranges.slice()),r[n]=i)}return r?ss.create(r,t.mainIndex):t}function nl(e,t,r){let n=tl(e.state.facet(fa).map(t=>t(e)),r.from,t.head>r.from?-1:1);return n==r.from?r:ss.cursor(n,n<r.from?1:-1)}class sl{constructor(e,t){this.pos=e,this.assoc=t}}function il(e,t,r,n){let s,i=e.contentDOM.getBoundingClientRect(),o=i.top+e.viewState.paddingTop,{x:a,y:l}=t,c=l-o;for(;;){if(c<0)return new sl(0,1);if(c>e.viewState.docHeight)return new sl(e.state.doc.length,-1);if(s=e.elementAtHeight(c),null==n)break;if(s.type==Vi.Text){if(n<0?s.to<e.viewport.from:s.from>e.viewport.to)break;let t=e.docView.coordsAt(n<0?s.from:s.to,n>0?-1:1);if(t&&(n<0?t.top<=c+o:t.bottom>=c+o))break}let t=e.viewState.heightOracle.textHeight/2;c=n>0?s.bottom+t:s.top-t}if(e.viewport.from>=s.to||e.viewport.to<=s.from){if(r)return null;if(s.type==Vi.Text){let t=Ka(e,i,s,a,l);return new sl(t,t==s.from?1:-1)}}if(s.type!=Vi.Text)return c<(s.top+s.bottom)/2?new sl(s.from,1):new sl(s.to,-1);let d=e.docView.lineAt(s.from,2);return d&&d.length==s.length||(d=e.docView.lineAt(s.from,-2)),new ol(e,a,l,e.textDirectionAt(s.from)).scanTile(d,s.from)}class ol{constructor(e,t,r,n){this.view=e,this.x=t,this.y=r,this.baseDir=n,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:n}=this.bidiSpansAt(e);return n[Eo.find(n,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:n}=this.bidiSpansAt(e);return n[Eo.find(n,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:n}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+n.from<t)}scan(e,t){let r,n,s,i=0,o=e.length-1,a=new Set,l=this.bidiIn(e[0],e[o]),c=-1,d=1e9;e:for(;i<o;){let h=o-i,u=i+o>>1;t:if(a.has(u)){let e=i+Math.floor(Math.random()*h);for(let t=0;t<h;t++){if(!a.has(e)){u=e;break t}e++,e==o&&(e=i)}break e}a.add(u);let p=t(u);if(p)for(let t=0;t<p.length;t++){let a=p[t],h=0;if(!(0==a.width&&p.length>1)){if(a.bottom<this.y)(!r||r.bottom<a.bottom)&&(r=a),h=1;else if(a.top>this.y)(!n||n.top>a.top)&&(n=a),h=-1;else{let e=a.left>
7this.x?this.x-a.left:a.right<this.x?this.x-a.right:0,t=Math.abs(e);t<d&&(c=u,d=t,s=a),e&&(h=e<0==(this.baseDir==So.LTR)?-1:1)}-1!=h||l&&!this.baseDirAt(e[u],1)?1!=h||l&&!this.baseDirAt(e[u+1],-1)||(i=u+1):o=u}}}if(!s){let s=r&&(!n||this.y-r.bottom<n.top-this.y)?r:n;return this.y=(s.top+s.bottom)/2,this.scan(e,t)}let h=(l?this.dirAt(e[c],1):this.baseDir)==So.LTR;return{i:c,after:this.x>(s.left+s.right)/2==h}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=In(e.text,s))r.push(t+s);r.push(t+e.length);let n=this.scan(r,n=>{let s=r[n]-t,i=r[n+1]-t;return Oo(e.dom,s,i).getClientRects()});return n.after?new sl(r[n.i+1],-1):new sl(r[n.i],1)}scanTile(e,t){if(!e.length)return new sl(t,1);if(1==e.children.length){let r=e.children[0];if(r.isText())return this.scanText(r,t);if(r.isComposite())return this.scanTile(r,t)}let r=[t];for(let o=0,a=t;o<e.children.length;o++)r.push(a+=e.children[o].length);let n=this.scan(r,t=>{let r=e.children[t];return 48&r.flags?null:(1==r.dom.nodeType?r.dom:Oo(r.dom,0,r.length)).getClientRects()}),s=e.children[n.i],i=r[n.i];return s.isText()?this.scanText(s,i):s.isComposite()?this.scanTile(s,i):n.after?new sl(r[n.i+1],-1):new sl(i,1)}}const al="ï¿¿";class ll{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Gs.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=al}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let n=e;;){this.findPointBefore(r,n);let e=this.text.length;this.readNode(n);let s=Sa.get(n),i=n.nextSibling;if(i==t){(null==s?void 0:s.breakAfter)&&!i&&r!=this.view.contentDOM&&this.lineBreak();break}let o=Sa.get(i);(s&&o?s.breakAfter:(s?s.breakAfter:io(n))||io(i)&&("BR"!=n.nodeName||(null==s?void 0:s.isWidget()))&&this.text.length>e)&&!dl(i,t)&&this.lineBreak(),n=i}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,i=-1,o=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(s=n.exec(t))&&(i=s.index,o=s[0].length),this.append(t.slice(r,i<0?t.length:i)),i<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);r=i+o}}readNode(e){let t=Sa.get(e),r=t&&t.overrideDOMText;if(null!=r){this.findPointInside(e,r.length);for(let e=r.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(3==e.nodeType?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(cl(e,r.node,r.offset)?t:0))}}function cl(e,t,r){for(;;){if(!t||r<ao(t))return!1;if(t==e)return!0;r=so(t)+1,t=t.parentNode}}function dl(e,t){let r;for(;e!=t&&e;e=e.nextSibling){let t=Sa.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(r||(r=[])).push(t)}if(r)for(let n of r){let e=n.overrideDOMText;if(null==e?void 0:e.length)return!1}return!0}class hl{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class ul{constructor(e,t,r,n){this.typeOver=n,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:i}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=pl(e.docView.tile,t,r,0))){let t=s||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:r,anchorOffset:n,focusNode:s,focusOffset:i}=e.observer.selectionRange;r&&(t.push(new hl(r,n)),s==r&&i==n||t.push(new hl(s,i)));return t}(e),r=new ll(t,e);r.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=r.text,this.newSel=function(e,t){if(0==e.length)return null;let r=e[0].pos,n=2==e.length?e[1].pos:r;return r>-1&&n>-1?ss.single(r+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,r=s&&s.node==t.focusNode&&s.offset==t.focusOffset||!eo(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!eo(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((Xi.ios||Xi.chrome)&&o.main.empty&&r!=n&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(r,n),s=Math.max(r,n),i=a.from-t,o=a.to-s;0!=i&&1!=i&&0!=t||0!=o&&-1!=o&&s!=e.state.doc.length||(r=0,n=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(ss.range(n,r));else if(e.lineWrapping&&n==r&&(!o.main.empty||o.main.head!=r)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(r,-1),n=0;t&&(n=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=ss.create([ss.cursor(r,n)])}else this.newSel=ss.single(n,r)}}}function pl(e,t,r,n){if(e.isComposite()){let s=-1,i=-1,o=-1,a=-1;for(let l=0,c=n,d=n;l<e.children.length;l++){let n=e.children[l],h=c+n.length;if(c<t&&h>r)return pl(n,t,r,c);if(h>=t&&-1==s&&(s=l,i=c),c>r&&n.dom.parentNode==e.dom){o=l,a=d;break}d=h,c=h+n.breakAfter}return{from:i,to:a<0?n+e.length:a,startDOM:(s?e.children[s-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:n,to:n+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function fl(e,t){let r,{newSel:n}=t,{state:s}=e,i=s.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;
7if(t.bounds){let{from:e,to:n}=t.bounds,a=i.from,l=null;(8===o||Xi.android&&t.text.length<n-e)&&(a=i.to,l="end");let c,d,h=s.doc.sliceString(e,n,al);!i.empty&&i.from>=e&&i.to<=n&&(t.typeOver||h!=t.text)&&h.slice(0,i.from-e)==t.text.slice(0,i.from-e)&&h.slice(i.to-e)==t.text.slice(c=t.text.length-(h.length-(i.to-e)))?r={from:i.from,to:i.to,insert:En.of(t.text.slice(i.from-e,c).split(al))}:(d=gl(h,t.text,a-e,l))&&(Xi.chrome&&13==o&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==al+al&&d.toB--,r={from:e+d.from,to:e+d.toA,insert:En.of(t.text.slice(d.from,d.toB).split(al))})}else n&&(!e.hasFocus&&s.facet(sa)||Ol(n,i))&&(n=null);if(!r&&!n)return!1;if((Xi.mac||Xi.android)&&r&&r.from==r.to&&r.from==i.head-1&&/^\. ?$/.test(r.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==r.insert.length&&(n=ss.single(n.main.anchor-1,n.main.head-1)),r={from:r.from,to:r.to,insert:En.of([r.insert.toString().replace("."," ")])}):s.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50?r={from:i.from,to:i.to,insert:s.toText(e.inputState.insertingText)}:Xi.chrome&&r&&r.from==r.to&&r.from==i.head&&"\n "==r.insert.toString()&&e.lineWrapping&&(n&&(n=ss.single(n.main.anchor-1,n.main.head-1)),r={from:i.from,to:i.to,insert:En.of([" "])}),r)return ml(e,r,n,o);if(n&&!Ol(n,i)){let t=!1,r="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),r=e.inputState.lastSelectionOrigin,"select.pointer"==r&&(n=rl(s.facet(fa).map(t=>t(e)),n))),e.dispatch({selection:n,scrollIntoView:t,userEvent:r}),!0}return!1}function ml(e,t,r,n=-1){if(Xi.ios&&e.inputState.flushIOSKey(t))return!0;let s=e.state.selection.main;if(Xi.android&&(t.to==s.to&&(t.from==s.from||t.from==s.from-1&&" "==e.state.sliceDoc(t.from,s.from))&&1==t.insert.length&&2==t.insert.lines&&xo(e.contentDOM,"Enter",13)||(t.from==s.from-1&&t.to==s.to&&0==t.insert.length||8==n&&t.insert.length<t.to-t.from&&t.to>s.head)&&xo(e.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&0==t.insert.length&&xo(e.contentDOM,"Delete",46)))return!0;let i,o=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>i||(i=function(e,t,r){let n,s=e.state,i=s.selection.main,o=-1;if(t.from==t.to&&t.from<i.from||t.from>i.to){let r=t.from<i.from?-1:1,n=r<0?i.from:i.to,a=tl(s.facet(fa).map(t=>t(e)),n,r);t.from==a&&(o=a)}if(o>-1)n={changes:t,selection:ss.cursor(t.from+t.insert.length,-1)};else if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let r=i.from<t.from?s.sliceDoc(i.from,t.from):"",o=i.to>t.to?s.sliceDoc(t.to,i.to):"";n=s.replaceSelection(e.state.toText(r+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=s.changes(t),a=r&&r.main.to<=o.newLength?r.main:void 0;if(s.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=i.to+10&&t.to>=i.to-10){let l,c=e.state.sliceDoc(t.from,t.to),d=r&&Fa(e,r.main.head);if(d){let e=t.insert.length-(t.to-t.from);l={from:d.from,to:d.to-e}}else l=e.state.doc.lineAt(i.head);let h=i.to-t.to;n=s.changeByRange(r=>{if(r.from==i.from&&r.to==i.to)return{changes:o,range:a||r.map(o)};let n=r.to-h,d=n-c.length;if(e.state.sliceDoc(d,n)!=c||n>=l.from&&d<=l.to)return{range:r};let u=s.changes({from:d,to:n,insert:t.insert}),p=r.to-i.to;return{changes:u,range:a?ss.range(Math.max(0,a.anchor+p),Math.max(0,a.head+p)):r.map(u)}})}else n={changes:o,selection:a&&s.selection.replaceRange(a)}}let a="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1));return s.update(n,{userEvent:a,scrollIntoView:!0})}(e,t,r));return e.state.facet(Bo).some(r=>r(e,t.from,t.to,o,a))||e.dispatch(a()),!0}function gl(e,t,r,n){let s=Math.min(e.length,t.length),i=0;for(;i<s&&e.charCodeAt(i)==t.charCodeAt(i);)i++;if(i==s&&e.length==t.length)return null;let o=e.length,a=t.length;for(;o>0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;if("end"==n){r-=o+Math.max(0,i-Math.min(o,a))-i}if(o<i&&e.length<t.length){i-=r<=i&&r>=o?i-r:0,a=i+(a-o),o=i}else if(a<i){i-=r<=i&&r>=a?i-r:0,o=i+(o-a),a=i}return{from:i,toA:o,toB:a}}function Ol(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class xl{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Xi.safari&&e.contentDOM.addEventListener("input",()=>null),Xi.gecko&&(t=e.contentDOM.ownerDocument,Ll.has(t)||(Ll.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;
vendor: 6,883 bytes, line 7
7if(t.defaultPrevented)return!1;for(let r,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=Sa.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e)))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let e of r.observers)e(this.view,t);for(let e of r.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function r(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let n of e){let e=n.spec,t=e&&e.plugin.domEventHandlers,s=e&&e.plugin.domEventObservers;if(t)for(let i in t){let e=t[i];e&&r(i).handlers.push(bl(n.value,e))}if(s)for(let i in s){let e=s[i];e&&r(i).observers.push(bl(n.value,e))}}for(let n in jl)r(n).handlers.push(jl[n]);for(let n in Ql)r(n).observers.push(Ql[n]);return t}(e),r=this.handlers,n=this.view.contentDOM;for(let s in t)if("scroll"!=s){let e=!t[s].handlers.length,i=r[s];i&&e!=!i.handlers.length&&(n.removeEventListener(s,this.handleEvent),i=null),i||n.addEventListener(s,this.handleEvent,{passive:e})}for(let s in r)"scroll"==s||t[s]||n.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&wl.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Xi.android&&Xi.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!Xi.ios||e.synthetic||e.altKey||e.metaKey||e.shiftKey||!((t=vl.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||yl.indexOf(e.key)>-1&&e.ctrlKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,xo(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0)))}ignoreDuringComposition(e){return!(!/^key/.test(e.type)||e.synthetic)&&(this.composing>0||!!(Xi.safari&&!Xi.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function bl(e,t){return(r,n)=>{try{return t.call(e,n,r)}catch(s){na(r.state,s)}}}const vl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],yl="dthko",wl=[16,17,18,20,91,92,224,225];function Sl(e){return.7*Math.max(0,e)+8}class kl{constructor(e,t,r,n){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=uo(e.contentDOM),this.atoms=e.state.facet(fa).map(t=>t(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Gs.allowMultipleSelections)&&function(e,t){let r=e.state.facet(Yo);return r.length?r[0](t):Xi.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:r}=e.state.selection;if(r.empty)return!1;let n=Ji(e.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let i=0;i<s.length;i++){let e=s[i];if(e.left<=t.clientX&&e.right>=t.clientX&&e.top<=t.clientY&&e.bottom>=t.clientY)return!0}return!1}(e,t)||1!=zl(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(t=this.startEvent,r=e,Math.max(Math.abs(t.clientX-r.clientX),Math.abs(t.clientY-r.clientY))<10))return;var t,r;this.select(this.lastEvent=e);let n=0,s=0,i=0,o=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=xa(this.view);e.clientX-c.left<=i+6?n=-Sl(i-e.clientX):e.clientX+c.right>=a-6&&(n=Sl(e.clientX-a)),e.clientY-c.top<=o+6?s=-Sl(o-e.clientY):e.clientY+c.bottom>=l-6&&(s=Sl(e.clientY-l)),this.setScrollSpeed(n,s)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=rl(this.atoms,this.style.get(e,this.extend,this.multiple));!this.mustSelect&&r.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}const jl=Object.create(null),Ql=Object.create(null),Pl=Xi.ie&&Xi.ie_version<15||Xi.ios&&Xi.webkit_version<604;function $l(e,t,r){for(let n of e.facet(t))r=n(r,e);return r}function _l(e,t){t=$l(e.state,Go,t);let r,{state:n}=e,s=1,i=n.toText(t),o=i.lines==n.selection.ranges.length;if(null!=Rl&&n.selection.ranges.every(e=>e.empty)&&Rl==i.toString()){let e=-1;r=n.changeByRange(r=>{let a=n.doc.lineAt(r.from);if(a.from==e)return{range:r};e=a.from;let l=n.toText((o?i.line(s++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:l},range:ss.cursor(r.from+l.length)}})}else r=o?n.changeByRange(e=>{let t=i.line(s++);return{changes:{from:e.from,to:e.to,insert:t.text},range:ss.cursor(e.from+t.length)}}):n.replaceSelection(i);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function Cl(e,t,r,n){if(1==n)return ss.cursor(t,r);
vendor: 4,140 bytes, line 7
7if(2==n)return function(e,t,r=1){let n=e.charCategorizer(t),s=e.doc.lineAt(t),i=t-s.from;if(0==s.length)return ss.cursor(t);0==i?r=1:i==s.length&&(r=-1);let o=i,a=i;r<0?o=In(s.text,i,!1):a=In(s.text,i);let l=n(s.text.slice(o,a));for(;o>0;){let e=In(s.text,o,!1);if(n(s.text.slice(e,o))!=l)break;o=e}for(;a<s.length;){let e=In(s.text,a);if(n(s.text.slice(a,e))!=l)break;a=e}return ss.range(o+s.from,a+s.from)}(e.state,t,r);{let n=e.docView.lineAt(t,r),s=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:s.from,o=n?n.posAtEnd:s.to;return o<e.state.doc.length&&o==s.to&&o++,ss.range(i,o)}}Ql.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Ql.wheel=Ql.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},jl.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Ql.touchstart=(e,t)=>{let r=e.inputState,n=t.targetTouches[0];r.lastTouchTime=Date.now(),n&&(r.lastTouchX=n.clientX,r.lastTouchY=n.clientY),r.setSelectionOrigin("select.pointer")},Ql.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},jl.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let r=null;for(let n of e.state.facet(qo))if(r=n(e,t),r)break;if(r||0!=t.button||(r=function(e,t){let r=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),n=zl(t),s=e.state.selection;return{update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),s=s.map(e.changes))},get(t,i,o){let a,l=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c=Cl(e,l.pos,l.assoc,n);if(r.pos!=l.pos&&!i){let t=Cl(e,r.pos,r.assoc,n),s=Math.min(t.from,c.from),i=Math.max(t.to,c.to);c=s<c.from?ss.range(s,i,c.assoc):ss.range(i,s,c.assoc)}return i?s.replaceRange(s.main.extend(c.from,c.to,c.assoc)):o&&1==n&&s.ranges.length>1&&(a=function(e,t){for(let r=0;r<e.ranges.length;r++){let{from:n,to:s}=e.ranges[r];if(n<=t&&s>=t)return ss.create(e.ranges.slice(0,r).concat(e.ranges.slice(r+1)),e.mainIndex==r?0:e.mainIndex-(e.mainIndex>r?1:0))}return null}(s,l.pos))?a:o?s.addRange(c):ss.create([c])}}}(e,t)),r){let n=!e.hasFocus;e.inputState.startMouseSelection(new kl(e,t,r,n)),n&&e.observer.ignore(()=>{go(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let s=e.inputState.mouseSelection;if(s)return s.start(t),!1===s.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};const Tl=Xi.ie&&Xi.ie_version<=11;let Nl=null,El=0,Al=0;function zl(e){if(!Tl)return e.detail;let t=Nl,r=Al;return Nl=e,Al=Date.now(),El=!t||r>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(El+1)%3:1}function Zl(e,t,r,n){if(!(r=$l(e.state,Go,r)))return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,o=n&&i&&function(e,t){let r=e.state.facet(Io);return r.length?r[0](t):Xi.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,a={from:s,insert:r},l=e.state.changes(o?[o,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),e.inputState.draggedContent=null}jl.dragstart=(e,t)=>{let{selection:{main:r}}=e.state;if(t.target.draggable){let n=e.docView.tile.nearest(t.target);if(n&&n.isWidget()){let e=n.posAtStart,t=e+n.length;(e>=r.to||t<=r.from)&&(r=ss.range(e,t))}}let{inputState:n}=e;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=r,t.dataTransfer&&(t.dataTransfer.setData("Text",$l(e.state,Uo,e.state.sliceDoc(r.from,r.to))),t.dataTransfer.effectAllowed="copyMove"),!1},jl.dragend=e=>(e.inputState.draggedContent=null,!1),jl.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let r=t.dataTransfer.files;if(r&&r.length){let n=Array(r.length),s=0,i=()=>{++s==r.length&&Zl(e,t,n.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<r.length;e++){let t=new FileReader;t.onerror=i,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),i()},t.readAsText(r[e])}return!0}{let r=t.dataTransfer.getData("Text");if(r)return Zl(e,t,r,!0),!0}return!1},jl.paste=(e,t)=>
vendor: 20,522 bytes, line 7
7{if(e.state.readOnly)return!0;e.observer.flush();let r=Pl?null:t.clipboardData;return r?(_l(e,r.getData("text/plain")||r.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.remove(),_l(e,r.value)},50)}(e),!1)};let Rl=null;jl.copy=jl.cut=(e,t)=>{if(!to(e.contentDOM,e.observer.selectionRange))return!1;let{text:r,ranges:n,linewise:s}=function(e){let t=[],r=[],n=!1;for(let s of e.selection.ranges)s.empty||(t.push(e.sliceDoc(s.from,s.to)),r.push(s));if(!t.length){let s=-1;for(let{from:n}of e.selection.ranges){let i=e.doc.lineAt(n);i.number>s&&(t.push(i.text),r.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),s=i.number}n=!0}return{text:$l(e,Uo,t.join(e.lineBreak)),ranges:r,linewise:n}}(e.state);if(!r&&!s)return!1;Rl=s?r:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let i=Pl?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",r),!0):(function(e,t){let r=e.dom.parentNode;if(!r)return;let n=r.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout(()=>{n.remove(),e.focus()},50)}(e,r),!1)};const Xl=As.define();function Ml(e,t){let r=[];for(let n of e.facet(Fo)){let s=n(e,t);s&&r.push(s)}return r.length?e.update({effects:r,annotations:Xl.of(!0)}):null}function Dl(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let r=Ml(e.state,t);r?e.dispatch(r):e.update([])}},10)}Ql.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Dl(e)},Ql.blur=e=>{e.observer.clearSelectionRange(),Dl(e)},Ql.compositionstart=Ql.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},Ql.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Xi.chrome&&Xi.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Ql.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},jl.beforeinput=(e,t)=>{var r,n;if("insertText"!=t.inputType&&"insertCompositionText"!=t.inputType||(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let n=null===(r=t.dataTransfer)||void 0===r?void 0:r.getData("text/plain"),s=t.getTargetRanges();if(n&&s.length){let t=s[0],r=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return ml(e,{from:r,to:i,insert:e.state.toText(n)},null),!0}}let s;if(Xi.chrome&&Xi.android&&(s=vl.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(s.key,s.keyCode),"Backspace"==s.key||"Delete"==s.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var r;((null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return Xi.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),Xi.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>Ql.compositionend(e,t),20),!1};const Ll=new Set;const Yl=["pre-wrap","normal","pre-line","break-spaces"];let Il=!1;function ql(){Il=!1}class Vl{constructor(e){this.lineWrapping=e,this.doc=En.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Yl.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let n=e[r];n<0?r++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,r,n,s,i){let o=Yl.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=r,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let e=0;e<i.length;e++){let t=i[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class Wl{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Bl{constructor(e,t,r,n,s){this.from=e,this.length=t,this.top=r,this.height=n,this._content=s}get type(){return"number"==typeof this._content?Vi.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Gi?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Bl(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Fl=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(Fl||(Fl={}));const Gl=.001;class Ul{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Gl&&(Il=!0),this.height=e)}replace(e,t,r){return Ul.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,n){let s=this,i=r.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:c,toB:d}=n[o],h=s.lineAt(a,Fl.ByPosNoHeight,r.setDoc(t),0,0),u=h.to>=l?h:s.lineAt(l,Fl.ByPosNoHeight,r,0,0);for(d+=u.to-l,l=u.to;o>0&&h.from<=n[o-1].toA;)a=n[o-1].fromA,c=n[o-1].fromB,o--,a<h.from&&(h=s.lineAt(a,Fl.ByPosNoHeight,r,0,0));c+=h.from-a,a=h.from;let p=sc.build(r.setDoc(i),e,c,d);s=Hl(s,s.replace(a,l,p))}return s.updateHeight(r,0)}static empty(){return new ec(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,r=e.length,n=0,s=0;for(;;)if(t==r)if(n>2*s){let s=e[t-1];s.break?e.splice(--t,1,s.left,null,s.right):e.splice(--t,1,s.left,s.right),r+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let t=e[r];t.break?e.splice(r,1,t.left,null,t.right):e.splice(r,1,t.left,t.right),r+=2+t.break,s-=t.size}}else if(n<s){let r=e[t++];r&&(n+=r.size)}else{let t=e[--r];t&&(s+=t.size)}let i=0;return null==e[t-1]?(i=1,t--):null==e[t]&&(i=1,r++),new rc(Ul.of(e.slice(0,t)),i,Ul.of(e.slice(r)))}}function Hl(e,t){return e==t?e:(e.constructor!=t.constructor&&(Il=!0),t)}Ul.prototype.size=1;const Kl=Wi.replace({});class Jl extends Ul{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new Bl(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,n){return this.spaceAbove&&e<r+this.spaceAbove?new Bl(n,0,r,this.spaceAbove,Kl):this.mainBlock(r,n)}lineAt(e,t,r,n,s){let i=this.mainBlock(n,s);return this.spaceAbove?this.blockAt(0,r,n,s).join(i):i}forEachLine(e,t,r,n,s,i){e<=s+this.length&&t>=s&&i(this.lineAt(0,Fl.ByPos,r,n,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more&&this.setMeasuredHeight(n),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ec extends Jl{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new Bl(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let n=r[0];return 1==r.length&&(n instanceof ec||n instanceof tc&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof tc?n=new ec(n.length,this.height,this.spaceAbove):n.height=this.height,this.outdated||(n.outdated=!1),n):Ul.of(r)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more?this.setMeasuredHeight(n):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class tc extends Ul{constructor(e){super(e,0)}heightMetrics(e,t){let r,n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,i=s-n+1,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);r=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else r=this.height/i;return{firstLine:n,lastLine:s,perLine:r,perChar:o}}blockAt(e,t,r,n){let{firstLine:s,lastLine:i,perLine:o,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let s=n+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),i=t.doc.lineAt(s),l=o+i.length*a,c=Math.max(r,e-l/2);return new Bl(i.from,i.length,c,l,0)}{let n=Math.max(0,Math.min(i-s,Math.floor((e-r)/o))),{from:a,length:l}=t.doc.line(s+n);return new Bl(a,l,r+o*n,o,0)}}lineAt(e,t,r,n,s){if(t==Fl.ByHeight)return this.blockAt(e,r,n,s);if(t==Fl.ByPosNoHeight){let{from:t,to:n}=r.doc.lineAt(e);return new Bl(t,n-t,0,0,0)}let{firstLine:i,perLine:o,perChar:a}=this.heightMetrics(r,s),l=r.doc.lineAt(e),c=o+l.length*a,d=l.number-i,h=n+o*d+a*(l.from-s-d);return new Bl(l.from,l.length,Math.max(n,Math.min(h,n+this.height-c)),c,0)}forEachLine(e,t,r,n,s,i){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s);for(let c=e,d=n;c<=t;){let t=r.doc.lineAt(c);if(c==e){let r=t.number-o;d+=a*r+l*(e-s-r)}let n=a+l*t.length;i(new Bl(t.from,t.length,d,n,0)),d+=n,c=t.to+1}}replace(e,t,r){let n=this.length-t;if(n>0){let e=r[r.length-1];e instanceof tc?r[r.length-1]=new tc(e.length+n):r.push(null,new tc(n-1))}if(e>0){let t=r[0];t instanceof tc?r[0]=new tc(e+t.length):r.unshift(new tc(e-1),null)}return Ul.of(r)}decomposeLeft(e,t){t.push(new tc(e-1),null)}decomposeRight(e,t){t.push(null,new tc(this.length-e-1))}updateHeight(e,t=0,r=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let r=[],i=Math.max(t,n.from),o=-1;for(n.from>t&&r.push(new tc(n.from-t-1).updateHeight(e,t));i<=s&&n.more;){let t=e.doc.lineAt(i).length;r.length&&r.push(null);let s=n.heights[n.index++],a=0;s<0&&(a=-s,s=n.heights[n.index++]),-1==o?o=s:Math.abs(s-o)>=Gl&&(o=-2);let l=new ec(t,s,a);l.outdated=!1,r.push(l),i+=t+1}i<=s&&r.push(null,new tc(s-i).updateHeight(e,i));let a=Ul.of(r);return(o<0||Math.abs(a.height-this.height)>=Gl||Math.abs(o-this.heightMetrics(e,t).perLine)>=Gl)&&(Il=!0),Hl(this,a)}return(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class rc extends Ul{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return 1&this.flags}blockAt(e,t,r,n){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,n):this.right.blockAt(e,t,s,n+this.left.length+this.break)}lineAt(e,t,r,n,s){let i=n+this.left.height,o=s+this.left.length+this.break,a=t==Fl.ByHeight?e<i:e<o,l=a?this.left.lineAt(e,t,r,n,s):this.right.lineAt(e,t,r,i,o);if(this.break||(a?l.to<o:l.from>o))return l;let c=t==Fl.ByPosNoHeight?Fl.ByPosNoHeight:Fl.ByPos;return a?l.join(this.right.lineAt(o,c,r,i,o)):this.left.lineAt(o,c,r,n,s).join(l)}forEachLine(e,t,r,n,s,i){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,r,n,s,i),t>=a&&this.right.forEachLine(e,t,r,o,a,i);else{let l=this.lineAt(a,Fl.ByPos,r,n,s);e<l.from&&this.left.forEachLine(e,l.from-1,r,n,s,i),l.to>=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,r,o,a,i)}}replace(e,t,r){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,r));let s=[];e>0&&this.decomposeLeft(e,s);let i=s.length;for(let o of r)s.push(o);if(e>0&&nc(s,i-1),t<this.length){let e=s.length;this.decomposeRight(t,s),nc(s,e)}return Ul.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,n=r+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Ul.of(this.break?[e,null,t]:[e,t]):(this.left=Hl(this.left,e),this.right=Hl(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,n){let{left:s,right:i}=this,o=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,r,n):s.updateHeight(e,t,r),n&&n.from<=o+i.length&&n.more?a=i=i.updateHeight(e,o,r,n):i.updateHeight(e,o,r),a?this.balanced(s,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function nc(e,t){let r,n;null==e[t]&&(r=e[t-1])instanceof tc&&(n=e[t+1])instanceof tc&&e.splice(t-1,3,new tc(r.length+1+n.length))}class sc{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof ec?r.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ec(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let n=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let i=t-e;r.block?this.addBlock(new Jl(i,n,r)):(i||s||n>=5)&&this.addLineDeco(n,s,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new ec(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new tc(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ec)return e;let t=new ec(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let n=this.ensureLine();n.length+=r,n.collapsed+=r,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof ec||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new ec(0,-1,0));let r=e;for(let n of this.nodes)n instanceof ec&&n.updateHeight(this.oracle,r),r+=n?n.length:1;return this.nodes}static build(e,t,r,n){let s=new sc(r,e);return ri.spans(t,r,n,s,0),s.finish(r)}}class ic{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,n){(e<t||r&&r.heightRelevant||n&&n.heightRelevant)&&Hi(e,t,this.changes,5)}}function oc(e,t){let r=e.getBoundingClientRect(),n=e.ownerDocument,s=n.defaultView||window,i=Math.max(0,r.left),o=Math.min(s.innerWidth,r.right),a=Math.max(0,r.top),l=Math.min(s.innerHeight,r.bottom);for(let c=e.parentNode;c&&c!=n.body;)if(1==c.nodeType){let t=c,r=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=r.overflow){let r=t.getBoundingClientRect();i=Math.max(i,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),l=Math.min(c==e.parentNode?s.innerHeight:l,r.bottom)}c="absolute"==r.position||"fixed"==r.position?t.offsetParent:t.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:i-r.left,right:Math.max(i,o)-r.left,top:a-(r.top+t),bottom:Math.max(a,l)-(r.top+t)}}function ac(e,t){let r=e.getBoundingClientRect();return{left:0,right:r.right-r.left,top:t,bottom:r.bottom-(r.top+t)}}class lc{constructor(e,t,r,n){this.from=e,this.to=t,this.size=r,this.displaySize=n}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],s=t[r];if(n.from!=s.from||n.to!=s.to||n.size!=s.size)return!1}return!0}draw(e,t){return Wi.replace({widget:new cc(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class cc extends qi{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class dc{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=fc,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=So.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(da).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new Vl(r),this.stateDeco=mc(t),this.heightMap=Ul.empty().applyChanges(this.stateDeco,En.empty,this.heightOracle.setDoc(t.doc),[new va(0,0,0,t.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Wi.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let n=r?t.head:t.anchor;if(!e.some(({from:e,to:t})=>n>=e&&n<=t)){let{from:t,to:r}=this.lineBlockAt(n);e.push(new hc(t,r))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?fc:new gc(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Oc(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=mc(this.state);let n=e.changedRanges,s=va.extendWithRanges(n,function(e,t,r){let n=new ic;return ri.compare(e,t,r,n,0),n.changes}(r,this.stateDeco,e?e.changes:Un.empty(this.state.doc.length))),i=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);ql(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=i||Il)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=i);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>
vendor: 2,053 bytes, line 7
7a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Ko)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),n=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection="rtl"==r.direction?So.RTL:So.LTR;let i=this.heightOracle.mustRefreshForWrapping(s)||"refresh"===this.mustMeasureContent,o=t.getBoundingClientRect(),a=i||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let l=0,c=0;if(o.width&&o.height){let{scaleX:e,scaleY:r}=ho(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||r>.005&&Math.abs(this.scaleY-r)>.005)&&(this.scaleX=e,this.scaleY=r,l|=16,i=a=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,h=(parseInt(r.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let u=uo(this.view.contentDOM,!1).y;u!=this.scrollParent&&(this.scrollParent=u,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=bo(this.scrollParent||e.win);let f=(this.printing?ac:oc)(t,this.paddingTop),m=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;
vendor: 21,313 bytes, line 7
7if(O!=this.inView&&(this.inView=O,O&&(a=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView||window;return t.left<r.innerWidth&&t.right>0&&t.top<r.innerHeight&&t.bottom>0}(e.dom))return 0;let x=o.width;if(this.contentDOMWidth==x&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(t)&&(i=!0),i||n.lineWrapping&&Math.abs(x-this.contentDOMWidth)>n.charWidth){let{lineHeight:r,charWidth:o,textHeight:a}=e.docView.measureTextSize();i=r>0&&n.refresh(s,r,o,a,Math.max(5,x/o),t),i&&(e.docView.minWidth=0,l|=16)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),ql();for(let r of this.viewports){let s=r.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(r);this.heightMap=(i?Ul.empty().applyChanges(this.stateDeco,En.empty,this.heightOracle,[new va(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,i,new Wl(r.from,s))}Il&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:i,visibleBottom:o}=this,a=new hc(n.lineAt(i-1e3*r,Fl.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-r),Fl.ByHeight,s,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let r,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(e,Fl.ByPos,s,0,0);r="center"==t.y?(o.top+o.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<a.from?o.top:o.bottom-i,a=new hc(n.lineAt(r-500,Fl.ByHeight,s,0,0).from,n.lineAt(r+i+500,Fl.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let r=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new hc(this.heightMap.lineAt(r,Fl.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,Fl.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,Fl.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Fl.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:o}=this;return(0==e||n<=i-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=o+Math.max(10,Math.min(r,250)))&&n>i-2e3&&s<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let n of e)t.touchesRange(n.from,n.to)||r.push(new lc(t.mapPos(n.from),t.mapPos(n.to),n.size,n.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,n=r?1e4:2e3,s=n>>1,i=n<<1;if(this.defaultTextDirection!=So.LTR&&!r)return[];let o=[],a=(n,i,l,c)=>{if(i-n<s)return;let d=this.state.selection.main,h=[d.from];d.empty||h.push(d.to);for(let e of h)if(e>n&&e<i)return a(n,e-10,l,c),void a(e+10,i,l,c);let u=function(e,t){for(let r of e)if(t(r))return r;return}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<s&&Math.abs(e.to-i)<s&&!h.some(t=>e.from<t&&e.to>t));if(!u){if(i<l.to&&t&&r&&t.visibleRanges.some(e=>e.from<=i&&e.to>=i)){let e=t.moveToLineBoundary(ss.cursor(i),!1,!0).head;e>n&&(i=e)}let e=this.gapSize(l,n,i,c);u=new lc(n,i,e,r||e<2e6?e:2e6)}o.push(u)},l=t=>{if(t.length<i||t.type!=Vi.Text)return;let s=function(e,t,r){let n=[],s=e,i=0;ri.spans(r,e,t,{span(){},point(e,t){e>s&&(n.push({from:s,to:e}),i+=e-s),s=t}},20),s<t&&(n.push({from:s,to:t}),i+=t-s);return{total:i,ranges:n}}(t.from,t.to,this.stateDeco);if(s.total<i)return;let o,l,c=this.scrollTarget?this.scrollTarget.range.head:null;if(r){let e,r,i=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=c){let n=pc(s,c),o=((this.visibleBottom-this.visibleTop)/2+i)/t.height;e=n-o,r=n+o}else e=(this.visibleTop-t.top-i)/t.height,r=(this.visibleBottom-t.top+i)/t.height;o=uc(s,e),l=uc(s,r)}else{let r=s.total*this.heightOracle.charWidth,i=n*this.heightOracle.charWidth,a=0;if(r>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=n.size-n.displaySize);let d,h,u=this.pixelViewport.left+a,p=this.pixelViewport.right+a;if(null!=c){let e=pc(s,c),t=((p-u)/2+i)/r;d=e-t,h=e+t}else d=(u-i)/r,h=(p+i)/r;o=uc(s,d),l=uc(s,h)}o>t.from&&a(t.from,o,t,s),l<t.to&&a(l,t.to,t,s)};for(let c of this.viewportLines)Array.isArray(c.type)?c.type.forEach(l):l(c);return o}gapSize(e,t,r,n){let s=pc(n,r)-pc(n,t);return this.heightOracle.lineWrapping?e.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(e){lc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Wi.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];ri.spans(t,this.viewport.from,this.viewport.to,{span(e,t){r.push({from:e,to:t})},point(){}},20);let n=0;if(r.length!=this.visibleRanges.length)n=12;else for(let s=0;s<r.length&&!(8&n);s++){let t=this.visibleRanges[s],i=r[s];t.from==i.from&&t.to==i.to||(n|=4,e&&e.mapPos(t.from,-1)==i.from&&e.mapPos(t.to,1)==i.to||(n|=8))}return this.visibleRanges=r,n}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Oc(this.heightMap.lineAt(e,Fl.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Oc(this.heightMap.lineAt(this.scaler.fromDOM(e),Fl.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Oc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class hc{constructor(e,t){this.from=e,this.to=t}}function uc({total:e,ranges:t},r){if(r<=0)return t[0].from;if(r>=1)return t[t.length-1].to;let n=Math.floor(e*r);for(let s=0;;s++){let{from:e,to:r}=t[s],i=r-e;if(n<=i)return e+n;n-=i}}function pc(e,t){let r=0;for(let{from:n,to:s}of e.ranges){if(t<=s){r+=t-n;break}r+=s-n}return r/e.total}const fc={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function mc(e){let t=e.facet(ha).filter(e=>"function"!=typeof e),r=e.facet(pa).filter(e=>"function"!=typeof e);return r.length&&t.push(ri.join(r)),t}class gc{constructor(e,t,r){let n=0,s=0,i=0;this.viewports=r.map(({from:r,to:s})=>{let i=t.lineAt(r,Fl.ByPos,e,0,0).top,o=t.lineAt(s,Fl.ByPos,e,0,0).bottom;return n+=o-i,{from:r,to:s,top:i,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n);for(let o of this.viewports)o.domTop=i+(o.top-s)*this.scale,i=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(e){for(let t=0,r=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return n+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,n=s.domBottom}}fromDOM(e){for(let t=0,r=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-n)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,n=s.domBottom}}eq(e){return e instanceof gc&&(this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to))}}function Oc(e,t){if(1==t.scale)return e;let r=t.toDOM(e.top),n=t.toDOM(e.bottom);return new Bl(e.from,e.length,r,n-r,Array.isArray(e._content)?e._content.map(e=>Oc(e,t)):e._content)}const xc=as.define({combine:e=>e.join(" ")}),bc=as.define({combine:e=>e.indexOf(!0)>-1}),vc=xi.newName(),yc=xi.newName(),wc=xi.newName(),Sc={"&light":"."+yc,"&dark":"."+wc};function kc(e,t,r){return new xi(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!r||!r[t])throw new RangeError(`Unsupported selector: ${t}`);return r[t]}):e+" "+t})}const jc=kc("."+vc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Sc),Qc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pc=Xi.ie&&Xi.ie_version<=11;class $c{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new po,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(Xi.ie&&Xi.ie_version<=11||Xi.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!Xi.android||!1===e.constructor.EDIT_CONTEXT||Xi.chrome&&Xi.chrome_version<126||(this.editContext=new Tc(e),e.state.facet(sa)&&(e.contentDOM.editContext=this.editContext.editContext)),Pc&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,n=this.selectionRange;if(r.state.facet(sa)?r.root.activeElement!=this.dom:!to(this.dom,n))return;let s=n.anchorNode&&r.docView.tile.nearest(n.anchorNode);s&&s.isWidget()&&s.widget.ignoreEvent(e)?t||(this.selectionChanged=!1):(Xi.ie&&Xi.ie_version<=11||Xi.android&&Xi.chrome)&&!r.state.selection.main.empty&&n.focusNode&&no(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ji(e.root);if(!t)return!1;let r=Xi.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return Cc(e,r)}let r=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),r=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),r?Cc(e,r):null}(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let n=to(this.dom,r);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let r=t.focusNode,n=t.focusOffset;if(!r||t.anchorNode!=r||t.anchorOffset!=n)return!1;for(n=Math.min(n,ao(r));;)if(n){if(1!=r.nodeType)return!1;let e=r.childNodes[n-1];"false"==e.contentEditable?n--:(r=e,n=ao(r))}else{if(r==e)return!0;n=so(r),r=r.parentNode}}(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(1==r.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Qc),Pc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Pc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&xo(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(r=this.delayedAndroidKey)||void 0===r?void 0:r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,n=!1;for(let s of e){let e=this.readMutation(s);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:r}=e):(t=Math.min(e.from,t),r=Math.max(e.to,r)))}return{from:t,to:r,typeOver:n}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),n=this.selectionChanged&&to(this.dom,this.selectionRange);
vendor: 4,794 bytes, line 7
7if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new ul(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,n=fl(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!Ol(this.view.state.selection,t.newSel.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let r=_c(t,e.previousSibling||e.target.previousSibling,-1),n=_c(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(sa)!=e.state.facet(sa)&&(e.view.contentDOM.editContext=e.state.facet(sa)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(r=this.resizeScroll)||void 0===r||r.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _c(e,t,r){for(;t;){let n=Sa.get(t);if(n&&n.parent==e)return n;let s=t.parentNode;t=s!=e.dom?s:r>0?t.nextSibling:t.previousSibling}return null}function Cc(e,t){let r=t.startContainer,n=t.startOffset,s=t.endContainer,i=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return no(o.node,o.offset,s,i)&&([r,n,s,i]=[s,i,r,n]),{anchorNode:r,anchorOffset:n,focusNode:s,focusOffset:i}}class Tc{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let n=e.state.selection.main,{anchor:s,head:i}=n,o=this.toEditorPos(r.updateRangeStart),a=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:o,drifted:!1});let l=a-o>r.text.length;o==this.from&&s<this.from?o=s:a==this.to&&s>this.to&&(a=s);let c=gl(e.state.sliceDoc(o,a),r.text,(l?n.from:n.to)-o,l?"end":null);if(!c){let t=ss.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));return void(Ol(t,n)||e.dispatch({selection:t,userEvent:"select"}))}let d={from:c.from+o,to:c.toA+o,insert:En.of(r.text.slice(c.from,c.toB).split("\n"))};if((Xi.mac||Xi.android)&&d.from==i-1&&/^\. ?$/.test(r.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(d={from:o,to:a,insert:En.of([r.text.replace("."," ")])}),this.pendingContextChange=d,!e.state.readOnly){let t=this.to-this.from+(d.to-d.from+d.insert.length);ml(e,d,ss.single(this.toEditorPos(r.selectionStart,t),this.toEditorPos(r.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),d.from<d.to&&!d.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)}
vendor: 4,486 bytes, line 7
7,this.handlers.characterboundsupdate=r=>{let n=[],s=null;for(let t=this.toEditorPos(r.rangeStart),i=this.toEditorPos(r.rangeEnd);t<i;t++){let r=e.coordsForChar(t);s=r&&new DOMRect(r.left,r.top,r.right-r.left,r.bottom-r.top)||s||new DOMRect,n.push(s)}t.updateCharacterBounds(r.rangeStart,n)},this.handlers.textformatupdate=t=>{let r=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,n=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(n)){let s=this.toEditorPos(e.rangeStart),i=this.toEditorPos(e.rangeEnd);if(s<i){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(n)?1:2}px`;r.push(Wi.mark({attributes:{style:e}}).range(s,i))}}}e.dispatch({effects:ra.of(Wi.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=Ji(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,n=this.pendingContextChange;return e.changes.iterChanges((s,i,o,a,l)=>{if(r)return;let c=l.length-(i-s);if(n&&i>=n.to){if(n.from==s&&n.to==i&&n.insert.eq(l))return n=this.pendingContextChange=null,t+=c,void(this.to+=c);n=null,this.revertPending(e.state)}if(s+=t,(i+=t)<=this.from)this.from+=c,this.to+=c;else if(s<this.to){if(s<this.from||i>this.to||this.to-this.from+l.length>3e4)return void(r=!0);this.editContext.updateText(this.toContextPos(s),this.toContextPos(i),l.toString()),this.to+=c}t+=c}),n&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);this.editContext.selectionStart==r&&this.editContext.selectionEnd==n||this.editContext.updateSelection(r,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Nc{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="
7cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(e=>e.forEach(e=>r(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new dc(this,e.state||Gs.create(e)),e.scrollTo&&e.scrollTo.is(ta)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(oa).map(e=>new la(e));for(let n of this.plugins)n.update(this);this.observer=new $c(this),this.inputState=new xl(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Wa(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof Xs?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,r=!1,n=!1,s=this.state;for(let u of e){if(u.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=u.state}if(this.destroyed)return void(this.viewState.state=s);let i=this.hasFocus,o=0,a=null;e.some(e=>e.annotation(Xl))?(this.inputState.notifiedFocused=i,o=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,a=Ml(s,i),a||(o=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||
vendor: 4,420 bytes, line 7
7!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(Gs.phrases)!=this.state.facet(Gs.phrases))return this.setState(s);t=ya.create(this,s,e),t.flags|=o;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(d&&(d=d.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;d=new ea(e.empty?e:ss.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(ta)&&(d=e.value.clip(this.state))}this.viewState.update(t,d),this.bidiCache=zc.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),r=this.docView.update(t),this.state.facet(ba)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(xc)!=t.state.facet(xc)&&(this.viewState.mustMeasureContent=!0),(r||n||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),r&&this.docViewUpdate(),!t.empty)for(let u of this.state.facet(Wo))try{u(t)}catch(h){na(this.state,h,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!fl(this,c)&&l.force&&xo(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new dc(this,e),this.plugins=e.facet(oa).map(e=>new la(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Wa(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(oa),r=e.state.facet(oa);if(t!=r){let n=[];for(let s of r){let r=t.indexOf(s);if(r<0)n.push(new la(s));else{let t=this.plugins[r];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=e;for(let n=0;n<this.plugins.length;n++)this.plugins[n].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let r=t.value;if(r&&r.docViewUpdate)try{r.docViewUpdate(this)}catch(e){na(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.viewState.scrollParent,n=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:i}=this.viewState;Math.abs(n-this.viewState.scrollOffset)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(bo(r||this.win))s=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(n);s=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure();if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5)break;let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let c=l.map(e=>{try{return e.read(this)}catch(t){return na(this.state,t),Ac}}),d=ya.create(this,this.state,[]),h=!1;d.flags|=a,t?t.flags|=a:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),h=this.docView.update(d),h&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(c[e]!=Ac)try{let t=l[e];t.write&&t.write(c[e],this)}catch(o){na(this.state,o)}if(h&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,i=-1;continue}{let e=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-i)/this.scaleY;if((e>1||e<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){n+=e,r?r.scrollTop+=e:this.win.scrollBy(0,e),i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(Wo))a(t)}
vendor: 11,617 bytes, line 7
7get themeClasses(){return vc+" "+(this.state.facet(bc)?wc:yc)+" "+this.state.facet(xc)}updateAttrs(){let e=Zc(this,ca,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(sa)?"true":"false",class:"cm-content",style:`${Xi.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Zc(this,da,t);let r=this.observer.ignore(()=>{let r=Yi(this.contentDOM,this.contentAttrs,t),n=Yi(this.dom,this.editorAttrs,e);return r||n});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let e of r.effects)if(e.is(Nc.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(ba);let e=this.state.facet(Nc.cspNonce);xi.mount(this.root,this.styleModules.concat(jc).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return nl(this,e,el(this,e,t,r))}moveByGroup(e,t){return nl(this,e,el(this,e,t,t=>function(e,t,r){let n=e.state.charCategorizer(t),s=n(r);return e=>{let t=n(e);return s==Vs.Space&&(s=t),s==t}}(this,e.head,t)))}visualLineSide(e,t){let r=this.bidiSpans(e),n=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return ss.cursor(s.side(t,n)+e.from,s.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,r=!0){return Ja(this,e,t,r)}moveVertically(e,t,r){return nl(this,e,function(e,t,r,n){let s=t.head,i=r?1:-1;if(s==(r?e.state.doc.length:0))return ss.cursor(s,t.assoc);let o,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(s,t.assoc||((t.empty?r:t.head==t.from)?1:-1)),d=e.documentTop;if(c)null==a&&(a=c.left-l.left),o=i<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(s);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(s-t.from))),o=(i<0?t.top:t.bottom)+d}let h=l.left+a,u=e.viewState.heightOracle.textHeight>>1,p=null!=n?n:u;for(let f=0;;f+=u){let t=o+(p+f)*i,n=il(e,{x:h,y:t},!1,i);if(r?t>l.bottom:t<l.top)return ss.cursor(n.pos,n.assoc);let s=e.coordsAtPos(n.pos,n.assoc),c=s?(s.top+s.bottom)/2:0;if(!s||(r?c>o:c<o))return ss.cursor(n.pos,n.assoc,void 0,a)}}(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=il(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),il(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n);return lo(r,s[Eo.find(s,e-n.from,-1,t)].dir==So.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ho)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Ec)return Xo(e.length);let t,r=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==r&&(s.fresh||Ao(s.isolates,t=ga(this,e))))return s.order;t||(t=ga(this,e));let n=function(e,t,r){if(!e)return[new Eo(0,0,t==jo?1:0)];if(t==ko&&!r.length&&!No.test(e))return Xo(e.length);if(r.length)for(;e.length>zo.length;)zo[zo.length]=256;let n=[],s=t==ko?0:1;return Ro(e,s,s,r,0,e.length,n),n}(e.text,r,t);return this.bidiCache.push(new zc(e.from,e.to,r,t,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Xi.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{go(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return ta.of(new ea("number"==typeof e?ss.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return ta.of(new ea(ss.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return aa.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return aa.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=xi.newName(),n=[xc.of(r),ba.of(kc(`.${r}`,e))];return t&&t.dark&&n.push(bc.of(!0)),n}static baseTheme(e){return vs.lowest(ba.of(kc("."+vc,e,Sc)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),n=r&&Sa.get(r)||Sa.get(e);return(null===(t=null==n?void 0:n.root)||void 0===t?void 0:t.view)||null}}Nc.styleModule=ba,Nc.inputHandler=Bo,Nc.clipboardInputFilter=Go,Nc.clipboardOutputFilter=Uo,Nc.scrollHandler=Jo,Nc.focusChangeEffect=Fo,Nc.perLineTextDirection=Ho,Nc.exceptionSink=Vo,Nc.updateListener=Wo,Nc.editable=sa,Nc.mouseSelectionStyle=qo,Nc.dragMovesSelection=Io,Nc.clickAddsSelectionRange=Yo,Nc.decorations=ha,Nc.blockWrappers=ua,Nc.outerDecorations=pa,Nc.atomicRanges=fa,Nc.bidiIsolatedRanges=ma,Nc.scrollMargins=Oa,Nc.darkTheme=bc,Nc.cspNonce=as.define({combine:e=>e.length?e[0]:""}),Nc.contentAttributes=da,Nc.editorAttributes=ca,Nc.lineWrapping=Nc.contentAttributes.of({class:"cm-lineWrapping"}),Nc.announce=Rs.define();const Ec=4096,Ac={};class zc{constructor(e,t,r,n,s,i){this.from=e,this.to=t,this.dir=r,this.isolates=n,this.fresh=s,this.order=i}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let r=[],n=e.length?e[e.length-1].dir:So.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let i=e[s];i.dir!=n||t.touchesRange(i.from,i.to)||r.push(new zc(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.isolates,!1,i.order))}return r}}function Zc(e,t,r){for(let n=e.state.facet(t),s=n.length-1;s>=0;s--){let t=n[s],i="function"==typeof t?t(e):t;i&&Mi(i,r)}return r}const Rc=Xi.mac?"mac":Xi.windows?"win":Xi.linux?"linux":"key";function Xc(e,t,r){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==r&&t.shiftKey&&(e="Shift-"+e),e}const Mc=vs.default(Nc.domEventHandlers({keydown:(e,t)=>function(e,t,r,n){qc=t;let s=function(e){var t=!(Si&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ki&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?wi:yi)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=Wn(qn(s,0))==s.length&&" "!=s,o="",a=!1,l=!1,c=!1;Yc&&Yc.view==r&&Yc.scope==n&&(o=Yc.prefix+" ",wl.indexOf(t.keyCode)<0&&(l=!0,Yc=null));let d,h,u=new Set,p=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(r)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[n];f&&(p(f[o+Xc(s,t,!i)])?a=!0:!i||!(t.altKey||t.metaKey||t.ctrlKey)||Xi.windows&&t.ctrlKey&&t.altKey||Xi.mac&&t.altKey&&!t.ctrlKey&&!t.metaKey||!(d=yi[t.keyCode])||d==s?i&&t.shiftKey&&p(f[o+Xc(s,t,!0)])&&(a=!0):(p(f[o+Xc(d,t,!0)])||t.shiftKey&&(h=wi[t.keyCode])!=s&&h!=d&&p(f[o+Xc(h,t,!1)]))&&(a=!0),!a&&p(f._any)&&(a=!0));l&&(a=!0);a&&c&&t.stopPropagation();return qc=null,a}(function(e){let t=e.facet(Dc),r=Lc.get(t);r||Lc.set(t,r=function(e,t=Rc){let r=Object.create(null),n=Object.create(null),s=(e,t)=>{let r=n[e];if(null==r)n[e]=t;else if(r!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,n,i,o,a)=>{var l,c;let d=r[e]||(r[e]=Object.create(null)),h=n.split(/ (?!$)/).map(e=>function(e,t){const r=e.split(/-(?!$)/);let n,s,i,o,a=r[r.length-1];"Space"==a&&(a=" ");for(let l=0;l<r.length-1;++l){const e=r[l];if(/^(cmd|meta|m)$/i.test(e))o=!0;else if(/^a(lt)?$/i.test(e))n=!0;else if(/^(c|ctrl|control)$/i.test(e))s=!0;else if(/^s(hift)?$/i.test(e))i=!0;else{if(!/^mod$/i.test(e))throw new Error("Unrecognized modifier name: "+e);"mac"==t?o=!0:s=!0}}return n&&(a="Alt-"+a),s&&(a="Ctrl-"+a),o&&(a="Meta-"+a),i&&(a="Shift-"+a),a}(e,t));for(let t=1;t<h.length;t++){let r=h.slice(0,t).join(" ");s(r,!0),d[r]||(d[r]={preventDefault:!0,stopPropagation:!1,run:[t=>{let n=Yc={view:t,prefix:r,scope:e};return setTimeout(()=>{Yc==n&&(Yc=null)},Ic),!0}]})}let u=h.join(" ");s(u,!1);let p=d[u]||(d[u]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=d._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});i&&p.run.push(i),o&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let o of e){let e=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let t of e){let e=r[t]||(r[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:n}=o;for(let t in e)e[t].run.push(e=>n(e,qc))}let n=o[t]||o.key;if(n)for(let t of e)i(t,n,o.run,o.preventDefault,o.stopPropagation),o.shift&&i(t,"Shift-"+n,o.shift,o.preventDefault,o.stopPropagation)}return r}(t.reduce((e,t)=>e.concat(t),[])));return r}(t.state),e,t,"editor")})),Dc=as.define({enables:Mc}),Lc=new WeakMap;let Yc=null;const Ic=4e3;let qc=null;const Vc=Wi.line({class:"cm-activeLine"}),Wc=aa.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,r=[];for(let n of e.state.selection.ranges){let s=e.lineBlockAt(n.head);s.from>t&&(r.push(Vc.range(s.from)),t=s.from)}return Wi.set(r)}},{decorations:e=>e.decorations});class Bc extends qi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");
7return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?ro(e.firstChild):[];if(!t.length)return null;let r=window.getComputedStyle(e.parentNode),n=lo(t[0],"rtl"!=r.direction),s=parseInt(r.lineHeight);return n.bottom-n.top>1.5*s?{left:n.left,right:n.right,top:n.top,bottom:n.top+s}:n}ignoreEvent(){return!1}}function Fc(e){let t=aa.fromClass(class{constructor(t){this.view=t,this.placeholder=e?Wi.set([Wi.widget({widget:new Bc(e),side:1}).range(0)]):Wi.none}get decorations(){return this.view.state.doc.length?Wi.none:this.placeholder}},{decorations:e=>e.decorations});return"string"==typeof e?[t,Nc.contentAttributes.of({"aria-placeholder":e})]:t}const Gc="-10000px";class Uc{constructor(e,t,r,n){this.facet=t,this.createTooltipView=r,this.removeTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let s=null;this.tooltipViews=this.tooltips.map(e=>s=r(e,s))}update(e,t){var r;let n=e.state.facet(this.facet),s=n.filter(e=>e);if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],o=t?[]:null;for(let a=0;a<s.length;a++){let r=s[a],n=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(n=e)}if(n<0)i[a]=this.createTooltipView(r,a?i[a-1]:null),o&&(o[a]=!!r.above);else{let r=i[a]=this.tooltipViews[n];o&&(o[a]=t[n]),r.update&&r.update(e)}}}for(let a of this.tooltipViews)i.indexOf(a)<0&&(this.removeTooltipView(a),null===(r=a.destroy)||void 0===r||r.call(a));return t&&(o.forEach((e,r)=>t[r]=e),t.length=o.length),this.input=n,this.tooltips=s,this.tooltipViews=i,!0}}function Hc(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const Kc=as.define({combine:e=>{var t,r,n;return{position:Xi.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(r=e.find(e=>e.parent))||void 0===r?void 0:r.parent)||null,tooltipSpace:(null===(n=e.find(e=>e.tooltipSpace))||void 0===n?void 0:n.tooltipSpace)||Hc}}}),Jc=new WeakMap,ed=aa.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Kc);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Uc(e,sd,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let r=t||e.geometryChanged,n=e.state.facet(Kc);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;r=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);r=!0}
vendor: 10,232 bytes, line 7
7else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);r&&this.maybeMeasure()}createTooltip(e,t){let r=e.create(this.view),n=t?t.dom:null;if(r.dom.classList.add("cm-tooltip"),e.arrow&&!r.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",r.dom.appendChild(e)}return r.dom.style.position=this.position,r.dom.style.top=Gc,r.dom.style.left="0px",this.container.insertBefore(r.dom,n),r.mount&&r.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(r.dom),r}destroy(){var e,t,r;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),null===(e=n.destroy)||void 0===e||e.call(n);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(r=this.intersectionObserver)||void 0===r||r.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,r=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Xi.safari){let t=e.getBoundingClientRect();r=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else r=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(r||"absolute"==this.position)if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,t=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=xa(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let r=this.manager.tooltipViews[t];return r.getCoords?r.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(Kc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:r}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:r,space:n,scaleX:s,scaleY:i}=e,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:d}=c,h=e.pos[a],u=e.size[a];if(!h||!1!==l.clip&&(h.bottom<=Math.max(r.top,n.top)||h.top>=Math.min(r.bottom,n.bottom)||h.right<Math.max(r.left,n.left)-.1||h.left>Math.min(r.right,n.right)+.1)){d.style.top=Gc;continue}let p=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=u.right-u.left,g=null!==(t=Jc.get(c))&&void 0!==t?t:u.bottom-u.top,O=c.offset||nd,x=this.view.textDirection==So.LTR,b=u.width>n.right-n.left?x?n.left:n.right-u.width:x?Math.max(n.left,Math.min(h.left-(p?14:0)+O.x,n.right-m)):Math.min(Math.max(n.left,h.left-m+(p?14:0)-O.x),n.right-m),v=this.above[a];!l.strictSide&&(v?h.top-g-f-O.y<n.top:h.bottom+g+f+O.y>n.bottom)&&v==n.bottom-h.bottom>h.top-n.top&&(v=this.above[a]=!v);let y=(v?h.top-n.top:n.bottom-h.bottom)-f;if(y<g&&!1!==c.resize){if(y<this.view.defaultLineHeight){d.style.top=Gc;continue}Jc.set(c,g),d.style.height=(g=y)/i+"px"}else d.style.height&&(d.style.height="");let w=v?h.top-g-f-O.y:h.bottom+f+O.y,S=b+m;if(!0!==c.overlap)for(let e of o)e.left<S&&e.right>b&&e.top<w+g&&e.bottom>w&&(w=v?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(d.style.top=(w-e.parent.top)/i+"px",td(d,(b-e.parent.left)/s)):(d.style.top=w/i+"px",td(d,b/s)),p){let e=h.left+(x?O.x:-O.x)-(b+14-7);p.style.left=e/s+"px"}!0!==c.overlap&&o.push({left:b,top:w,right:S,bottom:w+g}),d.classList.toggle("cm-tooltip-above",v),d.classList.toggle("cm-tooltip-below",!v),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Gc}},{eventObservers:{scroll(){this.maybeMeasure()}}});function td(e,t){let r=parseInt(e.style.left,10);(isNaN(r)||Math.abs(t-r)>1)&&(e.style.left=t+"px")}const rd=Nc.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),nd={x:0,y:0},sd=as.define({enables:[ed,rd]}),id=as.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class od{static create(e){return new od(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Uc(e,id,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let n=r[e];if(void 0!==n)if(void 0===t)t=n;else if(t!==n)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const ad=sd.compute([id],e=>{let t=e.facet(id);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos})),create:od.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class ld{constructor(e,t,r,n,s){this.view=e,this.source=t,this.field=r,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,r=e.docView.tile.nearest(t.target);if(!r)return;let n,s=1;if(r.isWidget())n=r.posAtStart;else{if(n=e.posAtCoords(t),null==n)return;let r=e.coordsAtPos(n);if(!r||t.y<r.top||t.y>r.bottom||t.x<r.left-e.defaultCharacterWidth||t.x>r.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(n)).find(e=>e.from<=n&&e.to>=n),o=i&&i.dir==So.RTL?-1:1;s=t.x<r.left?-o:o}let i=this.source(e,n,s);if(null==i?void 0:i.then){let t=this.pending={pos:n};i.then(r=>{this.pending==t&&(this.pending=null,!r||Array.isArray(r)&&!r.length||e.dispatch({effects:this.setHover.of(Array.isArray(r)?r:[r])}))},t=>na(e.state,t,"hover tooltip"))}else!i||Array.isArray(i)&&!i.length||e.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])})}get tooltip(){let e=this.view.plugin(ed),t=e?e.manager.tooltips.findIndex(e=>e.create==od.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!function(e,t){let r,{left:n,right:s,top:i,bottom:o}=e.getBoundingClientRect();if(r=e.querySelector(".cm-tooltip-arrow")){let e=r.getBoundingClientRect();i=Math.min(e.top,i),o=Math.max(e.bottom,o)}return t.clientX>=n-cd&&t.clientX<=s+cd&&t.clientY>=i-cd&&t.clientY<=o+cd}(s.dom,e)||this.pending){let{pos:s}=n[0]||this.pending,i=null!==(r=null===(t=n[0])||void 0===t?void 0:t.end)&&void 0!==r?r:s;(s==i?this.view.posAtCoords(this.lastMove)==s:function(e,t,r,n,s){let i=e.scrollDOM.getBoundingClientRect(),o=e.documentTop+e.documentPadding.top+e.contentHeight;if(i.left>n||i.right<n||i.top>s||Math.min(i.bottom,o)<s)return!1;let a=e.posAtCoords({x:n,y:s},!1);return a>=t&&a<=r}(this.view,s,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const cd=4;const dd=Rs.define();class hd extends Hs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}hd.prototype.elementClass="",hd.prototype.toDOM=void 0,hd.prototype.mapM
vendor: 4,570 bytes, line 7
7ode=Fn.TrackBefore,hd.prototype.startSide=hd.prototype.endSide=-1,hd.prototype.point=!0;const ud=as.define(),pd=as.define(),fd=as.define(),md=as.define({combine:e=>e.some(e=>e)});const gd=aa.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(fd).map(t=>new vd(e,t)),this.fixed=!e.state.facet(md);for(let t of this.gutters)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,r=e.view.viewport,n=Math.min(t.to,r.to)-Math.max(t.from,r.from);this.syncGutters(n<.8*(r.to-r.from))}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(md)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let r=ri.iter(this.view.state.facet(ud),this.view.viewport.from),n=[],s=this.gutters.map(e=>new bd(e,this.view.viewport,-this.view.documentPadding.top));for(let i of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(i.type)){let e=!0;for(let t of i.type)if(t.type==Vi.Text&&e){xd(r,n,t.from);for(let e of s)e.line(this.view,t,n);e=!1}else if(t.widget)for(let e of s)e.widget(this.view,t)}else if(i.type==Vi.Text){xd(r,n,i.from);for(let e of s)e.line(this.view,i,n)}else if(i.widget)for(let e of s)e.widget(this.view,i);for(let i of s)i.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(fd),r=e.state.facet(fd),n=e.docChanged||e.heightChanged||e.viewportChanged||!ri.eq(e.startState.facet(ud),e.state.facet(ud),e.view.viewport.from,e.view.viewport.to);if(t==r)for(let s of this.gutters)s.update(e)&&(n=!0);else{n=!0;let s=[];for(let n of r){let r=t.indexOf(n);r<0?s.push(new vd(this.view,n)):(this.gutters[r].update(e),s.push(this.gutters[r]))}for(let e of this.gutters)e.dom.remove(),s.indexOf(e)<0&&e.destroy();for(let e of s)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=s}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Nc.scrollMargins.of(t=>{let r=t.plugin(e);if(!r||0==r.gutters.length||!r.fixed)return null;let n=r.dom.offsetWidth*t.scaleX,s=r.domAfter?r.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==So.LTR?{left:n,right:s}:{right:n,left:s}})});function Od(e){return Array.isArray(e)?e:[e]}function xd(e,t,r){for(;e.value&&e.from<=r;)e.from==r&&t.push(e.value),e.next()}class bd{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=ri.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:n}=this,s=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==n.elements.length){let t=new yd(e,i,s,r);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,i,s,r);this.height=t.bottom,this.i++}line(e,t,r){let n=[];xd(this.cursor,n,t.from),r.length&&(n=n.concat(r));let s=this.gutter.config.lineMarker(e,t,n);s&&n.unshift(s);let i=this.gutter;(0!=n.length||i.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),n=r?[r]:null;for(let s of e.state.facet(pd)){let r=s(e,t.widget,t);r&&(n||(n=[])).push(r)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class vd{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="
7cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,n=>{let s,i=n.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=n.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[r](e,o,n)&&n.preventDefault()});this.markers=Od(t.markers(e)),t.initialSpacer&&(this.spacer=new yd(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Od(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let r=e.view.viewport;return!ri.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class yd{constructor(e,t,r,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,n)}update(e,t,r,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].compare(t[r]))return!1;return!0}(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let r="cm-gutterElement",n=this.dom.firstChild;for(let s=0,i=0;;){let o=i,a=s<t.length?t[s++]:null,l=!1;if(a){let e=a.elementClass;e&&(r+=" "+e);for(let t=i;t<this.markers.length;t++)if(this.markers[t].compare(a)){o=t,l=!0;break}}else o=this.markers.length;for(;i<o;){let e=this.markers[i++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!a)break;a.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),l&&i++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}const wd=as.define(),Sd=as.define(),kd=as.define({combine:e=>Us(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let n in t){let e=r[n],s=t[n];r[n]=e?(t,r,n)=>e(t,r,n)||s(t,r,n):s}return r}})});class jd extends hd{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Qd(e,t){return e.state.facet(kd).formatNumber(t,e.state)}const Pd=fd.compute([kd],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(wd),lineMarker:(e,t,r)=>r.some(e=>e.toDOM)?null:new jd(Qd(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,r)=>{for(let n of e.state.facet(Sd)){let s=n(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(kd)!=e.state.facet(kd),initialSpacer:e=>new jd(Qd(e,_d(e.state.doc.lines))),updateSpacer(e,t){let r=Qd(t.view,_d(t.view.state.doc.lines));return r==e.number?e:new jd(r)},domEventHandlers:e.facet(kd).domEventHandlers,side:"before"}));function $d(e={}){return[kd.of(e),[gd],Pd]}function _d(e){let t=9;for(;t<e;)t=10*t+9;return t}const Cd=new class extends hd{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Td=ud.compute(["selection"],e=>{let t=[],r=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.head).from;s>r&&(r=s,t.push(Cd.range(s)))}return ri.of(t)});const Nd=1024;let Ed=0;class Ad{constructor(e,t){this.from=e,this.to=t}}class zd{constructor(e={}){this.id=Ed++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Xd.match(e)),t=>{let r=e(t);return void 0===r?null:[this,r]}}}zd.closedBy=new zd({deserialize:e=>e.split(" ")}),zd.openedBy=new zd({deserialize:e=>e.split(" ")}),zd.group=new zd({deserialize:e=>e.split(" ")}),zd.isolate=new zd({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}
vendor: 15,850 bytes, line 7
7),zd.contextHash=new zd({perNode:!0}),zd.lookAhead=new zd({perNode:!0}),zd.mounted=new zd({perNode:!0});class Zd{constructor(e,t,r,n=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=n}static get(e){return e&&e.props&&e.props[zd.mounted.id]}}const Rd=Object.create(null);class Xd{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):Rd,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new Xd(e.name||"",t,e.id,r);if(e.props)for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(zd.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return e=>{for(let r=e.prop(zd.group),n=-1;n<(r?r.length:0);n++){let s=t[n<0?e.name:r[n]];if(s)return s}}}}Xd.none=new Xd("",Object.create(null),0,8);class Md{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let n=null;for(let t of e){let e=t(r);if(e){n||(n=Object.assign({},r.props));let t=e[1],s=e[0];s.combine&&s.id in n&&(t=s.combine(n[s.id],t)),n[s.id]=t}}t.push(n?new Xd(r.name,n,r.id,r.flags):r)}return new Md(t)}}const Dd=new WeakMap,Ld=new WeakMap;var Yd,Id;(Id=Yd||(Yd={}))[Id.ExcludeBuffers=1]="ExcludeBuffers",Id[Id.IncludeAnonymous=2]="IncludeAnonymous",Id[Id.IgnoreMounts=4]="IgnoreMounts",Id[Id.IgnoreOverlays=8]="IgnoreOverlays",Id[Id.EnterBracketed=16]="EnterBracketed";class qd{constructor(e,t,r,n,s){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[e,t]of s)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=Zd.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let e=r.toString();e&&(t&&(t+=","),t+=e)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new nh(this.topNode,e)}cursorAt(e,t=0,r=0){let n=Dd.get(this)||this.topNode,s=new nh(n);return s.moveTo(e,t),Dd.set(this,s._tree),s}get topNode(){return new Ud(this,0,0,null)}resolve(e,t=0){let r=Fd(Dd.get(this)||this.topNode,e,t,!1);return Dd.set(this,r),r}resolveInner(e,t=0){let r=Fd(Ld.get(this)||this.topNode,e,t,!0);return Ld.set(this,r),r}resolveStack(e,t=0){return function(e,t,r){let n=e.resolveInner(t,r),s=null;for(let i=n instanceof Ud?n:n.context.parent;i;i=i.parent)if(i.index<0){let e=i.parent;(s||(s=[n])).push(e.resolve(t,r)),i=e}else{let e=Zd.get(i.tree);if(e&&e.overlay&&e.overlay[0].from<=t&&e.overlay[e.overlay.length-1].to>=t){let o=new Ud(e.tree,e.overlay[0].from+i.from,-1,i);(s||(s=[n])).push(Fd(o,t,r,!1))}}return s?th(s):n}(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:s=this.length}=e,i=e.mode||0,o=(i&Yd.IncludeAnonymous)>0;for(let a=this.cursor(i|Yd.IncludeAnonymous);;){let e=!1;if(a.from<=s&&a.to>=n&&(!o&&a.type.isAnonymous||!1!==t(a))){if(a.firstChild())continue;e=!0}for(;e&&r&&(o||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:ah(Xd.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,r)=>new qd(this.type,e,t,r,this.propValues),e.makeTree||((e,t,r)=>new qd(Xd.none,e,t,r)))}static build(e){return function(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:s=Nd,reused:i=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(r)?new Vd(r,r.length):r,l=n.types,c=0,d=0;function h(e,t,r,x,b,v){let{id:y,start:w,end:S,size:k}=a,j=d,Q=c;if(k<0){if(a.next(),-1==k){let t=i[y];return r.push(t),void x.push(w-e)}if(-3==k)return void(c=y);if(-4==k)return void(d=y);throw new RangeError(`Unrecognized record size: ${k}`)}let P,$,_=l[y],C=w-e;if(S-w<=s&&($=g(a.pos-t,b))){let t=new Uint16Array($.size-$.skip),r=a.pos-$.size,s=t.length;for(;a.pos>r;)s=O($.start,t,s);P=new Wd(t,S-$.start,n),C=$.start-e}else{let e=a.pos-k;a.next();let t=[],r=[],n=y>=o?y:-1,i=0,l=S;for(;a.pos>e;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-s&&(f(t,r,w,i,a.end,l,n,j,Q),i=t.length,l=a.end),a.next()):v>2500?u(w,e,t,r):h(w,e,t,r,n,v+1);if(n>=0&&i>0&&i<t.length&&f(t,r,w,i,w,l,n,j,Q),t.reverse(),r.reverse(),n>-1&&i>0){let e=p(_,Q);P=ah(_,t,r,0,t.length,0,S-w,e,e)}else P=m(_,t,r,S-w,j-S,Q)}r.push(P),x.push(C)}function u(e,t,r,i){let o=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:r,size:n}=a;if(n>4)a.next();else{if(c>-1&&t<c)break;c<0&&(c=r-s),o.push(e,t,r),l++,a.next()}}if(l){let t=new Uint16Array(4*l),s=o[o.length-2];for(let e=o.length-3,r=0;e>=0;e-=3)t[r++]=o[e],t[r++]=o[e+1]-s,t[r++]=o[e+2]-s,t[r++]=r;r.push(new Wd(t,o[2]-s,n)),i.push(s-e)}}function p(e,t){return(r,n,s)=>{let i,o,a=0,l=r.length-1;if(l>=0&&(i=r[l])instanceof qd){if(!l&&i.type==e&&i.length==s)return i;(o=i.prop(zd.lookAhead))&&(a=n[l]+i.length+o)}return m(e,r,n,s,a,t)}}function f(e,t,r,s,i,o,a,l,c){let d=[],h=[];for(;e.length>s;)d.push(e.pop()),h.push(t.pop()+r-i);e.push(m(n.types[a],d,h,o-i,l-o,c)),t.push(i-r)}function m(e,t,r,n,s,i,o){if(i){let e=[zd.contextHash,i];o=o?[e].concat(o):[e]}if(s>25){let e=[zd.lookAhead,s];o=o?[e].concat(o):[e]}return new qd(e,t,r,n,o)}function g(e,t){let r=a.fork(),n=0,i=0,l=0,c=r.end-s,d={size:0,start:0,skip:0};e:for(let s=r.pos-e;r.pos>s;){let e=r.size;if(r.id==t&&e>=0){d.size=n,d.start=i,d.skip=l,l+=4,n+=4,r.next();continue}let a=r.pos-e;if(e<0||a<s||r.start<c)break;let h=r.id>=o?4:0,u=r.start;for(r.next();r.pos>a;){if(r.size<0){if(-3!=r.size&&-4!=r.size)break e;h+=4}else r.id>=o&&(h+=4);r.next()}i=u,n+=e,l+=h}return(t<0||n==e)&&(d.size=n,d.start=i,d.skip=l),d.size>4?d:void 0}function O(e,t,r){let{id:n,start:s,end:i,size:l}=a;if(a.next(),l>=0&&n<o){let o=r;if(l>4){let n=a.pos-(l-4);for(;a.pos>n;)r=O(e,t,r)}t[--r]=o,t[--r]=i-e,t[--r]=s-e,t[--r]=n}else-3==l?c=n:-4==l&&(d=n);return r}let x=[],b=[];for(;a.pos>0;)h(e.start||0,e.bufferStart||0,x,b,-1,0);let v=null!==(t=e.length)&&void 0!==t?t:x.length?b[0]+x[0].length:0;return new qd(l[e.topID],x.reverse(),b.reverse(),v)}(e)}}qd.empty=new qd(Xd.none,[],[],0);class Vd{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Vd(this.buffer,this.index)}}class Wd{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Xd.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],n=this.set.types[t],s=n.name;if(/\W/.test(s)&&!n.isError&&(s=JSON.stringify(s)),r==(e+=4))return s;let i=[];for(;e<r;)i.push(this.childString(e)),e=this.buffer[e+3];return s+"("+i.join(",")+")"}findChild(e,t,r,n,s){let{buffer:i}=this,o=-1;for(let a=e;a!=t&&!(Bd(s,n,i[a+1],i[a+2])&&(o=a,r>0));a=i[a+3]);return o}slice(e,t,r){let n=this.buffer,s=new Uint16Array(t-e),i=0;for(let o=e,a=0;o<t;){s[a++]=n[o++],s[a++]=n[o++]-r;let t=s[a++]=n[o++]-r;s[a++]=n[o++]-e,i=Math.max(i,t)}return new Wd(s,i,this.set)}}function Bd(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function Fd(e,t,r,n){for(var s;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof Ud&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=n?0:Yd.IgnoreOverlays;if(n)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof Ud&&o.index<0&&(null===(s=a.enter(t,r,i))||void 0===s?void 0:s.from)!=o.from&&(e=a);for(;;){let n=e.enter(t,r,i);if(!n)return e;e=n}}class Gd{cursor(e=0){return new nh(this,e)}getChild(e,t=null,r=null){let n=Hd(this,e,t,r);return n.length?n[0]:null}getChildren(e,t=null,r=null){return Hd(this,e,t,r)}resolve(e,t=0){return Fd(this,e,t,!1)}resolveInner(e,t=0){return Fd(this,e,t,!0)}matchContext(e){return Kd(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(r=t,t=e.prevSibling):t=e}return r}get node(){return this}get next(){return this.parent}}class Ud extends Gd{constructor(e,t,r,n){super(),this._tree=e,this.from=t,this.index=r,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,n,s=0){for(let i=this;;){for(let{children:o,positions:a}=i._tree,l=t>0?o.length:-1;e!=l;e+=t){let l,c=o[e],d=a[e]+i.from;if(s&Yd.EnterBracketed&&c instanceof qd&&(l=Zd.get(c))&&!l.overlay&&l.bracketed&&r>=d&&r<=d+c.length||Bd(n,r,d,d+c.length))if(c instanceof Wd){if(s&Yd.ExcludeBuffers)continue;let o=c.findChild(0,c.buffer.length,t,r-d,n);if(o>-1)return new eh(new Jd(i,c,e,d),null,o)}else if(s&Yd.IncludeAnonymous||!c.type.isAnonymous||sh(c)){let o;if(!(s&Yd.IgnoreMounts)&&(o=Zd.get(c))&&!o.overlay)return new Ud(o.tree,d,e,i);let a=new Ud(c,d,e,i);return s&Yd.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?c.children.length-1:0,t,r,n,s)}}if(s&Yd.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let n;if(!(r&Yd.IgnoreOverlays)&&(n=Zd.get(this._tree))&&n.overlay){let s=e-this.from,i=r&Yd.EnterBracketed&&n.bracketed;for(let{from:e,to:r}of n.overlay)if((t>0||i?e<=s:e<s)&&(t<0||i?r>=s:r>s))return new Ud(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Hd(e,t,r,n){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(null!=r)for(let o=!1;!o;)if(o=s.type.is(r),!s.nextSibling())return i;for(;;){if(null!=n&&s.type.is(n))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return null==n?i:[]}}function Kd(e,t,r=t.length-1){for(let n=e;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}class Jd{constructor(e,t,r,n){this.parent=e,this.buffer=t,this.index=r,this.start=n}}class eh extends Gd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new eh(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Yd.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new eh(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new eh(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new eh(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,n=this.index+4,s=r.buffer[this.index+3];if(s>n){let i=r.buffer[this.index+1];e.push(r.slice(n,s,i)),t.push(0)}return new qd(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function th(e){if(!e.length)return null;let t=0,r=e[0];for(let i=1;i<e.length;i++){let n=e[i];(n.from>r.from||n.to<r.to)&&(r=n,t=i)}let n=r instanceof Ud&&r.index<0?null:r.parent,s=e.slice();return n?s[t]=n:s.splice(t,1),new rh(s,r)}class rh{constructor(e,t){this.heads=e,this.node=t}get next(){return th(this.heads)}}class nh{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Yd.EnterBracketed,e instanceof Ud)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:r,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=r+n.buffer[e+1],this.to=r+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof Ud?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,r);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?!(r&Yd.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Yd.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Yd.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let e=r<0?0:this.stack[r]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(e)}return r<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:n}
vendor: 8,818 bytes, line 7
7=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:r}=n)}else({index:t,_parent:r}=this._tree);for(;r;({index:t,_parent:r}=r))if(t>-1)for(let n=t+e,s=e<0?-1:r._tree.children.length;n!=s;n+=e){let e=r._tree.children[n];if(this.mode&Yd.IncludeAnonymous||e instanceof Wd||!e.type.isAnonymous||sh(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let n=this.index,s=this.stack.length;s>=0;){for(let i=e;i;i=i._parent)if(i.index==n){if(n==this.index)return i;t=i,r=s+1;break e}n=this.stack[--s]}for(let n=r;n<this.stack.length;n++)t=new eh(this.buffer,t,this.stack[n]);return this.bufferNode=new eh(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){r++;continue}this.type.isAnonymous||(n=!0)}for(;;){if(n&&t&&t(this),n=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,n=!0}}}matchContext(e){if(!this.buffer)return Kd(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let n=e.length-1,s=this.stack.length-1;n>=0;s--){if(s<0)return Kd(this._tree,e,n);let i=r[t.buffer[this.stack[s]]];if(!i.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}}function sh(e){return e.children.some(e=>e instanceof Wd||!e.type.isAnonymous||sh(e))}const ih=new WeakMap;function oh(e,t){if(!e.isAnonymous||t instanceof Wd||t.type!=e)return 1;let r=ih.get(t);if(null==r){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof qd)){r=1;break}r+=oh(e,n)}ih.set(t,r)}return r}function ah(e,t,r,n,s,i,o,a,l){let c=0;for(let p=n;p<s;p++)c+=oh(e,t[p]);let d=Math.ceil(1.5*c/8),h=[],u=[];return function t(r,n,s,o,a){for(let c=s;c<o;){let s=c,p=n[c],f=oh(e,r[c]);for(c++;c<o;c++){let t=oh(e,r[c]);if(f+t>=d)break;f+=t}if(c==s+1){if(f>d){let e=r[s];t(e.children,e.positions,0,e.children.length,n[s]+a);continue}h.push(r[s])}else{let t=n[c-1]+r[c-1].length-p;h.push(ah(e,r,n,s,c,p,t,null,l))}u.push(p+a-i)}}(t,r,n,s,0),(a||l)(h,u,o)}class lh{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof eh?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ud&&this.map.set(e.tree,t)}get(e){return e instanceof eh?this.getBuffer(e.context.buffer,e.index):e instanceof Ud?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ch{constructor(e,t,r,n,s=!1,i=!1){this.from=e,this.to=t,this.tree=r,this.offset=n,this.open=(s?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],r=!1){let n=[new ch(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&n.push(s);return n}static applyChanges(e,t,r=128){if(!t.length)return e;let n=[],s=1,i=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let c=o<t.length?t[o]:null,d=c?c.fromA:1e9;if(d-a>=r)for(;i&&i.from<d;){let t=i;if(a>=t.from||d<=t.to||l){let e=Math.max(t.from,a)-l,r=Math.min(t.to,d)-l;t=e>=r?null:new ch(e,r,t.tree,t.offset+l,o>0,!!c)}if(t&&n.push(t),i.to>d)break;i=s<e.length?e[s++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return n}}class dh{startParse(e,t,r){return"string"==typeof e&&(e=new hh(e)),r=r?r.length?r.map(e=>new Ad(e.from,e.to)):[new Ad(0,0)]:[new Ad(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let n=this.startParse(e,t,r);for(;;){let e=n.advance();if(e)return e}}}class hh{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}class uh{constructor(e,t,r,n,s,i){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=n,this.target=s,this.from=i}}function ph(e){if(!e.length||e.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class fh{constructor(e,t,r,n,s,i,o,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=n,this.start=s,this.bracketed=i,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const mh=new zd({perNode:!0});class gh{constructor(e,t,r,n,s){this.nest=t,this.input=r,this.fragments=n,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new qd(e.type,e.children,e.positions,e.length,e.propValues.concat([[mh,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[zd.mounted.id]=new Zd(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new yh(this.fragments),t=null,r=null,n=new nh(new Ud(this.baseTree,this.ranges[0].from,0,null),Yd.IncludeAnonymous|Yd.IgnoreMounts);e:for(let s,i;;){let o,a=!0;if(null!=this.stoppedAt&&n.from>=this.stoppedAt)a=!1;else if(e.hasNode(n)){if(t){let e=t.mounts.find(e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay);if(e)for(let r of e.mount.overlay){let s=r.from+e.pos,i=r.to+e.pos;s>=n.from&&i<=n.to&&!t.ranges.some(e=>e.from<i&&e.to>s)&&t.ranges.push({from:s,to:i})}}a=!1}else if(r&&(i=Oh(r.ranges,n.from,n.to)))a=2!=i;else if(!n.type.isAnonymous&&(s=this.nest(n,this.input))&&(n.from<n.to||!s.overlay)){n.tree||(bh(n),t&&t.depth++,r&&r.depth++);let i=e.findMounts(n.from,s.parser);if("function"==typeof s.overlay)t=new fh(s.parser,s.overlay,i,this.inner.length,n.from,!!s.bracketed,n.tree,t);else{let e=wh(this.ranges,s.overlay||(n.from<n.to?[new Ad(n.from,n.to)]:[]));e.length&&ph(e),!e.length&&s.overlay||this.inner.push(new uh(s.parser,e.length?s.parser.startParse(this.input,kh(i,e),e):s.parser.startParse(""),s.overlay?s.overlay.map(e=>new Ad(e.from-n.from,e.to-n.from)):null,!!s.bracketed,n.tree,e.length?e[0].from:n.from)),s.overlay?e.length&&(r={ranges:e,depth:0,prev:r}):a=!1}}else if(t&&(o=t.predicate(n))&&(!0===o&&(o=new Ad(n.from,n.to)),o.from<o.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==o.from?t.ranges[e]={from:t.ranges[e].from,to:o.to}:t.ranges.push(o)}if(a&&n.firstChild())t&&t.depth++,r&&r.depth++;else for(;!n.nextSibling();){if(!n.parent())break e;if(t&&! --t.depth){let e=wh(this.ranges,t.ranges);e.length&&(ph(e),this.inner.splice(t.index,0,new uh(t.parser,t.parser.startParse(this.input,kh(t.mounts,e),e),t.ranges.map(e=>new Ad(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}r&&! --r.depth&&(r=r.prev)}}}}function Oh(e,t,r){for(let n of e){if(n.from>=r)break;if(n.to>t)return n.from<=t&&n.to>=r?2:1}return 0}function xh(e,t,r,n,s,i){if(t<r){let o=e.buffer[t+1];n.push(e.slice(t,r,o)),s.push(o-i)}}function bh(e){let{node:t}=e,r=[],n=t.context.buffer;do{r.push(e.index),e.parent()}while(!e.tree);let s=e.tree,i=s.children.indexOf(n),o=s.children[i],a=o.buffer,l=[i];s.children[i]=function e(n,s,i,c,d,h){let u=r[h],p=[],f=[];xh(o,n,u,p,f,c);let m=a[u+1],g=a[u+2];l.push(p.length);let O=h?e(u+4,a[u+3],o.set.types[a[u]],m,g-m,h-1):t.toTree();return p.push(O),f.push(m-c),xh(o,a[u+3],s,p,f,c),new qd(i,p,f,d)}(0,a.length,Xd.none,0,o.length,r.length-1);for(let c of l){let t=e.tree.children[c],r=e.tree.positions[c];e.yield(new Ud(t,r+e.from,c,e._tree))}}class vh{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Yd.IncludeAnonymous|Yd.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Yd.IgnoreOverlays|Yd.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;
7if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof qd))break;t=t.children[0]}return!1}}let yh=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=null!==(t=r.tree.prop(mh))&&void 0!==t?t:r.to,this.inner=new vh(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(mh))&&void 0!==e?e:t.to,this.inner=new vh(t.tree,-t.offset)}}findMounts(e,t){var r;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let s=null===(r=e.tree)||void 0===r?void 0:r.prop(zd.mounted);if(s&&s.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let r=this.fragments[t];if(r.from>=e.to)break;r.tree==this.curFrag.tree&&n.push({frag:r,pos:e.from-r.offset,mount:s})}}}return n}};function wh(e,t){let r=null,n=t;for(let s=1,i=0;s<e.length;s++){let o=e[s-1].to,a=e[s].from;for(;i<n.length;i++){let e=n[i];if(e.from>=a)break;e.to<=o||(r||(n=r=t.slice()),e.from<o?(r[i]=new Ad(e.from,o),e.to>a&&r.splice(i+1,0,new Ad(a,e.to))):e.to>a?r[i--]=new Ad(a,e.to):r.splice(i--,1))}}return n}function Sh(e,t,r,n){let s=0,i=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let d=s==e.length?1e9:o?e[s].to:e[s].from,h=i==t.length?1e9:a?t[i].to:t[i].from;if(o!=a){let e=Math.max(l,r),t=Math.min(d,h,n);e<t&&c.push(new Ad(e,t))}if(l=Math.min(d,h),1e9==l)break;d==l&&(o?(o=!1,s++):o=!0),h==l&&(a?(a=!1,i++):a=!0)}return c}function kh(e,t){let r=[];for(let{pos:n,mount:s,frag:i}of e){let e=n+(s.overlay?s.overlay[0].from:0),o=e+s.tree.length,a=Math.max(i.from,e),l=Math.min(i.to,o);if(s.overlay){let o=Sh(t,s.overlay.map(e=>new Ad(e.from+n,e.to+n)),a,l);for(let t=0,n=a;;t++){let a=t==o.length,c=a?l:o[t].from;if(c>n&&r.push(new ch(n,c,s.tree,-e,i.from>=n||i.openStart,i.to<=c||i.openEnd)),a)break;n=o[t].to}}else r.push(new ch(a,l,s.tree,-e,i.from>=e||i.openStart,i.to<=o||i.openEnd))}return r}let jh=0;class Qh{constructor(e,t,r,n){this.name=e,this.set=t,this.base=r,this.modified=n,this.id=jh++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r="string"==typeof e?e:"?";if(e instanceof Qh&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let n=new Qh(r,[],null,[]);if(n.set.push(n),t)for(let s of t.set)n.set.push(s);return n}static defineModifier(e){let t=new $h(e);return e=>e.modified.indexOf(t)>-1?e:$h.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let Ph=0;class $h{constructor(e){this.name=e,this.instances=[],this.id=Ph++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(r=>
vendor: 16,774 bytes, line 7
7{return r.base==e&&(n=t,s=r.modified,n.length==s.length&&n.every((e,t)=>e==s[t]));var n,s});if(r)return r;let n=[],s=new Qh(e.name,n,e,t);for(let o of t)o.instances.push(s);let i=function(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,s=t.length;n<s;n++)t.push(t[n].concat(e[r]));return t.sort((e,t)=>t.length-e.length)}(t);for(let o of e.set)if(!o.modified.length)for(let e of i)n.push($h.get(o,e));return s}}function _h(e){let t=Object.create(null);for(let r in e){let n=e[r];Array.isArray(n)||(n=[n]);for(let e of r.split(" "))if(e){let r=[],s=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!n)throw new RangeError("Invalid path: "+e);if(r.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let o=r.length-1,a=r[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new Th(n,s,o>0?r.slice(0,o):null);t[a]=l.sort(t[a])}}return Ch.add(t)}const Ch=new zd({combine(e,t){let r,n,s;for(;e||t;){if(!e||t&&e.depth>=t.depth?(s=t,t=t.next):(s=e,e=e.next),r&&r.mode==s.mode&&!s.context&&!r.context)continue;let i=new Th(s.tags,s.mode,s.context);r?r.next=i:n=i,r=i}return n}});class Th{constructor(e,t,r,n){this.tags=e,this.mode=t,this.context=r,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function Nh(e,t){let r=Object.create(null);for(let i of e)if(Array.isArray(i.tag))for(let e of i.tag)r[e.id]=i.class;else r[i.tag.id]=i.class;let{scope:n,all:s=null}=t||{};return{style:e=>{let t=s;for(let n of e)for(let e of n.set){let n=r[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function Eh(e,t,r,n=0,s=e.length){let i=new Ah(n,Array.isArray(t)?t:[t],r);i.highlightRange(e.cursor(),n,s,"",i.highlighters),i.flush(s)}Th.empty=new Th([],2,null);class Ah{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,n,s){let{type:i,from:o,to:a}=e;if(o>=r||a<=t)return;i.isTop&&(s=this.highlighters.filter(e=>!e.scope||e.scope(i)));let l=n,c=function(e){let t=e.type.prop(Ch);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||Th.empty,d=function(e,t){let r=null;for(let n of e){let e=n.style(t);e&&(r=r?r+" "+e:e)}return r}(s,c.tags);if(d&&(l&&(l+=" "),l+=d,1==c.mode&&(n+=(n?" ":"")+d)),this.startSpan(Math.max(t,o),l),c.opaque)return;let h=e.tree&&e.tree.prop(zd.mounted);if(h&&h.overlay){let i=e.node.enter(h.overlay[0].from+o,1),c=this.highlighters.filter(e=>!e.scope||e.scope(h.tree.type)),d=e.firstChild();for(let u=0,p=o;;u++){let f=u<h.overlay.length?h.overlay[u]:null,m=f?f.from+o:a,g=Math.max(t,p),O=Math.min(r,m);if(g<O&&d)for(;e.from<O&&(this.highlightRange(e,g,O,n,s),this.startSpan(Math.min(O,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>r)break;p=f.to+o,p>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+o),Math.min(r,p),"",c),this.startSpan(Math.min(r,p),l))}d&&e.parent()}else if(e.firstChild()){h&&(n="");do{if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,n,s),this.startSpan(Math.min(r,e.to),l)}}while(e.nextSibling());e.parent()}}}const zh=Qh.define,Zh=zh(),Rh=zh(),Xh=zh(Rh),Mh=zh(Rh),Dh=zh(),Lh=zh(Dh),Yh=zh(Dh),Ih=zh(),qh=zh(Ih),Vh=zh(),Wh=zh(),Bh=zh(),Fh=zh(Bh),Gh=zh(),Uh={comment:Zh,lineComment:zh(Zh),blockComment:zh(Zh),docComment:zh(Zh),name:Rh,variableName:zh(Rh),typeName:Xh,tagName:zh(Xh),propertyName:Mh,attributeName:zh(Mh),className:zh(Rh),labelName:zh(Rh),namespace:zh(Rh),macroName:zh(Rh),literal:Dh,string:Lh,docString:zh(Lh),character:zh(Lh),attributeValue:zh(Lh),number:Yh,integer:zh(Yh),float:zh(Yh),bool:zh(Dh),regexp:zh(Dh),escape:zh(Dh),color:zh(Dh),url:zh(Dh),keyword:Vh,self:zh(Vh),null:zh(Vh),atom:zh(Vh),unit:zh(Vh),modifier:zh(Vh),operatorKeyword:zh(Vh),controlKeyword:zh(Vh),definitionKeyword:zh(Vh),moduleKeyword:zh(Vh),operator:Wh,derefOperator:zh(Wh),arithmeticOperator:zh(Wh),logicOperator:zh(Wh),bitwiseOperator:zh(Wh),compareOperator:zh(Wh),updateOperator:zh(Wh),definitionOperator:zh(Wh),typeOperator:zh(Wh),controlOperator:zh(Wh),punctuation:Bh,separator:zh(Bh),bracket:Fh,angleBracket:zh(Fh),squareBracket:zh(Fh),paren:zh(Fh),brace:zh(Fh),content:Ih,heading:qh,heading1:zh(qh),heading2:zh(qh),heading3:zh(qh),heading4:zh(qh),heading5:zh(qh),heading6:zh(qh),contentSeparator:zh(Ih),list:zh(Ih),quote:zh(Ih),emphasis:zh(Ih),strong:zh(Ih),link:zh(Ih),monospace:zh(Ih),strikethrough:zh(Ih),inserted:zh(),deleted:zh(),changed:zh(),invalid:zh(),meta:Gh,documentMeta:zh(Gh),annotation:zh(Gh),processingInstruction:zh(Gh),definition:Qh.defineModifier("definition"),constant:Qh.defineModifier("constant"),function:Qh.defineModifier("function"),standard:Qh.defineModifier("standard"),local:Qh.defineModifier("local"),special:Qh.defineModifier("special")};for(let Tx in Uh){let e=Uh[Tx];e instanceof Qh&&(e.name=Tx)}var Hh;Nh([{tag:Uh.link,class:"tok-link"},{tag:Uh.heading,class:"tok-heading"},{tag:Uh.emphasis,class:"tok-emphasis"},{tag:Uh.strong,class:"tok-strong"},{tag:Uh.keyword,class:"tok-keyword"},{tag:Uh.atom,class:"tok-atom"},{tag:Uh.bool,class:"tok-bool"},{tag:Uh.url,class:"tok-url"},{tag:Uh.labelName,class:"tok-labelName"},{tag:Uh.inserted,class:"tok-inserted"},{tag:Uh.deleted,class:"tok-deleted"},{tag:Uh.literal,class:"tok-literal"},{tag:Uh.string,class:"tok-string"},{tag:Uh.number,class:"tok-number"},{tag:[Uh.regexp,Uh.escape,Uh.special(Uh.string)],class:"tok-string2"},{tag:Uh.variableName,class:"tok-variableName"},{tag:Uh.local(Uh.variableName),class:"tok-variableName tok-local"},{tag:Uh.definition(Uh.variableName),class:"tok-variableName tok-definition"},{tag:Uh.special(Uh.variableName),class:"tok-variableName2"},{tag:Uh.definition(Uh.propertyName),class:"tok-propertyName tok-definition"},{tag:Uh.typeName,class:"tok-typeName"},{tag:Uh.namespace,class:"tok-namespace"},{tag:Uh.className,class:"tok-className"},{tag:Uh.macroName,class:"tok-macroName"},{tag:Uh.propertyName,class:"tok-propertyName"},{tag:Uh.operator,class:"tok-operator"},{tag:Uh.comment,class:"tok-comment"},{tag:Uh.meta,class:"tok-meta"},{tag:Uh.invalid,class:"tok-invalid"},{tag:Uh.punctuation,class:"tok-punctuation"}]);const Kh=new zd;function Jh(e){return as.define({combine:e?t=>t.concat(e):void 0})}const eu=new zd;class tu{constructor(e,t,r=[],n=""){this.data=e,this.name=n,Gs.prototype.hasOwnProperty("tree")||Object.defineProperty(Gs.prototype,"tree",{get(){return su(this)}}),this.parser=t,this.extension=[pu.of(this),Gs.languageData.of((e,t,r)=>{let n=ru(e,t,r),s=n.type.prop(Kh);if(!s)return[];let i=e.facet(s),o=n.type.prop(eu);if(o){let s=n.resolve(t-n.from,r);for(let t of o)if(t.test(s,e)){let r=e.facet(t.facet);return"replace"==t.type?r:r.concat(i)}}return i})].concat(r)}isActiveAt(e,t,r=-1){return ru(e,t,r).type.prop(Kh)==this.data}findRegions(e){let t=e.facet(pu);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],n=(e,t)=>{if(e.prop(Kh)==this.data)return void r.push({from:t,to:t+e.length});let s=e.prop(zd.mounted);if(s){if(s.tree.prop(Kh)==this.data){if(s.overlay)for(let e of s.overlay)r.push({from:e.from+t,to:e.to+t});else r.push({from:t,to:t+e.length});return}if(s.overlay){let e=r.length;if(n(s.tree,s.overlay[0].from+t),r.length>e)return}}for(let r=0;r<e.children.length;r++){let s=e.children[r];s instanceof qd&&n(s,e.positions[r]+t)}};return n(su(e),0),r}get allowsNesting(){return!0}}function ru(e,t,r){let n=e.facet(pu),s=su(e).topNode;if(!n||n.allowsNesting)for(let i=s;i;i=i.enter(t,r,Yd.ExcludeBuffers|Yd.EnterBracketed))i.type.isTop&&(s=i);return s}tu.setState=Rs.define();class nu extends tu{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Jh(e.languageData);return new nu(t,e.parser.configure({props:[Kh.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new nu(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function su(e){let t=e.field(tu.state,!1);return t?t.tree:qd.empty}class iu{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let ou=null;class au{constructor(e,t,r=[],n,s,i,o,a){this.parser=e,this.state=t,this.fragments=r,this.tree=n,this.treeLen=s,this.viewport=i,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new au(e,t,[],qd.empty,0,r,[],null)}startParse(){return this.parser.startParse(new iu(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=qd.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(ch.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(r=this.parse.stoppedAt)&&void 0!==r?r:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ch.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ou;ou=this;try{return e()}finally{ou=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=lu(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:n,treeLen:s,viewport:i,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,r,n,s)=>t.push({fromA:e,toA:r,fromB:n,toB:s})),r=ch.applyChanges(r,t),n=qd.empty,s=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let r=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);r<n&&o.push({from:r,to:n})}}}return new au(this.parser,t,r,n,s,i,o,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:t,to:n}=this.skipped[r];t<e.to&&n>e.from&&(this.fragments=lu(this.fragments,t,n),this.skipped.splice(r--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends dh{createParse(t,r,n){let s=n[0].from,i=n[n.length-1].to;return{parsedPos:s,advance(){let t=ou;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new qd(Xd.none,[],[],i-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return ou}}function lu(e,t,r){return ch.applyChanges(e,[{fromA:t,toA:r,fromB:t,toB:r}])}class cu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new cu(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=au.create(e.facet(pu).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new cu(r)}}tu.state=fs.define({create:cu.init,update(e,t){for(let r of t.effects)if(r.is(tu.setState))return r.value;return t.startState.facet(pu)!=t.state.facet(pu)?cu.init(t.state):e.apply(t)}});let du=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(du=e=>{let t=-1,r=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(r):cancelIdleCallback(t)});const hu="undefined"!=typeof navigator&&(null===(Hh=navigator.scheduling)||void 0===Hh?void 0:Hh.isInputPending)?()=>navigator.scheduling.isInputPending():null,uu=aa.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(tu.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(tu.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=du(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:n}}=this.view,s=r.field(tu.state);if(s.tree==s.context.tree&&s.context.isDone(n+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!hu?Math.max(25,e.timeRemaining()-5):1e9),o=s.context.treeLen<n&&r.doc.length>n+1e3,a=s.context.work(()=>hu&&hu()||Date.now()>i,n+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:tu.setState.of(new cu(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>na(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pu=as.define({combine:e=>e.length?e[0]:null,enables:e=>[tu.state,uu,Nc.contentAttributes.compute([e],t=>{let r=t.facet(e);return r&&r.name?{"data-language":r.name}:{}})]});class fu{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const mu=as.define(),gu=as.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Ou(e){let t=e.facet(gu);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function xu(e,t){let r="",n=e.tabSize,s=e.facet(gu)[0];if("\t"==s){for(;t>=n;)r+="\t",t-=n;s=" "}for(let i=0;i<t;i++)r+=s;return r}function bu(e,t){e instanceof Gs&&(e=new vu(e));for(let n of e.state.facet(mu)){let r=n(e,t);if(void 0!==r)return r}let r=su(e.state);return r.length>=t?function(e,t,r){let n=t.resolveStack(r),s=t.resolveInner(r,-1).resolve(r,0).enterUnfinishedNodesBefore(r);if(s!=n.node){let e=[];for(let t=s;t&&!(t.from<n.node.from||t.to>n.node.to||t.from==n.node.from&&t.type==n.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return wu(n,e,r)}(e,r,t):null}class vu{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ou(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=r.from&&n<=r.to?s&&n==e?{text:"",from:e}:(t<0?n<e:n<=e)?{text:r.text.slice(n-r.from),from:n}:{text:r.text.slice(0,n-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:n}=this.lineAt(e,t);return r.slice(e-n,Math.min(r.length,e+100-n))}column(e,t=1){let{text:r,from:n}=this.lineAt(e,t),s=this.countColumn(r,e-n),i=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return i>-1&&(s+=i-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return fi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:n}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(n);if(e>-1)return e}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const yu=new zd;function wu(e,t,r){for(let n=e;n;n=n.next){let e=Su(n.node);
7if(e)return e(ju.create(t,r,n))}return 0}function Su(e){let t=e.type.prop(yu);if(t)return t;let r,n=e.firstChild;if(n&&(r=n.type.prop(zd.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>$u(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?ku:null}function ku(){return 0}class ju extends vu{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new ju(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Qu(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return wu(this.context.next,this.base,this.pos)}}function Qu(e,t){for(let r=t;r;r=r.parent)if(e==r)return!0;return!1}function Pu({closing:e,align:t=!0,units:r=1}){return n=>$u(n,t,r,e)}function $u(e,t,r,n,s){let i=e.textAfter,o=i.match(/^\s*/)[0].length,a=n&&i.slice(o,o+n.length)==n||s==e.pos+o,l=t?function(e){let t=e.node,r=t.childAfter(t.from),n=t.lastChild;if(!r)return null;let s=e.options.simulateBreak,i=e.state.doc.lineAt(r.from),o=null==s||s<=i.from?i.to:Math.min(i.to,s);for(let a=r.to;;){let e=t.childAfter(a);if(!e||e==n)return null;if(!e.type.isSkipped){if(e.from>=o)return null;let t=/^ */.exec(i.text.slice(r.to-i.from))[0].length;return{from:r.from,to:r.to+t}}a=e.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*r)}function _u({except:e,units:t=1}={}){return r=>{let n=e&&e.test(r.textAfter);return r.baseIndent+(n?0:t*r.unit)}}const Cu=new zd;function Tu(e){let t=e.firstChild,r=e.lastChild;return t&&t.to<r.from?{from:t.to,to:r.type.isError?e.to:r.from}:null}class Nu{constructor(e,t){let r;function n(e){let t=xi.newName();return(r||(r=Object.create(null)))["."+t]=e,t}this.specs=e;const s="string"==typeof t.all?t.all:t.all?n(t.all):void 0,i=t.scope;this.scope=i instanceof tu?e=>e.prop(Kh)==i.data:i?e=>e==i:void 0,this.style=Nh(e.map(e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))})),{all:s}).style,this.module=r?new xi(r):null,this.themeType=t.themeType}static define(e,t){return new Nu(e,t||{})}}const Eu=as.define(),Au=as.define({combine:e=>e.length?[e[0]]:null});function zu(e){let t=e.facet(Eu);return t.length?t:e.facet(Au)}function Zu(e,t){let r,n=[Xu];return e instanceof Nu&&(e.module&&n.push(Nc.styleModule.of(e.module)),r=e.themeType),r?n.push(Eu.computeN([Nc.darkTheme],t=>t.facet(Nc.darkTheme)==("dark"==r)?[e]:[])):n.push(Eu.of(e)),n}class Ru{constructor(e){this.markCache=Object.create(null),this.tree=su(e.state),this.decorations=this.buildDeco(e,zu(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=su(e.state),r=zu(e.state),n=r!=zu(e.startState),{viewport:s}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!n&&t.type==this.tree.type&&i>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Wi.none;let r=new ni;for(let{from:n,to:s}of e.visibleRanges)Eh(this.tree,t,(e,t,n)=>{r.add(e,t,this.markCache[n]||(this.markCache[n]=Wi.mark({class:n})))},n,s);return r.finish()}}const Xu=vs.high(aa.fromClass(Ru,{decorations:e=>e.decorations})),Mu=Nc.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Du="()[]{}",Lu=as.define({combine:e=>Us(e,{afterCursor:!0,brackets:Du,maxScanDistance:1e4,renderMatch:qu})}),Yu=Wi.mark({class:"cm-matchingBracket"}),Iu=Wi.mark({class:"cm-nonmatchingBracket"});function qu(e){let t=[],r=e.matched?Yu:Iu;return t.push(r.range(e.start.from,e.start.to)),e.end&&t.push(r.range(e.end.from,e.end.to)),t}function Vu(e){let t=[],r=e.facet(Lu);for(let n of e.selection.ranges){if(!n.empty)continue;let s=Hu(e,n.head,-1,r)||n.head>
70&&Hu(e,n.head-1,1,r)||r.afterCursor&&(Hu(e,n.head,1,r)||n.head<e.doc.length&&Hu(e,n.head+1,-1,r));s&&(t=t.concat(r.renderMatch(s,e)))}return Wi.set(t,!0)}const Wu=[aa.fromClass(class{constructor(e){this.paused=!1,this.decorations=Vu(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=Vu(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),Mu];function Bu(e={}){return[Lu.of(e),Wu]}const Fu=new zd;function Gu(e,t,r){let n=e.prop(t<0?zd.openedBy:zd.closedBy);if(n)return n;if(1==e.name.length){let n=r.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[r[n+t]]}return null}function Uu(e){let t=e.type.prop(Fu);return t?t(e.node):e}function Hu(e,t,r,n={}){let s=n.maxScanDistance||1e4,i=n.brackets||Du,o=su(e),a=o.resolveInner(t,r);for(let l=a;l;l=l.parent){let n=Gu(l.type,r,i);if(n&&l.from<l.to){let s=Uu(l);if(s&&(r>0?t>=s.from&&t<s.to:t>s.from&&t<=s.to))return Ku(e,t,r,l,s,n,i)}}return function(e,t,r,n,s,i,o){let a=r<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%2==0!=r>0)return null;let c={from:r<0?t-1:t,to:r>0?t+1:t},d=e.doc.iterRange(t,r>0?e.doc.length:0),h=0;for(let u=0;!d.next().done&&u<=i;){let e=d.value;r<0&&(u+=e.length);let i=t+u*r;for(let t=r>0?0:e.length-1,a=r>0?e.length:-1;t!=a;t+=r){let a=o.indexOf(e[t]);if(!(a<0||n.resolveInner(i+t,1).type!=s))if(a%2==0==r>0)h++;else{if(1==h)return{start:c,end:{from:i+t,to:i+t+1},matched:a>>1==l>>1};h--}}r>0&&(u+=e.length)}return d.done?{start:c,matched:!1}:null}(e,t,r,o,a.type,s,i)}function Ku(e,t,r,n,s,i,o){let a=n.parent,l={from:s.from,to:s.to},c=0,d=null==a?void 0:a.cursor();if(d&&(r<0?d.childBefore(n.from):d.childAfter(n.to)))do{if(r<0?d.to<=n.from:d.from>=n.to){if(0==c&&i.indexOf(d.type.name)>-1&&d.from<d.to){let e=Uu(d);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Gu(d.type,r,o))c++;else if(Gu(d.type,-r,o)){if(0==c){let e=Uu(d);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(r<0?d.prevSibling():d.nextSibling());return{start:l,matched:!1}}const Ju=Object.create(null),ep=[Xd.none],tp=[],rp=Object.create(null),np=Object.create(null);for(let[Tx,Nx]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])np[Tx]=ip(Ju,Nx);function sp(e,t){tp.indexOf(e)>-1||tp.push(e)}function ip(e,t){let r=[];for(let a of t.split(" ")){let t=[];for(let r of a.split(".")){let n=e[r]||Uh[r];n?"function"==typeof n?t.length?t=t.map(n):sp(r):t.length?sp(r):t=Array.isArray(n)?n:[n]:sp(r)}for(let e of t)r.push(e)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),s=n+" "+r.map(e=>e.id),i=rp[s];if(i)return i.id;let o=rp[s]=Xd.define({id:ep.length,name:n,props:[_h({[n]:r})]});return ep.push(o),o.id}So.RTL,So.LTR;function op(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let s=e(t,r);return!!s&&(n(r.update(s)),!0)}}
vendor: 7,111 bytes, line 7
7const ap=op(pp,0),lp=op(up,0),cp=op((e,t)=>up(e,t,function(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),s=r.to<=n.to?n:e.doc.lineAt(r.to);s.from>n.from&&s.from==r.to&&(s=r.to==n.to+1?n:e.doc.lineAt(r.to-1));let i=t.length-1;i>=0&&t[i].to>n.from?t[i].to=s.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return t}(t)),0);function dp(e,t){let r=e.languageDataAt("commentTokens",t,1);return r.length?r[0]:{}}const hp=50;function up(e,t,r=t.selection.ranges){let n=r.map(e=>dp(t,e.from).block);if(!n.every(e=>e))return null;let s=r.map((e,r)=>function(e,{open:t,close:r},n,s){let i,o,a=e.sliceDoc(n-hp,n),l=e.sliceDoc(s,s+hp),c=/\s*$/.exec(a)[0].length,d=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-t.length,h)==t&&l.slice(d,d+r.length)==r)return{open:{pos:n-c,margin:c&&1},close:{pos:s+d,margin:d&&1}};s-n<=2*hp?i=o=e.sliceDoc(n,s):(i=e.sliceDoc(n,n+hp),o=e.sliceDoc(s-hp,s));let u=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(o)[0].length,f=o.length-p-r.length;return i.slice(u,u+t.length)==t&&o.slice(f,f+r.length)==r?{open:{pos:n+u+t.length,margin:/\s/.test(i.charAt(u+t.length))?1:0},close:{pos:s-p-r.length,margin:/\s/.test(o.charAt(f-1))?1:0}}:null}(t,n[r],e.from,e.to));if(2!=e&&!s.every(e=>e))return{changes:t.changes(r.map((e,t)=>s[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}]))};if(1!=e&&s.some(e=>e)){let e=[];for(let t,r=0;r<s.length;r++)if(t=s[r]){let s=n[r],{open:i,close:o}=t;e.push({from:i.pos-s.open.length,to:i.pos+i.margin},{from:o.pos-o.margin,to:o.pos+s.close.length})}return{changes:e}}return null}function pp(e,t,r=t.selection.ranges){let n=[],s=-1;e:for(let{from:i,to:o}of r){let e,r=n.length,a=1e9;for(let l=i;l<=o;){let r=t.doc.lineAt(l);if(null==e&&(e=dp(t,r.from).line,!e))continue e;if(r.from>s&&(i==o||o>r.from)){s=r.from;let t=/^\s*/.exec(r.text)[0].length,i=t==r.length,o=r.text.slice(t,t+e.length)==e?t:-1;t<r.text.length&&t<a&&(a=t),n.push({line:r,comment:o,token:e,indent:t,empty:i,single:!1})}l=r.to+1}if(a<1e9)for(let t=r;t<n.length;t++)n[t].indent<n[t].line.text.length&&(n[t].indent=a);n.length==r+1&&(n[r].single=!0)}if(2!=e&&n.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:s,indent:i,empty:o,single:a}of n)!a&&o||e.push({from:t.from+i,insert:s+" "});let r=t.changes(e);return{changes:r,selection:t.selection.map(r,1)}}if(1!=e&&n.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:r,token:s}of n)if(r>=0){let n=t.from+r,i=n+s.length;" "==t.text[i-t.from]&&i++,e.push({from:n,to:i})}return{changes:e}}return null}const fp=As.define(),mp=As.define(),gp=as.define(),Op=as.define({combine:e=>Us(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,n)=>e(r,n)||t(r,n)})}),xp=fs.define({create:()=>zp.empty,update(e,t){let r=t.state.facet(Op),n=t.annotation(fp);if(n){let s=jp.fromTransaction(t,n.selection),i=n.side,o=0==i?e.undone:e.done;return o=s?Qp(o,o.length,r.minDepth,s):Cp(o,t.startState.selection),new zp(0==i?n.rest:o,0==i?o:n.rest)}let s=t.annotation(mp);if("full"!=s&&"before"!=s||(e=e.isolate()),!1===t.annotation(Xs.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=jp.fromTransaction(t),o=t.annotation(Xs.time),a=t.annotation(Xs.userEvent);return i?e=e.addChanges(i,o,a,r,t):t.selection&&(e=e.addSelection(t.startState.selection,o,a,r.newGroupDelay)),"full"!=s&&"after"!=s||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new zp(e.done.map(jp.fromJSON),e.undone.map(jp.fromJSON))});function bp(e={}){return[xp,Op.of(e),Nc.domEventHandlers({beforeinput(e,t){let r="historyUndo"==e.inputType?yp:"historyRedo"==e.inputType?wp:null;return!!r&&(e.preventDefault(),r(t))}})]}function vp(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let s=r.field(xp,!1);if(!s)return!1;let i=s.pop(e,r,t);return!!i&&(n(i),!0)}}const yp=vp(0,!1),wp=vp(1,!1),Sp=vp(0,!0),kp=vp(1,!0);class jp{constructor(e,t,r,n,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=n,this.selectionsAfter=s}setSelAfter(e){return new jp(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(r=this.startSelection)||void 0===r?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new jp(e.changes&&Un.fromJSON(e.changes),[],e.mapped&&Gn.fromJSON(e.mapped),e.startSelection&&ss.fromJSON(e.startSelection),e.selectionsAfter.map(ss.fromJSON))}static fromTransaction(e,t){let r=$p;for(let n of e.startState.facet(gp)){let t=n(e);t.length&&(r=r.concat(t))}return!r.length&&e.changes.empty?null:new jp(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,$p)}static selection(e){return new jp(void 0,$p,void 0,void 0,e)}}function Qp(e,t,r,n){let s=t+1>r+20?t-r-1:0,i=e.slice(s,t);return i.push(n),i}function Pp(e,t){return e.length?t.length?e.concat(t):e:t}const $p=[],_p=200;function Cp(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-_p));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),Qp(e,e.length-1,1e9,r.setSelAfter(n)))}return[jp.selection([t])]}function Tp(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function Np(e,t){if(!e.length)return e;let r=e.length,n=$p;for(;r;){let s=Ep(e[r-1],t,n);if(s.changes&&!s.changes.empty||s.effects.length){let t=e.slice(0,r);return t[r-1]=s,t}t=s.mapped,r--,n=s.selectionsAfter}return n.length?[jp.selection(n)]:$p}function Ep(e,t,r){let n=Pp(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):$p,r);if(!e.changes)return jp.selection(n);let s=e.changes.map(t),i=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(i):i;return new jp(s,Rs.mapEffects(e.effects,t),o,e.startSelection.map(i),n)}const Ap=/^(input\.type|delete)($|\.)/;class zp{constructor(e,t,r=0,n=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=n}isolate(){return this.prevTime?new zp(this.done,this.undone):this}addChanges(e,t,r,n,s){let i=this.done,o=i[i.length-1];return i=o&&o.changes&&!o.changes.empty&&e.changes&&(!r||Ap.test(r))&&(!o.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(s,function(e,t){let r=[],n=!1;return e.iterChangedRanges((e,t)=>r.push(e,t)),t.iterChangedRanges((e,t,s,i)=>{for(let o=0;o<r.length;){let e=r[o++],t=r[o++];i>=e&&s<=t&&(n=!0)}}),n}(o.changes,e.changes))||"input.type.compose"==r)?Qp(i,i.length-1,n.minDepth,new jp(e.changes.compose(o.changes),Pp(Rs.mapEffects(e.effects,o.changes),o.effects),o.mapped,o.startSelection,$p)):Qp(i,i.length,n.minDepth,e),new zp(i,$p,t,r)}addSelection(e,t,r,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:$p;return s.length>0&&t-this.prevTime<n&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&(i=s[s.length-1],o=e,i.ranges.length==o.ranges.length&&0===i.ranges.filter((e,t)=>
vendor: 5,977 bytes, line 7
7e.empty!=o.ranges[t].empty).length)?this:new zp(Cp(this.done,e),this.undone,t,r);var i,o}addMapping(e){return new zp(Np(this.done,e),Np(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let n=0==e?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1],i=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:fp.of({side:e,rest:Tp(n),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let r=1==n.length?$p:n.slice(0,n.length-1);return s.mapped&&(r=Np(r,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:fp.of({side:e,rest:r,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}zp.empty=new zp($p,$p);const Zp=[{key:"Mod-z",run:yp,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:wp,preventDefault:!0},{linux:"Ctrl-Shift-z",run:wp,preventDefault:!0},{key:"Mod-u",run:Sp,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:kp,preventDefault:!0}];function Rp(e,t){return ss.create(e.ranges.map(t),e.mainIndex)}function Xp(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Mp({state:e,dispatch:t},r){let n=Rp(e.selection,r);return!n.eq(e.selection,!0)&&(t(Xp(e,n)),!0)}function Dp(e,t){return ss.cursor(t?e.to:e.from)}function Lp(e,t){return Mp(e,r=>r.empty?e.moveByChar(r,t):Dp(r,t))}function Yp(e){return e.textDirectionAt(e.state.selection.main.head)==So.LTR}const Ip=e=>Lp(e,!Yp(e)),qp=e=>Lp(e,Yp(e));function Vp(e,t){return Mp(e,r=>r.empty?e.moveByGroup(r,t):Dp(r,t))}function Wp(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Bp(e,t,r){let n,s,i=su(e).resolveInner(t.head),o=r?zd.closedBy:zd.openedBy;for(let a=t.head;;){let t=r?i.childAfter(a):i.childBefore(a);if(!t)break;Wp(e,t,o)?i=t:a=r?t.to:t.from}return s=i.type.prop(o)&&(n=r?Hu(e,i.from,1):Hu(e,i.to,-1))&&n.matched?r?n.end.to:n.end.from:r?i.to:i.from,ss.cursor(s,r?-1:1)}function Fp(e,t){return Mp(e,r=>{if(!r.empty)return Dp(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)})}const Gp=e=>Fp(e,!1),Up=e=>Fp(e,!0);function Hp(e){let t,r=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,s=0;if(r){for(let t of e.state.facet(Nc.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(n=Math.max(null==r?void 0:r.top,n)),(null==r?void 0:r.bottom)&&(s=Math.max(null==r?void 0:r.bottom,s))}t=e.scrollDOM.clientHeight-n-s}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:s,selfScroll:r,height:Math.max(e.defaultLineHeight,t-5)}}function Kp(e,t){let r,n=Hp(e),{state:s}=e,i=Rp(s.selection,r=>r.empty?e.moveVertically(r,t,n.height):Dp(r,t));if(i.eq(s.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(s.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;t&&t.top>a&&t.bottom<l&&(r=Nc.scrollIntoView(i.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(Xp(s,i),{effects:r}),!0}const Jp=e=>Kp(e,!1),ef=e=>Kp(e,!0);function tf(e,t,r){let n=e.lineBlockAt(t.head),s=e.moveToLineBoundary(t,r);if(s.head==t.head&&s.head!=(r?n.to:n.from)&&(s=e.moveToLineBoundary(t,r,!1)),!r&&s.head==n.from&&n.length){let r=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&t.head!=n.from+r&&(s=ss.cursor(n.from+r))}return s}function rf(e,t){let r=Rp(e.state.selection,e=>{let r=t(e);return ss.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(Xp(e.state,r)),!0)}function nf(e,t){return rf(e,r=>e.moveByChar(r,t))}const sf=e=>nf(e,!Yp(e)),of=e=>nf(e,Yp(e));function af(e,t){return rf(e,r=>e.moveByGroup(r,t))}function lf(e,t){return rf(e,r=>e.moveVertically(r,t))}const cf=e=>lf(e,!1),df=e=>lf(e,!0);function hf(e,t){return rf(e,r=>e.moveVertically(r,t,Hp(e).height))}const uf=e=>hf(e,!1),pf=e=>hf(e,!0),ff=({state:e,dispatch:t})=>(t(Xp(e,{anchor:0})),!0),mf=({state:e,dispatch:t})=>(t(Xp(e,{anchor:e.doc.length})),!0),gf=({state:e,dispatch:t})=>(t(Xp(e,{anchor:e.selection.main.anchor,head:0})),!0),Of=({state:e,dispatch:t})=>(t(Xp(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function xf(e,t){let{state:r}=e,n=r.selection,s=r.selection.ranges.slice();for(let i of r.selection.ranges){let n=r.doc.lineAt(i.head);if(t?n.to<e.state.doc.length:n.from>0)for(let r=i;;){let i=e.moveVertically(r,t);if(i.head<n.from||i.head>n.to){s.some(e=>e.head==i.head)||s.push(i);break}if(i.head==r.head)break;r=i}}return s.length!=n.ranges.length&&(e.dispatch(Xp(r,ss.create(s,s.length-1))),!0)}function bf(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,s=n.changeByRange(n=>{let{from:s,to:i}=n;if(s==i){let o=t(n);o<s?(r="delete.backward",o=vf(e,o,!1)):o>s&&(r="delete.forward",o=vf(e,o,!0)),s=Math.min(s,o),i=Math.max(i,o)}else s=vf(e,s,!1),i=vf(e,i,!0);return s==i?{range:n}:{changes:{from:s,to:i},range:ss.cursor(s,s<n.head?-1:1)}});return!s.changes.empty&&(e.dispatch(n.update(s,{scrollIntoView:!0,userEvent:r,effects:"delete.selection"==r?Nc.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function vf(e,t,r){if(e instanceof Nc)for(let n of e.state.facet(Nc.atomicRanges).map(t=>t(e)))n.between(t,t,(e,n)=>{e<t&&n>t&&(t=r?n:e)});return t}const yf=(e,t,r)=>bf(e,n=>{let s,i,o=n.from,{state:a}=e,l=a.doc.lineAt(o);if(r&&!t&&o>l.from&&o<l.from+200&&!/[^ \t]/.test(s=l.text.slice(0,o-l.from))){if("\t"==s[s.length-1])return o-1;let e=fi(s,a.tabSize)%Ou(a)||Ou(a);for(let t=0;t<e&&" "==s[s.length-1-t];t++)o--;i=o}else i=In(l.text,o-l.from,t,t)+l.from,i==o&&l.number!=(t?a.doc.lines:1)?i+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(i-l.from,o-l.from))&&(i=In(l.text,i-l.from,!1,!1)+l.from);return i}),wf=e=>yf(e,!1,!0),Sf=e=>yf(e,!0,!1),kf=(e,t)=>
vendor: 4,482 bytes, line 7
7bf(e,r=>{let n=r.head,{state:s}=e,i=s.doc.lineAt(n),o=s.charCategorizer(n);for(let e=null;;){if(n==(t?i.to:i.from)){n==r.head&&i.number!=(t?s.doc.lines:1)&&(n+=t?1:-1);break}let a=In(i.text,n-i.from,t)+i.from,l=i.text.slice(Math.min(n,a)-i.from,Math.max(n,a)-i.from),c=o(l);if(null!=e&&c!=e)break;" "==l&&n==r.head||(e=c),n=a}return n}),jf=e=>kf(e,!1);function Qf(e){let t=[],r=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.from),i=e.doc.lineAt(n.to);if(n.empty||n.to!=i.from||(i=e.doc.lineAt(n.to-1)),r>=s.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(n)}else t.push({from:s.from,to:i.to,ranges:[n]});r=i.number+1}return t}function Pf(e,t,r){if(e.readOnly)return!1;let n=[],s=[];for(let i of Qf(e)){if(r?i.to==e.doc.length:0==i.from)continue;let t=e.doc.lineAt(r?i.to+1:i.from-1),o=t.length+1;if(r){n.push({from:i.to,to:t.to},{from:i.from,insert:t.text+e.lineBreak});for(let t of i.ranges)s.push(ss.range(Math.min(e.doc.length,t.anchor+o),Math.min(e.doc.length,t.head+o)))}else{n.push({from:t.from,to:i.from},{from:i.to,insert:e.lineBreak+t.text});for(let e of i.ranges)s.push(ss.range(e.anchor-o,e.head-o))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:ss.create(s,e.selection.mainIndex),userEvent:"move.line"})),!0)}function $f(e,t,r){if(e.readOnly)return!1;let n=[];for(let i of Qf(e))r?n.push({from:i.from,insert:e.doc.slice(i.from,i.to)+e.lineBreak}):n.push({from:i.to,insert:e.lineBreak+e.doc.slice(i.from,i.to)});let s=e.changes(n);return t(e.update({changes:s,selection:e.selection.map(s,r?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const _f=Cf(!1);function Cf(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{let{from:n,to:s}=r,i=t.doc.lineAt(n),o=!e&&n==s&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r,n=su(e).resolveInner(t),s=n.childBefore(t),i=n.childAfter(t);return s&&i&&s.to<=t&&i.from>=t&&(r=s.type.prop(zd.closedBy))&&r.indexOf(i.name)>-1&&e.doc.lineAt(s.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(s.to,i.from))?{from:s.to,to:i.from}:null}(t,n);e&&(n=s=(s<=i.to?i:t.doc.lineAt(s)).to);let a=new vu(t,{simulateBreak:n,simulateDoubleBreak:!!o}),l=bu(a,n);for(null==l&&(l=fi(/^\s*/.exec(t.doc.lineAt(n).text)[0],t.tabSize));s<i.to&&/\s/.test(i.text[s-i.from]);)s++;o?({from:n,to:s}=o):n>i.from&&n<i.from+100&&!/\S/.test(i.text.slice(0,n))&&(n=i.from);let c=["",xu(t,l)];return o&&c.push(xu(t,a.lineIndent(i.from,-1))),{changes:{from:n,to:s,insert:En.of(c)},range:ss.cursor(n+1+c[1].length)}});return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Tf(e,t){let r=-1;return e.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let i=e.doc.lineAt(o);i.number>r&&(n.empty||n.to>i.from)&&(t(i,s,n),r=i.number),o=i.to+1}let i=e.changes(s);return{changes:s,range:ss.range(i.mapPos(n.anchor,1),i.mapPos(n.head,1))}})}const Nf=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Mp(e,t=>Bp(e.state,t,!Yp(e))),shift:e=>rf(e,t=>Bp(e.state,t,!Yp(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Mp(e,t=>Bp(e.state,t,Yp(e))),shift:e=>rf(e,t=>Bp(e.state,t,Yp(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Pf(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>$f(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Pf(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>$f(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>xf(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>xf(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=ss.create([r.main]):r.main.empty||(n=ss.create([ss.cursor(r.main.head)])),!!n&&(t(Xp(e,n)),!0)}},{key:"Mod-Enter",run:Cf(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let r=Qf(e).map(({from:t,to:r})=>ss.range(t,Math.min(r+1,e.doc.length)));return t(e.update({selection:ss.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let r=Rp(e.selection,t=>{let r=su(e),n=r.resolveStack(t.from,1);if(t.empty){let e=r.resolveStack(t.from,-1);e.node.from>=n.node.from&&e.node.to<=n.node.to&&(n=e)}for(let e=n;e;e=e.next){let{node:r}=e;if((r.from<t.from&&r.to>=t.to||r.to>t.to&&r.from<=t.from)&&e.next)return ss.range(r.to,r.from)}return t});return!r.eq(e.selection)&&(t(Xp(e,r)),!0)},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Tf(e,(t,r)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let s=fi(n,e.tabSize),i=0,o=xu(e,Math.max(0,s-Ou(e)));for(;
7i<n.length&&i<o.length&&n.charCodeAt(i)==o.charCodeAt(i);)i++;r.push({from:t.from+i,to:t.from+n.length,insert:o.slice(i)})}),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Tf(e,(t,r)=>{r.push({from:t.from,insert:e.facet(gu)})}),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new vu(e,{overrideIndentation:e=>{let t=r[e];return null==t?-1:t}}),s=Tf(e,(t,s,i)=>{let o=bu(n,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=xu(e,o);(a!=l||i.from<t.from+a.length)&&(r[t.from]=o,s.push({from:t.from,to:t.from+a.length,insert:l}))});return s.changes.empty||t(e.update(s,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(Qf(t).map(({from:e,to:r})=>(e>0?e--:r<t.doc.length&&r++,{from:e,to:r}))),n=Rp(t.selection,t=>{let r;if(e.lineWrapping){let n=e.lineBlockAt(t.head),s=e.coordsAtPos(t.head,t.assoc||1);s&&(r=n.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,r)}).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t){let r=!1,n=Rp(e.selection,t=>{let n=Hu(e,t.head,-1)||Hu(e,t.head,1)||t.head>0&&Hu(e,t.head-1,1)||t.head<e.doc.length&&Hu(e,t.head+1,-1);if(!n||!n.end)return t;r=!0;let s=n.start.from==t.head?n.end.to:n.end.from;return ss.cursor(s)});return!!r&&(t(Xp(e,n)),!0)}(e,t)},{key:"Mod-/",run:e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=dp(e.state,r.from);return n.line?ap(e):!!n.block&&cp(e)}},{key:"Alt-A",run:lp},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:Ip,shift:sf,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>Vp(e,!Yp(e)),shift:e=>af(e,!Yp(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Mp(e,t=>tf(e,t,!Yp(e))),shift:e=>rf(e,t=>tf(e,t,!Yp(e))),preventDefault:!0},{key:"ArrowRight",run:qp,shift:of,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>Vp(e,Yp(e)),shift:e=>af(e,Yp(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Mp(e,t=>tf(e,t,Yp(e))),shift:e=>rf(e,t=>tf(e,t,Yp(e))),preventDefault:!0},{key:"ArrowUp",run:Gp,shift:cf,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ff,shift:gf},{mac:"Ctrl-ArrowUp",run:Jp,shift:uf},{key:"ArrowDown",run:Up,shift:df,preventDefault:!0},{mac:"Cmd-ArrowDown",run:mf,shift:Of},{mac:"Ctrl-ArrowDown",run:ef,shift:pf},{key:"PageUp",run:Jp,shift:uf},{key:"PageDown",run:ef,shift:pf},{key:"Home",run:e=>Mp(e,t=>tf(e,t,!1)),shift:e=>rf(e,t=>tf(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:ff,shift:gf},{key:"End",run:e=>Mp(e,t=>tf(e,t,!0)),shift:e=>rf(e,t=>tf(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:mf,shift:Of},{key:"Enter",run:_f,shift:_f},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:wf,shift:wf,preventDefault:!0},{key:"Delete",run:Sf,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:jf,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>kf(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>bf(e,t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>bf(e,t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat([{key:"Ctrl-b",run:Ip,shift:sf,preventDefault:!0},{key:"Ctrl-f",run:qp,shift:of},{key:"Ctrl-p",run:Gp,shift:cf},{key:"Ctrl-n",run:Up,shift:df},{key:"Ctrl-a",run:e=>Mp(e,t=>ss.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>rf(e,t=>ss.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>Mp(e,t=>ss.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>rf(e,t=>ss.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:Sf},{key:"Ctrl-h",run:wf},{key:"Ctrl-k",run:e=>bf(e,t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:jf},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:En.of(["",""])},range:ss.cursor(e.from)}));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let r=t.from,n=e.doc.lineAt(r),s=r==n.from?r-1:In(n.text,r-n.from,!1)+n.from,i=r==n.to?r+1:In(n.text,r-n.from,!0)+n.from;return{changes:{from:s,to:i,insert:e.doc.slice(r,i).append(e.doc.slice(s,r))},range:ss.cursor(i)}});return!r.changes.empty&&(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:ef}].map(e=>({mac:e.key,run:e.run,shift:e.shift}))));var Ef={};class Af{constructor(e,t,r,n,s,i,o,a,l,c=0,d){this.p=e,this.stack=t,this.state=r,this.reducePos=n,this.pos=s,this.score=i,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,t)=>
7t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let n=e.parser.context;return new Af(e,[],t,r,r,0,[],0,n?new zf(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,n=65535&e,{parser:s}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=s.dynamicPrecedence(n);if(o&&(this.score+=o),0==r)return this.pushState(s.getGoto(this.state,n,!0),this.reducePos),n<s.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),void this.reduceContext(n,this.reducePos);let a=this.stack.length-3*(r-1)-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-l;c>=2e3&&!(null===(t=this.p.parser.nodeSet.types[n])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let d=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-d;if(n<s.minRepeatTerm||131072&e){let e=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,l,e,h+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=s.getGoto(e,n,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(n,l)}storeNode(e,t,r,n=4,s=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,n=this.buffer.length;if(0==n&&e.parent&&(n=e.bufferBase-e.parent.bufferBase,e=e.parent),n>0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==r)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=r)}}if(s&&this.pos!=r){let s=this.buffer.length;if(s>0&&(0!=this.buffer[s-4]||this.buffer[s-1]<0)){let e=!1;for(let t=s;t>0&&this.buffer[t-2]>r;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4)}this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=r,this.buffer[s+3]=n}else this.buffer.push(e,t,r,n)}shift(e,t,r,n){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4);else{let s=e,{parser:i}=this.p;this.pos=n;let o=i.stateFlag(s,1);!o&&(n>r||t<=i.maxNode)&&(this.reducePos=n),this.pushState(s,o?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=i.maxNode&&this.buffer.push(t,r,n,4)}}apply(e,t,r,n){65536&e?this.reduce(e):this.shift(e,t,r,n)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(r,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new Af(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Zf(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==r)return!1;if(!(65536&r))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let n,s=0;s<t.length;s+=2)(n=t[s+1])!=this.state&&this.p.parser.hasAction(n,e)&&r.push(t[s],n);if(this.stack.length<120)for(let e=0;r.length<8&&e<t.length;e+=2){let n=t[e+1];r.some((e,t)=>1&t&&e==n)||r.push(t[e],n)}t=r}let r=[];for(let n=0;n<t.length&&r.length<4;n+=2){let e=t[n+1];if(e==this.state)continue;let s=this.split();s.pushState(e,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(t[n],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(65536&t))return!1;if(!e.validAction(this.state,t)){let r=t>>19,n=65535&t,s=this.stack.length-3*r;if(s<0||e.getGoto(this.stack[s],n,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(n,s)=>{if(!t.includes(n))return t.push(n),e.allActions(n,t=>{if(393216&t);else if(65536&t){let r=(t>>19)-s;if(r>1){let n=65535&t,s=this.stack.length-3*r;if(s>=0&&e.getGoto(this.stack[s],n,!1)>=0)return r<<19|65536|n}}else{let e=r(t,s+1);if(null!=e)return e}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new zf(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class zf{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class Zf{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,r=e>>19;0==r?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0
vendor: 17,382 bytes, line 7
7),this.base+=3):this.base-=3*(r-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class Rf{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Rf(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new Rf(this.stack,this.pos,this.index)}}function Xf(e,t=Uint16Array){if("string"!=typeof e)return e;let r=null;for(let n=0,s=0;n<e.length;){let i=0;for(;;){let t=e.charCodeAt(n++),r=!1;if(126==t){i=65535;break}t>=92&&t--,t>=34&&t--;let s=t-32;if(s>=46&&(s-=46,r=!0),i+=s,r)break;i*=46}r?r[s++]=i:r=new t(i)}return r}class Mf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Df=new Mf;class Lf{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Df,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,n=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!n)return null;let e=this.ranges[--n];s-=r.from-e.to,r=e}for(;t<0?s>r.to:s>=r.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];s+=e.from-r.to,r=e}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,r,n=this.chunkOff+e;if(n>=0&&n<this.chunk.length)t=this.pos+e,r=this.chunk.charCodeAt(n);else{let n=this.resolveOffset(e,1);if(null==n)return-1;if(t=n,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,n=this.range;for(;n.to<=t;)n=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(null==r||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Df,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(r+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return r}}class Yf{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;Vf(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Yf.prototype.contextual=Yf.prototype.fallback=Yf.prototype.extend=!1;class If{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data="string"==typeof e?Xf(e):e}token(e,t){let r=e.pos,n=0;for(;;){let r=e.next<0,s=e.resolveOffset(1,1);if(Vf(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(r||n++,null==s)break;e.reset(s,e.token)}n&&(e.reset(r,e.token),e.acceptToken(this.elseToken,n))}}If.prototype.contextual=Yf.prototype.fallback=Yf.prototype.extend=!1;class qf{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Vf(e,t,r,n,s,i){let o=0,a=1<<n,{dialect:l}=r.p.parser;e:for(;0!=(a&e[o]);){let r=e[o+1];for(let h=o+3;h<r;h+=2)if((e[h+1]&a)>0){let r=e[h];if(l.allows(r)&&(-1==t.token.value||t.token.value==r||Bf(r,t.token.value,s,i))){t.acceptToken(r);break}}let n=t.next,c=0,d=e[o+2];if(!(t.next<0&&d>c&&65535==e[r+3*d-3])){for(;c<d;){let s=c+d>>1,i=r+s+(s<<1),a=e[i],l=e[i+1]||65536;if(n<a)d=s;else{if(!(n>=l)){o=e[i+2],t.advance();continue e}c=s+1}}break}o=e[r+3*d-1]}}function Wf(e,t,r){for(let n,s=t;65535!=(n=e[s]);s++)if(n==r)return s-t;return-1}function Bf(e,t,r,n){let s=Wf(r,n,t);return s<0||Wf(r,n,e)<s}const Ff="undefined"!=typeof process&&Ef&&/\bparse\b/.test(Ef.LOG);let Gf=null;function Uf(e,t,r){let n=e.cursor(Yd.IncludeAnonymous);for(n.moveTo(t);;)if(!(r<0?n.childBefore(t):n.childAfter(t)))for(;;){if((r<0?n.to<t:n.from>t)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:e.length}}class Hf{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Uf(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Uf(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],n=this.index[t];if(n==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[n],i=this.start[t]+r.positions[n];if(i>e)return this.nextStart=i,null;if(s instanceof qd){if(i==e){if(i<this.safeFrom)return null;let e=i+s.length;if(e<=this.safeTo){let t=s.prop(zd.lookAhead);if(!t||e+t<this.fragment.to)return s}}this.index[t]++,i+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+s.length}}}class Kf{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new Mf)}getActions(e){let t=0,r=null,{parser:n}=e.p,{tokenizers:s}=n,i=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let l=0;l<s.length;l++){if(!(1<<l&i))continue;let n=s[l],c=this.tokens[l];if((!r||n.fallback)&&((n.contextual||c.start!=e.pos||c.mask!=i||c.context!=o)&&(this.updateCachedToken(c,n,e),c.mask=i,c.context=o),c.lookAhead>c.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let s=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!n.extend&&(r=c,t>s))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),r||e.pos!=this.stream.end||(r=new Mf,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Mf,{pos:r,p:n}=e;return t.start=r,t.end=Math.min(r+1,n.stream.end),t.value=r==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,r){let n=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(n,e),r),e.value>-1){let{parser:t}=r.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let s=t.specializers[n](this.stream.read(e.start,e.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){1&s?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,r,n){for(let s=0;s<n;s+=3)if(this.actions[s]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=r,n}addActions(e,t,r,n){let{state:s}=e,{parser:i}=e.p,{data:o}=i;for(let a=0;a<2;a++)for(let e=i.stateSlot(s,a?2:1);;e+=3){if(65535==o[e]){if(1!=o[e+1]){0==n&&2==o[e+1]&&(n=this.putAction(im(o,e+2),t,r,n));break}e=im(o,e+2)}o[e]==t&&(n=this.putAction(im(o,e+1),t,r,n))}return n}}class Jf{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Lf(t,n),this.tokens=new Kf(e,this.stream),this.topTerm=e.top[1];let{from:s}=n[0];this.stacks=[Af.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>4*e.bufferLength?new Hf(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,r=this.stacks,n=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==r.length){let[e]=r;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;i<r.length;i++){let o=r[i];for(;;){if(this.tokens.mainToken=null,o.pos>n)s.push(o);else{if(this.advanceStack(o,s,r))continue;{e||(e=[],t=[]),e.push(o);let r=this.tokens.getMainToken(o);t.push(r.value,r.end)}}break}}if(!s.length){let t=e&&function(e){let t=null;for(let r of e){let e=r.p.stoppedAt;(r.pos==r.p.stream.end||null!=e&&r.pos>e)&&r.p.parser.stateFlag(r.state,2)&&(!t||t.score<r.score)&&(t=r)}return t}(e);if(t)return this.stackToTree(t);if(this.parser.strict)throw new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let r=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,s);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(s.length>e)for(s.sort((e,t)=>t.score-e.score);s.length>e;)s.pop();s.some(e=>e.reducePos>n)&&this.recovering--}else if(s.length>1){e:for(let e=0;e<s.length-1;e++){let t=s[e];for(let r=e+1;r<s.length;r++){let n=s[r];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){s.splice(e--,1);continue e}s.splice(r--,1)}}}s.length>12&&(s.sort((e,t)=>t.score-e.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let i=1;i<s.length;i++)s[i].pos<this.minStackPos&&(this.minStackPos=s[i].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let n=e.pos,{parser:s}=this;Ff&&this.stackID(e);if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,r=t?e.curContext.hash:0;for(let i=this.fragments.nodeAt(n);i;){let n=this.parser.nodeSet.types[i.type.id]==i.type?s.getGoto(e.state,i.type.id):-1;if(n>-1&&i.length&&(!t||(i.prop(zd.contextHash)||0)==r))return e.useNode(i,n),!0;if(!(i instanceof qd)||0==i.children.length||i.positions[0]>0)break;let o=i.children[0];if(!(o instanceof qd&&0==i.positions[0]))break;i=o}}let i=s.stateSlot(e.state,4);if(i>0)return e.reduce(i),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let a=0;a<o.length;){let s=o[a++],i=o[a++],l=o[a++],c=a==o.length||!r,d=c?e:e.split(),h=this.tokens.mainToken;if(d.apply(s,i,h?h.start:d.pos,l),c)return!0;d.pos>n?t.push(d):r.push(d)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return em(e,t),!0}}runRecovery(e,t,r){let n=null,s=!1;for(let i=0;i<e.length;i++){let o=e[i],a=t[i<<1],l=t[1+(i<<1)],c=Ff?this.stackID(o)+" -> ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),this.advanceFully(o,r))continue}let d=o.split(),h=c;for(let e=0;e<10&&d.forceReduce();e++){if(this.advanceFully(d,r))break;Ff&&(h=this.stackID(d)+" -> ")}for(let e of o.recoverByInsert(a))this.advanceFully(e,r);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),em(o,r)):(!n||n.score<d.score)&&(n=d)}return n}stackToTree(e){return e.close(),qd.build({buffer:Rf.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Gf||(Gf=new WeakMap)).get(e);return t||Gf.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function em(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(n.pos==e.pos&&n.sameState(e))return void(t[r].score<e.score&&(t[r]=e))}t.push(e)}class tm{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||0==this.disabled[e]}}const rm=e=>e;class nm{constructor(e){this.start=e.start,this.shift=e.shift||rm,this.reduce=e.reduce||rm,this.reuse=e.reuse||rm,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class sm extends dh{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;o<e.repeatNodeCount;o++)t.push("");let r=Object.keys(e.topRules).map(t=>e.topRules[t][1]),n=[];for(let o=0;o<t.length;o++)n.push([]);function s(e,t,r){n[e].push([t,t.deserialize(String(r))])}if(e.nodeProps)for(let o of e.nodeProps){let e=o[0];"string"==typeof e&&(e=zd[e]);for(let t=1;t<o.length;){let r=o[t++];if(r>=0)s(r,e,o[t++]);else{let n=o[t+-r];for(let i=-r;i>0;i--)s(o[t++],e,n);t++}}}this.nodeSet=new Md(t.map((t,s)=>Xd.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:n[s],top:r.indexOf(s)>-1,error:0==s,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Nd;let i=Xf(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(om),this.states=Xf(e.states,Uint32Array),this.data=Xf(e.stateData),this.goto=Xf(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new Yf(i,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let n=new Jf(this,e,t,r);for(let s of this.wrappers)n=s(n,e,t,r);return n}getGoto(e,t,r=!1){let n=this.goto;if(t>=n[0])return-1;for(let s=n[t+1];;){let t=n[s++],i=1&t,o=n[s++];if(i&&r)return o;for(let r=s+(t>>1);s<r;s++)if(n[s]==e)return o;if(i)return-1}}hasAction(e,t){let r=this.data;for(let n=0;n<2;n++)for(let s,i=this.stateSlot(e,n?2:1);;i+=3){if(65535==(s=r[i])){if(1!=r[i+1]){if(2==r[i+1])return im(r,i+2);break}s=r[i=im(r,i+2)]}if(s==t||0==s)return im(r,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let r=this.stateSlot(e,4),n=r?t(r):void 0;for(let s=this.stateSlot(e,1);null==n;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=im(this.data,s+2)}n=t(im(this.data,s+1))}return n}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=im(this.data,r+2)}if(!(1&this.data[r+2])){let e=this.data[r+1];t.some((t,r)=>1&r&&t==e)||t.push(this.data[r],e)}}return t}configure(e){let t=Object.assign(Object.create(sm.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let r=e.tokenizers.find(e=>e.from==t);return r?r.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,n)=>{let s=e.specializers.find(e=>e.from==r.external);
7if(!s)return r;let i=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[n]=om(i),i})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let e=t.indexOf(s);e>=0&&(r[e]=!0)}let n=null;for(let s=0;s<t.length;s++)if(!r[s])for(let e,r=this.dialects[t[s]];65535!=(e=this.data[r++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[e]=1;return new tm(e,r,n)}static deserialize(e){return new sm(e)}}function im(e,t){return e[t]|e[t+1]<<16}function om(e){if(e.external){let t=e.extend?1:0;return(r,n)=>e.external(r,n)<<1|t}return e.get}const am={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},lm={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},cm={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function dm(e){return 45==e||46==e||58==e||e>=65&&e<=90||95==e||e>=97&&e<=122||e>=161}let hm=null,um=null,pm=0;function fm(e,t){let r=e.pos+t;if(pm==r&&um==e)return hm;let n=e.peek(t),s="";for(;dm(n);)s+=String.fromCharCode(n),n=e.peek(++t);return um=e,pm=r,hm=s?s.toLowerCase():n==mm||n==gm?void 0:null}const mm=63,gm=33;function Om(e,t){this.name=e,this.parent=t}const xm=[6,10,7,8,9],bm=new nm({start:null,shift:(e,t,r,n)=>xm.indexOf(t)>-1?new Om(fm(n,1)||"",e):e,reduce:(e,t)=>21==t&&e?e.parent:e,reuse(e,t,r,n){let s=t.type.id;return 6==s||37==s?new Om(fm(n,1)||"",e):e},strict:!1}),vm=new qf((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(58));e.advance();let r=47==e.next;r&&e.advance();let n=fm(e,0);if(void 0===n)return;if(!n)return e.acceptToken(r?15:14);let s=t.context?t.context.name:null;if(r){if(n==s)return e.acceptToken(11);if(s&&lm[s])return e.acceptToken(58,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(13)}else{if("script"==n)return e.acceptToken(7);if("style"==n)return e.acceptToken(8);if("textarea"==n)return e.acceptToken(9);if(am.hasOwnProperty(n))return e.acceptToken(10);s&&cm[s]&&cm[s][n]?e.acceptToken(58,-1):e.acceptToken(6)}},{contextual:!0}),ym=new qf(e=>{for(let t=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(59);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){r>=3&&e.acceptToken(59,-2);break}t=0}e.advance()}});const wm=new qf((e,t)=>{if(47==e.next&&62==e.peek(1)){let r=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(r?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function Sm(e,t,r){let n=2+e.length;return new qf(s=>{for(let i=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(t);break}if(0==i&&60==s.next||1==i&&47==s.next||i>=2&&i<n&&s.next==e.charCodeAt(i-2))i++,o++;else{if(i==n&&62==s.next){a>o?s.acceptToken(t,-o):s.acceptToken(r,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(t,1);break}i=o=0}s.advance()}})}const km=Sm("script",55,1),jm=Sm("style",56,2),Qm=Sm("textarea",57,3),Pm=_h({"Text RawText IncompleteTag IncompleteCloseTag":Uh.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Uh.angleBracket,TagName:Uh.tagName,"MismatchedCloseTag/TagName":[Uh.tagName,Uh.invalid],AttributeName:Uh.attributeName,"AttributeValue UnquotedAttributeValue":Uh.attributeValue,Is:Uh.definitionOperator,"EntityReference CharacterReference":Uh.character,Comment:Uh.blockComment,ProcessingInst:Uh.processingInstruction,DoctypeDecl:Uh.documentMeta}),$m=sm.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ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~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"â StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:bm,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["o
7penedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Pm],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=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'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[km,jm,Qm,wm,vm,ym,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function _m(e,t){let r=Object.create(null);for(let n of e.getChildren(24)){let e=n.getChild(25),s=n.getChild(27)||n.getChild(28);e&&(r[t.read(e.from,e.to)]=s?27==s.type.id?t.read(s.from+1,s.to-1):t.read(s.from,s.to):"")}return r}function Cm(e,t){let r=e.getChild(23);return r?t.read(r.from,r.to):" "}function Tm(e,t,r){let n;for(let s of r)if(!s.attrs||s.attrs(n||(n=_m(e.node.parent.firstChild,t))))return{parser:s.parser,bracketed:!0};return null}function Nm(e=[],t=[]){let r=[],n=[],s=[],i=[];for(let l of e){("script"==l.tag?r:"style"==l.tag?n:"textarea"==l.tag?s:i).push(l)}let o=t.length?Object.create(null):null;for(let l of t)(o[l.name]||(o[l.name]=[])).push(l);return a=(e,t)=>{let a=e.type.id;if(29==a)return Tm(e,t,r);if(32==a)return Tm(e,t,n);
7if(35==a)return Tm(e,t,s);if(21==a&&i.length){let r,n=e.node,s=n.firstChild,o=s&&Cm(s,t);if(o)for(let e of i)if(e.tag==o&&(!e.attrs||e.attrs(r||(r=_m(s,t))))){let t=n.lastChild,r=38==t.type.id?t.from:n.to;if(r>s.to)return{parser:e.parser,overlay:[{from:s.to,to:r}]}}}if(o&&24==a){let r,n=e.node;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=Cm(n.parent,t))continue;let e=n.lastChild;if(27==e.type.id){let t=e.from+1,n=e.lastChild,s=e.to-(n&&n.isError?0:1);if(s>t)return{parser:r.parser,overlay:[{from:t,to:s}],bracketed:!0}}else if(28==e.type.id)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null},(e,t,r,n)=>new gh(e,a,t,r,n);var a}const Em=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function Am(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function zm(e){return e>=48&&e<=57}function Zm(e){return zm(e)||e>=97&&e<=102||e>=65&&e<=70}const Rm=(e,t,r)=>(n,s)=>{for(let i=!1,o=0,a=0;;a++){let{next:l}=n;if(Am(l)||45==l||95==l||i&&zm(l))!i&&(45!=l||a>0)&&(i=!0),o===a&&45==l&&o++,n.advance();else{if(92!=l||10==n.peek(1)){i&&n.acceptToken(2==o&&s.canShift(2)?t:40==l?r:e);break}if(n.advance(),Zm(n.next)){do{n.advance()}while(Zm(n.next));32==n.next&&n.advance()}else n.next>-1&&n.advance();i=!0}}},Xm=new qf(Rm(123,2,124)),Mm=new qf(Rm(125,3,4)),Dm=new qf(e=>{if(Em.includes(e.peek(-1))){let{next:t}=e;(Am(t)||95==t||35==t||46==t||42==t||91==t||58==t&&Am(e.peek(1))||45==t||38==t)&&e.acceptToken(122)}}),Lm=new qf(e=>{if(!Em.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),Am(t)){do{e.advance()}while(Am(e.next)||zm(e.next));e.acceptToken(1)}}}),Ym=_h({"AtKeyword import charset namespace keyframes media supports":Uh.definitionKeyword,"from to selector":Uh.keyword,NamespaceName:Uh.namespace,KeyframeName:Uh.labelName,KeyframeRangeName:Uh.operatorKeyword,TagName:Uh.tagName,ClassName:Uh.className,PseudoClassName:Uh.constant(Uh.className),IdName:Uh.labelName,"FeatureName PropertyName":Uh.propertyName,AttributeName:Uh.attributeName,NumberLiteral:Uh.number,KeywordQuery:Uh.keyword,UnaryQueryOp:Uh.operatorKeyword,"CallTag ValueName":Uh.atom,VariableName:Uh.variableName,Callee:Uh.operatorKeyword,Unit:Uh.unit,"UniversalSelector NestingSelector":Uh.definitionOperator,"MatchOp CompareOp":Uh.compareOperator,"ChildOp SiblingOp, LogicOp":Uh.logicOperator,BinOp:Uh.arithmeticOperator,Important:Uh.modifier,Comment:Uh.blockComment,ColorLiteral:Uh.color,"ParenthesizedContent StringLiteral":Uh.string,":":Uh.punctuation,"PseudoOp #":Uh.derefOperator,"; ,":Uh.separator,"( )":Uh.paren,"[ ]":Uh.squareBracket,"{ }":Uh.brace}),Im={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},qm={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Vm={__proto__:null,selector:112,layer:166},Wm={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Bm={__proto__:null,to:207},Fm=sm.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO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edValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName Arg
7List IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[Ym],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$I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!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[Dm,Lm,Xm,Mm,1,2,3,4,new If("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:e=>Im[e]||-1},{term:125,get:e=>qm[e]||-1},{term:4,get:e=>Vm[e]||-1},{term:25,get:e=>Wm[e]||-1},{term:123,get:e=>Bm[e]||-1}],tokenPrec:1963});let Gm=null;
7function Um(){if(!Gm&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],r=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),r.has(n)||(t.push(n),r.add(n)));Gm=t.sort().map(e=>({type:"property",label:e,apply:e+": "}))}return Gm||[]}const Hm=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),Km=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","regi
7on","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),Jm=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),eg=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supp
7orts","@view-transition"].map(e=>({type:"keyword",label:e})),tg=/^(\w[\w-]*|-\w[\w-]*|)$/,rg=/^-(-[\w-]*)?$/;const ng=new lh,sg=["Declaration"];function ig(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function og(e,t,r){if(t.to-t.from>4096){let n=ng.get(t);if(n)return n;let s=[],i=new Set,o=t.cursor(Yd.IncludeAnonymous);if(o.firstChild())do{for(let t of og(e,o.node,r))i.has(t.label)||(i.add(t.label),s.push(t))}while(o.nextSibling());return ng.set(t,s),s}{let n=[],s=new Set;return t.cursor().iterate(t=>{var i;if(r(t)&&t.matchContext(sg)&&":"==(null===(i=t.node.nextSibling)||void 0===i?void 0:i.name)){let r=e.sliceString(t.from,t.to);s.has(r)||(s.add(r),n.push({label:r,type:"variable"}))}}),n}}const ag=(e=>t=>{let{state:r,pos:n}=t,s=su(r).resolveInner(n,-1),i=s.type.isError&&s.from==s.to-1&&"-"==r.doc.sliceString(s.from,s.to);if("PropertyName"==s.name||(i||"TagName"==s.name)&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:Um(),validFor:tg};if("ValueName"==s.name)return{from:s.from,options:Km,validFor:tg};if("PseudoClassName"==s.name)return{from:s.from,options:Hm,validFor:tg};if(e(s)||(t.explicit||i)&&function(e,t){var r;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null===(r=e.parent)||void 0===r?void 0:r.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==t.sliceString(n.from,n.to)}(s,r.doc))return{from:e(s)||i?s.from:n,options:og(r.doc,ig(s),e),validFor:rg};if("TagName"==s.name){for(let{parent:e}=s;e;e=e.parent)if("Block"==e.name)return{from:s.from,options:Um(),validFor:tg};return{from:s.from,options:Jm,validFor:tg}}if("AtKeyword"==s.name)return{from:s.from,options:eg,validFor:tg};if(!t.explicit)return null;let o=s.resolve(n),a=o.childBefore(n);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:n,options:Hm,validFor:tg}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:n,options:Km,validFor:tg}:"Block"==o.name||"Styles"==o.name?{from:n,options:Um(),validFor:tg}:null})(e=>"VariableName"==e.name),lg=nu.define({name:"css",parser:Fm.configure({props:[yu.add({Declaration:_u()}),Cu.add({"Block KeyframeList":Tu})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function cg(){return new fu(lg,lg.data.of({autocomplete:ag}))}const dg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],hg=new nm({start:!1,shift:(e,t)=>5==t||6==t||320==t?e:321==t,strict:!1}),ug=new qf((e,t)=>{let{next:r}=e;(125==r||-1==r||t.context)&&e.acceptToken(318)},{contextual:!0,fallback:!0}),pg=new qf((e,t)=>{let r,{next:n}=e;dg.indexOf(n)>-1||(47!=n||47!=(r=e.peek(1))&&42!=r)&&(125==n||59==n||-1==n||t.context||e.acceptToken(316))},{contextual:!0}),fg=new qf((e,t)=>{91!=e.next||t.context||e.acceptToken(317)},{contextual:!0}),mg=new qf((e,t)=>{let{next:r}=e;if(43==r||45==r){if(e.advance(),r==e.next){e.advance();let r=!t.context&&t.canShift(1);e.acceptToken(r?1:2)}}else 63==r&&46==e.peek(1)&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(3))},{contextual:!0});function gg(e,t){return e>=65&&e<=90||e>=97&&e<=122||95==e||e>=192||!t&&e>=48&&e<=57}const Og=new qf((e,t)=>{if(60!=e.next||!t.dialectEnabled(0))return;if(e.advance(),47==e.next)return;let r=0;for(;dg.indexOf(e.next)>-1;)e.advance(),r++;if(gg(e.next,!0)){for(e.advance(),r++;gg(e.next,!1);)e.advance(),r++;for(;dg.indexOf(e.next)>-1;)e.advance(),r++;if(44==e.next)return;for(let t=0;;t++){if(7==t){if(!gg(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),r++}}e.acceptToken(4,-r)}),xg=_h({"get set async static":Uh.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Uh.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Uh.operatorKeyword,"let var const using function class extends":Uh.definitionKeyword,"import export from":Uh.moduleKeyword,"with debugger new":Uh.keyword,TemplateString:Uh.special(Uh.string),super:Uh.atom,BooleanLiteral:Uh.bool,this:Uh.self,null:Uh.null,Star:Uh.modifier,VariableName:Uh.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Uh.function(Uh.variableName),VariableDefinition:Uh.definition(Uh.variableName),Label:Uh.labelName,PropertyName:Uh.propertyName,PrivatePropertyName:Uh.special(Uh.propertyName),"CallExpression/MemberExpression/PropertyName":Uh.function(Uh.propertyName),"FunctionDeclaration/VariableDefinition":Uh.function(Uh.definition(Uh.variableName)),"ClassDeclaration/VariableDefinition":Uh.definition(Uh.className),"NewExpression/VariableName":Uh.className,PropertyDefinition:Uh.definition(Uh.propertyName),PrivatePropertyDefinition:Uh.definition(Uh.special(Uh.propertyName)),UpdateOp:Uh.updateOperator,"LineComment Hashbang":Uh.lineComment,BlockComment:Uh.blockComment,Number:Uh.number,String:Uh.string,Escape:Uh.escape,Ar
vendor: 4,227 bytes, line 7
7ithOp:Uh.arithmeticOperator,LogicOp:Uh.logicOperator,BitOp:Uh.bitwiseOperator,CompareOp:Uh.compareOperator,RegExp:Uh.regexp,Equals:Uh.definitionOperator,Arrow:Uh.function(Uh.punctuation),": Spread":Uh.punctuation,"( )":Uh.paren,"[ ]":Uh.squareBracket,"{ }":Uh.brace,"InterpolationStart InterpolationEnd":Uh.special(Uh.brace),".":Uh.derefOperator,", ;":Uh.separator,"@":Uh.meta,TypeName:Uh.typeName,TypeDefinition:Uh.definition(Uh.typeName),"type enum interface implements namespace module declare":Uh.definitionKeyword,"abstract global Privacy readonly override":Uh.modifier,"is keyof unique infer asserts":Uh.operatorKeyword,JSXAttributeValue:Uh.attributeValue,JSXText:Uh.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Uh.angleBracket,"JSXIdentifier JSXNameSpacedName":Uh.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Uh.attributeName,"JSXBuiltin/JSXIdentifier":Uh.standard(Uh.tagName)}),bg={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},vg={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},yg={__proto__:null,"<":193},wg=sm.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`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#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"â ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:hg,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,12
70,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"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q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new If("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>bg[e]||-1},{term:343,get:e=>vg[e]||-1},{term:95,get:e=>yg[e]||-1}],tokenPrec:15201});function Sg(e){let t=Object.keys(e).join(""),r=/\w/.test(t);return r&&(t=t.replace(/\w/g,"")),`[${r?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function kg(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[r,n]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),r=Object.create(null);for(let{label:s}of e){t[s[0]]=!0;for(let e=1;e<s.length;e++)r[s[e]]=!0}let n=Sg(t)+Sg(r)+"*$";return[new RegExp("^"+n),new RegExp(n)]}(t);return e=>{let s=e.matchBefore(n);return s||e.explicit?{from:s?s.from:e.pos,options:t,validFor:r}:null}}const jg=As.define(),Qg=Nc.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'Æ'"}},".cm-completionIcon-class":{"&:after":{content:"'â'"}},".cm-completionIcon-interface":{"&:after":{content:"'â'"}},".cm-completionIcon-variable":{"&:after":{content:"'ð¥'"}},".cm-completionIcon-constant":{"&:after":{content:"'ð¶'"}},".cm-completionIcon-type":{"&:after":{content:"'ð¡'"}},".cm-completionIcon-enum":{"&:after":{content:"'âª'"}},".cm-completionIcon-property":{"&:after":{content:"'â¡'"}},".cm-completionIcon-keyword":{"&:after":{content:"'ðï¸'"}},".cm-completionIcon-namespace":{"&:after":{content:"'â¢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Pg{constructor(e,t,r,n){this.field=e,this.line=t,this.from=r,this.to=n}}class $g{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Fn.TrackDel),r=e.mapPos(this.to,1,Fn.TrackDel);return null==t||null==r?null:new $g(this.field,t,r)}}class _g{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],n=[t],s=e.doc.lineAt(t),i=/^\s*/.exec(s.text)[0];for(let o of this.lines){if(r.length){let r=i,s=/^\t*/.exec(o)[0].length;for(let t=0;t<s;t++)r+=e.facet(gu);n.push(t+r.length-s),o=r+o.slice(s)}r.push(o),t+=o.length+1}return{text:r,ranges:this.fieldPositions.map(e=>new $g(e.field,n[e.line]+e.from,n[e.line]+e.to))}}static parse(e){let t,r=[],n=[],s=[];for(let i of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(i);){let e=t[1]?+t[1]:null,o=t[2]||t[3]||"",a=-1,l=o.replace(/\\[{}]/g,e=>e[1]);for(let t=0;t<r.length;t++)(null!=e?r[t].seq==e:l&&r[t].name==l)&&(a=t);
vendor: 2,214 bytes, line 7
7if(a<0){let t=0;for(;t<r.length&&(null==e||null!=r[t].seq&&r[t].seq<e);)t++;r.splice(t,0,{seq:e,name:l}),a=t;for(let e of s)e.field>=a&&e.field++}for(let r of s)if(r.line==n.length&&r.from>t.index){let e=t[2]?3+(t[1]||"").length:2;r.from-=e,r.to-=e}s.push(new Pg(a,n.length,t.index,t.index+l.length)),i=i.slice(0,t.index)+o+i.slice(t.index+t[0].length)}i=i.replace(/\\([{}])/g,(e,t,r)=>{for(let i of s)i.line==n.length&&i.from>r&&(i.from--,i.to--);return t}),n.push(i)}return new _g(n,s)}}let Cg=Wi.widget({widget:new class extends qi{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),Tg=Wi.mark({class:"cm-snippetField"});class Ng{constructor(e,t){this.ranges=e,this.active=t,this.deco=Wi.set(e.map(e=>(e.from==e.to?Cg:Tg).range(e.from,e.to)),!0)}map(e){let t=[];for(let r of this.ranges){let n=r.map(e);if(!n)return null;t.push(n)}return new Ng(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const Eg=Rs.define({map:(e,t)=>e&&e.map(t)}),Ag=Rs.define(),zg=fs.define({create:()=>null,update(e,t){for(let r of t.effects){if(r.is(Eg))return r.value;if(r.is(Ag)&&e)return new Ng(e.ranges,r.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Nc.decorations.from(e,e=>e?e.deco:Wi.none)});function Zg(e,t){return ss.create(e.filter(e=>e.field==t).map(e=>ss.range(e.from,e.to)))}function Rg(e){let t=_g.parse(e);return(e,r,n,s)=>{let{text:i,ranges:o}=t.instantiate(e.state,n),{main:a}=e.state.selection,l={changes:{from:n,to:s==a.from?a.to:s,insert:En.of(i)},scrollIntoView:!0,annotations:r?[jg.of(r),Xs.userEvent.of("input.complete")]:void 0};if(o.length&&(l.selection=Zg(o,0)),o.some(e=>e.field>0)){let t=new Ng(o,0),r=l.effects=[Eg.of(t)];void 0===e.state.field(zg,!1)&&r.push(Rs.appendConfig.of([zg,Lg,Ig,Qg]))}e.dispatch(e.state.update(l))}}function Xg(e){return({state:t,dispatch:r})=>{let n=t.field(zg,!1);if(!n||e<0&&0==n.active)return!1;let s=n.active+e,i=e>0&&!n.ranges.some(t=>t.field==s+e);return r(t.update({selection:Zg(n.ranges,s),effects:Eg.of(i?null:new Ng(n.ranges,s)
7),scrollIntoView:!0})),!0}}const Mg=[{key:"Tab",run:Xg(1),shift:Xg(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(zg,!1)&&(t(e.update({effects:Eg.of(null)})),!0)}],Dg=as.define({combine:e=>e.length?e[0]:Mg}),Lg=vs.highest(Dc.compute([Dg],e=>e.facet(Dg)));function Yg(e,t){return{...t,apply:Rg(e)}}const Ig=Nc.domEventHandlers({mousedown(e,t){let r,n=t.state.field(zg,!1);if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let s=n.ranges.find(e=>e.from<=r&&e.to>=r);return!(!s||s.field==n.active)&&(t.dispatch({selection:Zg(n.ranges,s.field),effects:Eg.of(n.ranges.some(e=>e.field>s.field)?new Ng(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),qg=new class extends Hs{};qg.startSide=1,qg.endSide=-1;const Vg=[Yg("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Yg("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Yg("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Yg("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Yg("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Yg("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),Yg("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Yg("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),Yg("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Yg('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Yg('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Wg=Vg.concat([Yg("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Yg("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Yg("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Bg=new lh,Fg=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Gg(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const Ug=["FunctionDeclaration"],Hg={FunctionDeclaration:Gg("function"),ClassDeclaration:Gg("class"),ClassExpression:()=>!0,EnumDeclaration:Gg("constant"),TypeAliasDeclaration:Gg("type"),NamespaceDeclaration:Gg("namespace"),VariableDefinition(e,t){e.matchContext(Ug)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function Kg(e,t){let r=Bg.get(t);if(r)return r;let n=[],s=!0;function i(t,r){let s=e.sliceString(t.from,t.to);n.push({label:s,type:r})}return t.cursor(Yd.IncludeAnonymous).iterate(t=>{if(s)s=!1;else if(t.name){let e=Hg[t.name];if(e&&e(t,i)||Fg.has(t.name))return!1}else if(t.to-t.from>8192){for(let r of Kg(e,t.node))n.push(r);return!1}}),Bg.set(t,n),n}const Jg=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,eO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function tO(e){let t=su(e.state).resolveInner(e.pos,-1);if(eO.indexOf(t.name)>-1)return null;let r="VariableName"==t.name||t.to-t.from<20&&Jg.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let s=t;s;s=s.parent)Fg.has(s.name)&&(n=n.concat(Kg(e.state.doc,s)));return{options:n,from:r?t.from:e.pos,validFor:Jg}}const rO=nu.define({name:"javascript",parser:wg.configure({props:[yu.add({IfStatement:_u({except:/^\s*({|else\b)/}),TryStatement:_u({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:Pu({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":_u({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>
7e.column(e.node.from)+e.unit}),Cu.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Tu,BlockComment:e=>({from:e.from+2,to:e.to-2}),JSXElement(e){let t=e.firstChild;if(!t||"JSXSelfClosingTag"==t.name)return null;let r=e.lastChild;return{from:t.to,to:r.type.isError?e.to:r.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let r=null===(t=e.firstChild)||void 0===t?void 0:t.nextSibling,n=e.lastChild;return!r||r.type.isError?null:{from:r.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),nO={test:e=>/^JSX/.test(e.name),facet:Jh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},sO=rO.configure({dialect:"ts"},"typescript"),iO=rO.configure({dialect:"jsx",props:[eu.add(e=>e.isTop?[nO]:void 0)]}),oO=rO.configure({dialect:"jsx ts",props:[eu.add(e=>e.isTop?[nO]:void 0)]},"typescript");let aO=e=>({label:e,type:"keyword"});const lO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(aO),cO=lO.concat(["declare","implements","private","protected","public"].map(aO));function dO(e={}){let t=e.jsx?e.typescript?oO:iO:e.typescript?sO:rO,r=e.typescript?Wg.concat(cO):Vg.concat(lO);return new fu(t,[rO.data.of({autocomplete:(n=eO,s=kg(r),e=>{for(let t=su(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(n.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return s(e)})}),rO.data.of({autocomplete:tO}),e.jsx?pO:[]]);var n,s}function hO(e,t,r=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,r));return""}const uO="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),pO=Nc.inputHandler.of((e,t,r,n,s)=>{if((uO?e.composing:e.compositionStarted)||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!rO.isActiveAt(e.state,t,-1))return!1;let i=s(),{state:o}=i,a=o.changeByRange(e=>{var t;let r,{head:s}=e,i=su(o).resolveInner(s-1,-1);if("JSXStartTag"==i.name&&(i=i.parent),o.doc.sliceString(s-1,s)!=n||"JSXAttributeValue"==i.name&&i.to>s);else{if(">"==n&&"JSXFragmentTag"==i.name)return{range:e,changes:{from:s,insert:"</>"}};if("/"==n&&"JSXStartCloseTag"==i.name){let e=i.parent,n=e.parent;if(n&&e.from==s-2&&((r=hO(o.doc,n.firstChild,s))||"JSXFragmentTag"==(null===(t=n.firstChild)||void 0===t?void 0:t.name))){let e=`${r}>`;return{range:ss.cursor(s+e.length,-1),changes:{from:s,insert:e}}}}else if(">"==n){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(i);if(t&&"JSXOpenTag"==t.name&&!/^\/?>|^<\//.test(o.doc.sliceString(s,s+2))&&(r=hO(o.doc,t,s)))return{range:e,changes:{from:s,insert:`</${r}>`}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([i,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),fO=["_blank","_self","_top","_parent"],mO=["ascii","utf-8","utf-16","latin1","latin1"],gO=["get","post","put","delete"],OO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],xO=["true","false"],bO={},vO={a:{attrs:{href:null,ping:null,type:null,media:null,target:fO,hreflang:null}},abbr:bO,address:bO,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:bO,aside:bO,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:bO,base:{attrs:{href:null,target:fO}},bdi:bO,bdo:bO,blockquote:{attrs:{cite:null}},body:bO,br:bO,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:OO,formmethod:gO,formnovalidate:["novalidate"],formtarget:fO,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:bO,center:bO,cite:bO,code:bO,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:bO,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:bO,div:bO,dl:bO,dt:bO,em:bO,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:bO,figure:bO,footer:bO,form:{attrs:{action:null,name:null,"accept-charset":mO,autocomplete:["on","off"],enctype:OO,method:gO,novalidate:["novalidate"],target:fO}},h1:bO,h2:bO,h3:bO,h4:bO,h5:bO,h6:bO,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:bO,hgroup:bO,hr:bO,html:{attrs:{manifest:null}}
vendor: 5,569 bytes, line 7
7,i:bO,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:OO,formmethod:gO,formnovalidate:["novalidate"],formtarget:fO,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:bO,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:bO,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:bO,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:mO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:bO,noscript:bO,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:bO,param:{attrs:{name:null,value:null}},pre:bO,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:bO,rt:bO,ruby:bO,samp:bO,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:mO}},section:bO,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:bO,source:{attrs:{src:null,type:null,media:null}},span:bO,strong:bO,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:bO,summary:bO,sup:bO,table:bO,tbody:bO,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:bO,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:bO,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:bO,time:{attrs:{datetime:null}},title:bO,tr:bO,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:bO,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:bO},yO={accesskey:null,class:null,contenteditable:xO,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:xO,autocorrect:xO,autocapitalize:xO,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":xO,"aria-autocomplete":["inline","list","both","none"],"aria-busy":xO,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":xO,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":xO,"aria-hidden":xO,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":xO,"aria-multiselectable":xO,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":xO,"aria-relevant":null,"aria-required":xO,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},wO="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".
7split(" ").map(e=>"on"+e);for(let Tx of wO)yO[Tx]=null;class SO{constructor(e,t){this.tags={...vO,...e},this.globalAttrs={...yO,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function kO(e,t,r=e.length){if(!t)return"";let n=t.firstChild,s=n&&n.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,r)):""}function jO(e,t=!1){for(;e;e=e.parent)if("Element"==e.name){if(!t)return e;t=!1}return null}function QO(e,t,r){let n=r.tags[kO(e,jO(t))];return(null==n?void 0:n.children)||r.allTags}function PO(e,t){let r=[];for(let n=jO(t);n&&!n.type.isTop;n=jO(n.parent)){let s=kO(e,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&r.indexOf(s)<0&&("EndTag"==t.name||t.from>=n.firstChild.to)&&r.push(s)}return r}SO.default=new SO;const $O=/^[:\-\.\w\u00b7-\uffff]*$/;function _O(e,t,r,n,s){let i=/\s*>/.test(e.sliceDoc(s,s+5))?"":">",o=jO(r,"StartTag"==r.name||"TagName"==r.name);return{from:n,to:s,options:QO(e.doc,o,t).map(e=>({label:e,type:"type"})).concat(PO(e.doc,r).map((e,t)=>({label:"/"+e,apply:"/"+e+i,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function CO(e,t,r,n){let s=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:PO(e.doc,t).map((e,t)=>({label:e,apply:e+s,type:"type",boost:99-t})),validFor:$O}}function TO(e,t){let{state:r,pos:n}=t,s=su(r).resolveInner(n,-1),i=s.resolve(n);for(let o,a=n;i==s&&(o=s.childBefore(a));){let e=o.lastChild;if(!e||!e.type.isError||e.from<e.to)break;i=s=o,a=e.from}return"TagName"==s.name?s.parent&&/CloseTag$/.test(s.parent.name)?CO(r,s,s.from,n):_O(r,e,s,s.from,n):"StartTag"==s.name||"IncompleteTag"==s.name?_O(r,e,s,n,n):"StartCloseTag"==s.name||"IncompleteCloseTag"==s.name?CO(r,s,n,n):"OpenTag"==s.name||"SelfClosingTag"==s.name||"AttributeName"==s.name?function(e,t,r,n,s){let i=jO(r),o=i?t.tags[kO(e.doc,i)]:null,a=o&&o.attrs?Object.keys(o.attrs):[];return{from:n,to:s,options:(o&&!1===o.globalAttrs?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:"property"})),validFor:$O}}(r,e,s,"AttributeName"==s.name?s.from:n,n):"Is"==s.name||"AttributeValue"==s.name||"UnquotedAttributeValue"==s.name?function(e,t,r,n,s){var i;let o,a=null===(i=r.parent)||void 0===i?void 0:i.getChild("AttributeName"),l=[];if(a){let i=e.sliceDoc(a.from,a.to),c=t.globalAttrs[i];if(!c){let n=jO(r),s=n?t.tags[kO(e.doc,n)]:null;c=(null==s?void 0:s.attrs)&&s.attrs[i]}if(c){let t=e.sliceDoc(n,s).toLowerCase(),r='"',i='"';/^['"]/.test(t)?(o='"'==t[0]?/^[^"]*$/:/^[^']*$/,r="",i=e.sliceDoc(s,s+1)==t[0]?"":t[0],t=t.slice(1),n++):o=/^[^\s<>='"]*$/;for(let e of c)l.push({label:e,apply:r+e+i,type:"constant"})}}return{from:n,to:s,options:l,validFor:o}}(r,e,s,"Is"==s.name?n:s.from,n):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(e,t,r,n){let s=[],i=0;for(let o of QO(e.doc,r,t))s.push({label:"<"+o,type:"type"});for(let o of PO(e.doc,r))s.push({label:"</"+o+">",type:"type",boost:99-i++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(r,e,s,n)}function NO(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new SO(t,r):SO.default;return e=>TO(n,e)}const EO=rO.parser.configure({top:"SingleExpression"}),AO=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:sO.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:iO.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:oO.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:EO},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:rO.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:lg.parser}],zO=[{name:"style",parser:lg.parser.configure({top:"Styles"})}].concat(wO.map(e=>({name:e,parser:rO.parser}))),ZO=nu.define({name:"html",parser:$m.configure({props:[yu.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>
7e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t,r=null;for(let n=e.node;;){let e=n.lastChild;if(!e||"Element"!=e.name||e.to!=n.to)break;r=n=e}return r&&(!(t=r.lastChild)||"CloseTag"!=t.name&&"SelfClosingTag"!=t.name)?e.lineIndent(r.from)+e.unit:null}}),Cu.add({Element(e){let t=e.firstChild,r=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==r.name?r.from:e.to}:null}}),Fu.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),RO=ZO.configure({wrap:Nm(AO,zO)});const XO=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),MO=Nc.inputHandler.of((e,t,r,n,s)=>{if(e.composing||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!RO.isActiveAt(e.state,t,-1))return!1;let i=s(),{state:o}=i,a=o.changeByRange(e=>{var t,r,s;let i,a=o.doc.sliceString(e.from-1,e.to)==n,{head:l}=e,c=su(o).resolveInner(l,-1);if(a&&">"==n&&"EndTag"==c.name){let n=c.parent;if("CloseTag"!=(null===(r=null===(t=n.parent)||void 0===t?void 0:t.lastChild)||void 0===r?void 0:r.name)&&(i=kO(o.doc,n.parent,l))&&!XO.has(i)){return{range:e,changes:{from:l,to:l+(">"===o.doc.sliceString(l,l+1)?1:0),insert:`</${i}>`}}}}else if(a&&"/"==n&&"IncompleteCloseTag"==c.name){let e=c.parent;if(c.from==l-2&&"CloseTag"!=(null===(s=e.lastChild)||void 0===s?void 0:s.name)&&(i=kO(o.doc,e,l))&&!XO.has(i)){let e=l+(">"===o.doc.sliceString(l,l+1)?1:0),t=`${i}>`;return{range:ss.cursor(l+t.length,-1),changes:{from:l,to:e,insert:t}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([i,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),DO="#e06c75",LO="#abb2bf",YO="#7d8799",IO="#d19a66",qO="#2c313a",VO="#282c34",WO="#353a42",BO="#528bff",FO=[Nc.theme({"&":{color:LO,backgroundColor:VO},".cm-content":{caretColor:BO},".cm-cursor, .cm-dropCursor":{borderLeftColor:BO},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:LO},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:VO,color:YO,border:"none"},".cm-activeLineGutter":{backgroundColor:qO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:WO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:WO,borderBottomColor:WO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:qO,color:LO}}},{dark:!0}),Zu(Nu.define([{tag:Uh.keyword,color:"#c678dd"},{tag:[Uh.name,Uh.deleted,Uh.character,Uh.propertyName,Uh.macroName],color:DO},{tag:[Uh.function(Uh.variableName),Uh.labelName],color:"#61afef"},{tag:[Uh.color,Uh.constant(Uh.name),Uh.standard(Uh.name)],color:IO},{tag:[Uh.definition(Uh.name),Uh.separator],color:LO},{tag:[Uh.typeName,Uh.className,Uh.number,Uh.changed,Uh.annotation,Uh.modifier,Uh.self,Uh.namespace],color:"#e5c07b"},{tag:[Uh.operator,Uh.operatorKeyword,Uh.url,Uh.escape,Uh.regexp,Uh.link,Uh.special(Uh.string)],color:"#56b6c2"},{tag:[Uh.meta,Uh.comment],color:YO},{tag:Uh.strong,fontWeight:"bold"},{tag:Uh.emphasis,fontStyle:"italic"},{tag:Uh.strikethrough,textDecoration:"line-through"},{tag:Uh.link,color:YO,textDecoration:"underline"},{tag:Uh.heading,fontWeight:"bold",color:DO},{tag:[Uh.atom,Uh.bool,Uh.special(Uh.variableName)],color:IO},{tag:[Uh.processingInstruction,Uh.string,Uh.inserted],color:"#98c379"},{tag:Uh.invalid,color:"#ffffff"}]))],GO="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class UO{constructor(e,t,r=0,n=e.length,s,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter
7=e.iterRange(r,n),this.bufferStart=r,this.normalize=s?e=>s(GO(e)):GO,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return qn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Vn(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Wn(e);let n=this.normalize(t);if(n.length)for(let s=0,i=r;;s++){let e=n.charCodeAt(s),o=this.match(e,i,this.bufferPos+this.bufferStart);if(s==n.length-1){if(o)return this.value=o,this;break}i==r&&s<t.length&&t.charCodeAt(s)==e&&i++}}}match(e,t,r){let n=null;for(let s=0;s<this.matches.length;s+=2){let t=this.matches[s],i=!1;this.query.charCodeAt(t)==e&&(t==this.query.length-1?n={from:this.matches[s+1],to:r}:(this.matches[s]++,i=!0)),i||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?n={from:t,to:r}:this.matches.push(1,t)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferStart)&&(n=null),n}}"undefined"!=typeof Symbol&&(UO.prototype[Symbol.iterator]=function(){return this});const HO=Wi.mark({class:"cm-ref-class"});function KO(e,t,r){if(0===t.size)return Wi.none;const n=new ni,s=e.state.doc.toString();if("html"===r){const e=/class\s*=\s*["']([^"']*?)["']/gi;let r;for(;null!==(r=e.exec(s));){const e=r[1];if(!e)continue;const s=r.index+r[0].length-1-e.length,i=/\S+/g;let o;for(;null!==(o=i.exec(e));)t.has(o[0])&&n.add(s+o.index,s+o.index+o[0].length,HO)}}else{const e=/\.([a-zA-Z_][\w-]*)/g;let r;for(;null!==(r=e.exec(s));)t.has(r[1])&&n.add(r.index,r.index+r[0].length,HO)}return n.finish()}function JO(e,r){return aa.fromClass(class{constructor(n){t(this,"decorations"),this.decorations=KO(n,e,r)}update(t){t.docChanged&&(this.decorations=KO(t.view,e,r))}},{decorations:e=>e.decorations})}const ex=function(e,t={}){let r=Rs.define(),n=fs.define({create:()=>[],update(e,n){if(e.length&&(t.hideOnChange&&(n.docChanged||n.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(n,e))),n.docChanged)){let t=[];for(let r of e){let e=n.changes.mapPos(r.pos,-1,Fn.TrackDel);if(null!=e){let s=Object.assign(Object.create(null),r);s.pos=e,null!=s.end&&(s.end=n.changes.mapPos(s.end)),t.push(s)}}e=t}for(let t of n.effects)t.is(r)&&(e=t.value),t.is(dd)&&(e=[]);return e},provide:e=>id.from(e)});return{active:n,extension:[n,aa.define(s=>new ld(s,e,n,r,t.hoverTime||300)),ad]}}((e,t)=>{const r=e.domAtPos(t);let n=r.node instanceof Element?r.node:r.node.parentElement;for(;n&&!n.classList.contains("cm-line");){if(n.classList.contains("cm-ref-class"))return{pos:t,above:!0,create(){const e=document.createElement("div");return e.style.fontSize="11px",e.style.padding="4px 10px",e.style.color="#e5c07b",e.style.backgroundColor="#1f1f1f",e.style.border="1px solid #3a3a3a",e.style.borderRadius="6px",e.style.whiteSpace="nowrap",e.textContent="Classe existante dans votre projet Webflow",{dom:e}}};n=n.parentElement}return null}),tx=Nc.theme({".cm-ref-class":{backgroundColor:"rgba(229, 192, 123, 0.14)",borderBottom:"1.5px dashed rgba(229, 192, 123, 0.7)",borderRadius:"2px",cursor:"help"}}),rx=Nc.theme({"&":{fontSize:"13px",height:"100%",backgroundColor:"#1a1a1a"},".cm-scroller":{fontFamily:'"JetBrains Mono", monospace',lineHeight:"1.6",overflow:"auto"},".cm-gutters":{backgroundColor:"#1a1a1a",borderRight:"1px solid #2e2e2e",color:"#707070"},".cm-activeLineGutter":{backgroundColor:"#2a2a2a",color:"#ededed"},".cm-activeLine":{backgroundColor:"#2a2a2a40"},".cm-content":{padding:"8px 0",caretColor:"#fff"},"&.cm-focused":{outline:"none"},".cm-placeholder":{color:"#707070",fontStyle:"italic"},".cm-selectionBackground":{backgroundColor:"#444444 !important"},"&.cm-focused .cm-selectionBackground":{backgroundColor:"#444444 !important"},".cm-cursor":{borderLeftColor:"#fff"},".cm-panel.cm-search":{backgroundColor:"#232323",borderBottom:"1px solid #2e2e2e",padding:"4px 8px",fontSize:"12px",color:"#ededed"},".cm-panel.cm-search input, .cm-panel.cm-search select":{backgroundColor:"#1a1a1a",color:"#ededed",border:"1px solid #2e2e2e",borderRadius:"3px",padding:"2px 6px",fontSize:"12px",outline:"none"},".cm-panel.cm-search input:focus":{borderColor:"#146EF5"},".cm-panel.cm-search button":{backgroundColor:"#2e2e2e",color:"#ededed",border:"none",borderRadius:"3px",padding:"2px 8px",fontSize:"11px",cursor:"pointer"},".cm-panel.cm-search button:hover":{backgroundColor:"#3e3e3e"},".cm-panel.cm-search label":{color:"#abb2bf",fontSize:"11px"},".cm-searchMatch":{backgroundColor:"#e5c07b40",outline:"1px solid #e5c07b60"},".cm-searchMatch-selected":{backgroundColor:"#146EF540",outline:"1px solid #146EF580"},".cm-highlight-match":{backgroundColor:"#e5c07b50",borderBottom:"2px s
7olid #e5c07b"}}),nx=Rs.define(),sx=fs.define({create:()=>Wi.none,update(e,t){e=e.map(t.changes);for(const r of t.effects)r.is(nx)&&(e=r.value);return e},provide:e=>Nc.decorations.from(e)}),ix=l.forwardRef(function({language:e,value:t,onChange:r,placeholder:n,label:s,icon:i,referenceClassNames:a,hideHeader:d,readOnly:h},u){const{t:p}=o(),m=l.useRef(null),g=l.useRef(null),O=l.useRef(r);O.current=r;const x=l.useRef(new ws),[b,v]=l.useState(!1);l.useImperativeHandle(u,()=>({openSearch(){},scrollToText(e){const t=g.current;if(!t)return;const r=new UO(t.state.doc,e).next();r.done||t.dispatch({selection:{anchor:r.value.from,head:r.value.to},effects:Nc.scrollIntoView(r.value.from,{y:"center"})})},highlightSearch(e){const t=g.current;if(!t)return;if(!e)return void t.dispatch({effects:nx.of(Wi.none)});const r=Wi.mark({class:"cm-highlight-match"}),n=[],s=new UO(t.state.doc,e,0,t.state.doc.length,e=>e.toLowerCase());for(;!s.next().done;)n.push(r.range(s.value.from,s.value.to));const i=[nx.of(n.length?Wi.set(n):Wi.none)];n.length&&i.push(Nc.scrollIntoView(n[0].from,{y:"center"})),t.dispatch({...n.length?{selection:{anchor:n[0].from,head:n[0].to}}:{},effects:i})},clearSearch(){const e=g.current;e&&e.dispatch({effects:nx.of(Wi.none)})},clear(){const e=g.current;e&&e.state.doc.length&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:""}})}})),l.useEffect(()=>{if(!m.current)return;const r="html"===e?function(e={}){let t,r="";!1===e.matchClosingTags&&(r="noMatch"),!0===e.selfClosingTags&&(r=(r?r+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=Nm((e.nestedLanguages||[]).concat(AO),(e.nestedAttributes||[]).concat(zO)));let n=t?ZO.configure({wrap:t,dialect:r}):r?RO.configure({dialect:r}):RO;return new fu(n,[RO.data.of({autocomplete:NO(e)}),!1!==e.autoCloseTags?MO:[],dO().support,cg().support])}():"css"===e?cg():"jsx"===e?dO({jsx:!0,typescript:!0}):dO(),s=Gs.create({doc:t,extensions:[$d(),Td,Wc,bp(),Bu(),Dc.of([...Nf,...Zp]),r,FO,rx,Fc(n||""),Nc.updateListener.of(e=>{e.docChanged&&O.current(e.state.doc.toString())}),Nc.lineWrapping,tx,ex,x.current.of(a&&a.size>0&&("html"===e||"css"===e)?JO(a,e):[]),sx,...h?[Gs.readOnly.of(!0),Nc.editable.of(!1)]:[]]}),i=new Nc({state:s,parent:m.current});return g.current=i,()=>{i.destroy(),g.current=null}},[e,h]),l.useEffect(()=>{const e=g.current;if(!e)return;const r=e.state.doc.toString();r!==t&&e.dispatch({changes:{from:0,to:r.length,insert:t},selection:{anchor:Math.min(e.state.selection.main.anchor,t.length)},effects:nx.of(Wi.none)})},[t]),l.useEffect(()=>{const t=g.current;t&&t.dispatch({effects:x.current.reconfigure(a&&a.size>0&&("html"===e||"css"===e)?JO(a,e):[])})},[a,e]);const y=l.useCallback(async()=>{const e=g.current;if(!e)return;const t=e.state.doc.toString();await navigator.clipboard.writeText(t),v(!0),setTimeout(()=>v(!1),2e3)},[]),w=l.useCallback(()=>{r("")},[r]),S=l.useCallback(async()=>{try{const e=await navigator.clipboard.readText();r(e)}catch{}},[r]);return c.jsxs("div",{className:"flex flex-col h-full bg-[#1a1a1a] overflow-hidden",children:[!d&&c.jsxs("div",{className:"flex items-center justify-between px-3 h-8 min-h-8 border-b border-[#2e2e2e] bg-[#232323]",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-[#ededed]",children:[i,c.jsx("span",{children:s})]}),c.jsxs("div",{className:"flex items-center gap-0.5",children:[c.jsx("button",{onClick:y,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:p.converter.codePanel.copy,children:b?c.jsx(f,{size:14,className:"text-[#98c379]"}):c.jsx($,{size:14})}),c.jsx("button",{onClick:S,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:p.converter.codePanel.paste,children:c.jsx(ie,{size:14})}),c.jsx("button",{onClick:w,className:"p-1 rounded text-[#707070] hover:text-[#e06c75] hover:bg-white/5 transition-colors",title:p.converter.codePanel.clear,children:c.jsx(Ze,{size:14})})]})]}),c.jsx("div",{ref:m,className:"flex-1 overflow-hidden"})]})}),ox="https://preview.convertex.ai/p",ax=[{id:"desktop",label:"Desktop",icon:ke,width:null},{id:"tablet",label:"Tablet",icon:Ne,width:768},{id:"mobile",label:"Mobile",icon:Te,width:375}],lx=[{id:"desktop",label:"Desktop",icon:ke,width:null},{id:"tablet",label:"Tablet",icon:Ne,width:810},{id:"mobile",label:"Mobile",icon:Te,width:390}],cx={log:{icon:ge,color:"text-[#abb2bf]",bg:""},info:{icon:ge,color:"text-[#61afef]",bg:""}
7,warn:{icon:O,color:"text-[#e5c07b]",bg:"bg-[#e5c07b]/5"},error:{icon:T,color:"text-[#e06c75]",bg:"bg-[#e06c75]/5"}};const dx=[{pattern:/Cannot read properties of (null|undefined)/i,message:"Un element est introuvable. Verifiez que le selecteur cible un element existant dans le HTML."},{pattern:/is not defined/i,message:"Une variable ou fonction est utilisee mais n'existe pas. Verifiez l'orthographe ou l'ordre des scripts."},{pattern:/is not a function/i,message:"Vous essayez d'appeler quelque chose qui n'est pas une fonction. Verifiez le nom ou l'import."},{pattern:/Unexpected token/i,message:"Erreur de syntaxe : un caractere inattendu. Verifiez les accolades, virgules et parentheses."},{pattern:/SyntaxError/i,message:"Erreur de syntaxe dans le code. Verifiez la structure (accolades, guillemets, etc.)."},{pattern:/Failed to fetch|NetworkError|net::ERR_/i,message:"Echec de chargement d'une ressource. Verifiez l'URL ou la connexion."},{pattern:/CORS|cross-origin|blocked by CORS/i,message:"Requete bloquee par la politique CORS. Le serveur distant n'autorise pas cet acces."},{pattern:/Maximum call stack size exceeded/i,message:"Boucle infinie ou recursion trop profonde detectee."},{pattern:/Unhandled Promise/i,message:"Une promesse a ete rejetee sans gestionnaire d'erreur (.catch)."},{pattern:/TypeError/i,message:"Erreur de type : une valeur ne correspond pas au type attendu."},{pattern:/ReferenceError/i,message:"Reference introuvable : une variable est utilisee mais n'existe pas."},{pattern:/Script error/i,message:"Erreur dans un script externe. Les details sont masques pour des raisons de securite."}],hx=['export const ControlType = new Proxy({}, { get: (_, k) => typeof k === "string" ? k.toLowerCase() : k });','export const RenderTarget = { canvas: "canvas", export: "export", preview: "preview", thumbnail: "thumbnail" };',"export const useIsStaticRenderer = () => false;","export const useIsOnFramerCanvas = () => false;",'export const useLocaleInfo = () => ({ activeLocale: { id: "default", code: "en" }, locales: [] });',"export const useQueryData = () => ({ data: null, isLoading: false, error: null });","export const useFramerStyleSheet = () => ({});","export const withCSS = (Comp) => Comp;","export const Color = (v) => v;","Color.alpha = (c, a) => c;","export const addPropertyControls = () => {};",'export const getRenderTarget = () => "preview";',"const _defaults = { addPropertyControls, ControlType, RenderTarget, useIsStaticRenderer, useIsOnFramerCanvas, useLocaleInfo, useQueryData, useFramerStyleSheet, withCSS, Color, getRenderTarget };","export default new Proxy(_defaults, { get: (t, k) => k in t ? t[k] : () => undefined });"].join("\n"),ux=`data:text/javascript,${encodeURIComponent(hx)}`;const px=String.raw`(function(){ 8if(window.__cvxFramerRuntime)return;window.__cvxFramerRuntime=true; 9 10// ===== Parsing helpers (mirror framer/src/mapping/animations.js) ===== 11function parseDuration(v,fb){if(v==null||v==='')return fb;var s=String(v).trim();var n=parseFloat(s);if(isNaN(n))return fb;if(/ms$/i.test(s))return n/1000;if(/s$/i.test(s))return n;return n>10?n/1000:n;} 12function parseBool(v,fb){if(v==null||v==='')return fb;var s=String(v).trim().toLowerCase();if(s==='true'||s==='1'||s==='yes')return true;if(s==='false'||s==='0'||s==='no')return false;return fb;} 13function parseNumber(v,fb){if(v==null||v==='')return fb;var n=parseFloat(v);return isNaN(n)?fb:n;} 14var EASE_KW={linear:'linear',ease:'ease','ease-in':'ease-in','ease-out':'ease-out','ease-in-out':'ease-in-out'}; 15function parseEase(token,fb){if(!token)return fb;var t=String(token).trim().toLowerCase();if(t in EASE_KW)return EASE_KW[t];var m=t.match(/^cubic-bezier\(([^)]+)\)$/);if(m)return 'cubic-bezier('+m[1]+')';if(/^spring/i.test(t)){var sp=t.match(/^spring\(([^)]+)\)/);if(sp){var a=sp[1].split(',').map(function(s){return parseFloat(s.trim());});var b=isNaN(a[0])?0.2:a[0];return 'cubic-bezier(0.5,'+(1+b)+',0.5,1)';}return 'cubic-bezier(0.5,1.2,0.5,1)';}return fb;} 16 17// ===== Presets ===== 18var ENTER_DIST=50,TEXT_DIST=10; 19var ENTER_PRESETS={ 20 fade:{opacity:0}
20, 21 'fade-up':{opacity:0,y:ENTER_DIST}, 22 'fade-down':{opacity:0,y:-ENTER_DIST}, 23 'fade-left':{opacity:0,x:ENTER_DIST}, 24 'fade-right':{opacity:0,x:-ENTER_DIST}, 25 'slide-up':{y:ENTER_DIST}, 26 'slide-down':{y:-ENTER_DIST}, 27 'slide-left':{x:ENTER_DIST}, 28 'slide-right':{x:-ENTER_DIST}, 29 scale:{scale:0.5,opacity:0}, 30 'scale-up':{scale:0.5,opacity:0}, 31 zoom:{scale:0.5,opacity:0}, 32 rotate:{rotate:-10,opacity:0}, 33 none:{} 34}; 35var TEXT_PRESETS={ 36 fade:{opacity:0}, 37 'fade-up':{opacity:0,y:TEXT_DIST}, 38 'fade-down':{opacity:0,y:-TEXT_DIST}, 39 'fade-left':{opacity:0,x:TEXT_DIST}, 40 'fade-right':{opacity:0,x:-TEXT_DIST}, 41 'slide-up':{y:TEXT_DIST}, 42 'slide-down':{y:-TEXT_DIST}, 43 blur:{opacity:0,blur:8}, 44 'fade-blur':{opacity:0,y:TEXT_DIST,blur:8}, 45 scale:{scale:0.5,opacity:0}, 46 zoom:{scale:0.5,opacity:0}, 47 rotate:{rotate:-10,opacity:0}, 48 appear:{}, 49 none:{} 50}; 51var LOOP_PRESETS={ 52 rotate:{rotate:360}, 53 spin:{rotate:360}, 54 pulse:{scale:1.05}, 55 bounce:{y:-10}, 56 shake:{x:5}, 57 none:{} 58}; 59 60// ===== Style block: minimal helpers only ===== 61// IMPORTANT: no permanent transform rules here. Transforms are written inline 62// only for the duration of each animation (or live, for drag/ticker), then 63// cleared so user CSS (including :hover transforms) takes over again. 64var STYLE_BLOCK=document.createElement('style'); 65STYLE_BLOCK.id='__cvx_framer_style'; 66STYLE_BLOCK.textContent= 67 '[data-framer-enter],[data-framer-scroll-appear],[data-framer-text-effect]{will-change:transform,opacity,filter;}'+ 68 '[data-framer-loop],[data-framer-drag]{will-change:transform,opacity;}'+ 69 '[data-framer-drag]{cursor:grab;touch-action:none;}'+ 70 '[data-framer-drag].__cvx_dragging{cursor:grabbing;}'+ 71 '.__cvx_text_tok{display:inline-block;will-change:transform,opacity,filter;}'+ 72 '[data-framer-ticker]{overflow:hidden;}'+ 73 '[data-framer-ticker] > .__cvx_ticker_track,[data-framer-ticker] > .__cvx_ticker_clone{display:flex;flex-wrap:nowrap;flex-direction:inherit;align-items:inherit;justify-content:inherit;flex-shrink:0;align-self:stretch;will-change:transform;}'; 74document.head.appendChild(STYLE_BLOCK); 75 76function buildTransformStr(v){return 'translate('+v.x+'px,'+v.y+'px) scale('+v.scale+') rotate('+v.rotate+'deg)';} 77function clearInlineAnim(el){el.style.transform='';el.style.opacity='';el.style.filter='';} 78 79function resolveValues(preset,getAttr,prefix,presetTable){ 80 var pv=presetTable[preset]||presetTable.none||{}; 81 var distance=parseNumber(getAttr(prefix+'-distance'),null); 82 var adj={x:pv.x,y:pv.y,scale:pv.scale,opacity:pv.opacity,rotate:pv.rotate,blur:pv.blur}; 83 if(distance!=null){ 84 if(adj.y)adj.y=(adj.y>0?1:-1)*distance; 85 if(adj.x)adj.x=(adj.x>0?1:-1)*distance; 86 } 87 return { 88 x:parseNumber(getAttr(prefix+'-x'),adj.x||0), 89 y:parseNumber(getAttr(prefix+'-y'),adj.y||0), 90 scale:parseNumber(getAttr(prefix+'-scale'),adj.scale!=null?adj.scale:1), 91 opacity:parseNumber(getAttr(prefix+'-opacity'),adj.opacity!=null?adj.opacity:1), 92 rotate:parseNumber(getAttr(prefix+'-rotate'),adj.rotate||0), 93 blur:parseNumber(getAttr(prefix+'-blur'),adj.blur||0) 94 }; 95} 96 97function buildTiming(getAttr,prefix,defaults){ 98 var dur=parseDuration(getAttr(prefix+'-duration'),defaults.duration); 99 var del=parseDuration(getAttr(prefix+'-delay'),defaults.delay); 100 var ease=parseEase(getAttr(prefix+'-easing'),defaults.easing); 101 return {duration:dur*1000,delay:del*1000,easing:ease,fill:'both'}; 102} 103 104// ===== Stagger: rewrite child enter delays before applyEnter runs ===== 105function applyStagger(){ 106 var parents=document.querySelectorAll('[data-framer-stagger]'); 107 parents.forEach(function(parent){ 108 var stg=parseDuration(parent.getAttribute('data-framer-stagger'),0); 109 if(!stg)return; 110 var parentDelay=parseDuration(parent.getAttribute('data-enter-delay'),0); 111 var i=0; 112 Array.prototype.forEach.call(parent.children,function(child){ 113 if(!child.hasAttribute('data-framer-enter'))return; 114 // Only set if not explicitly overridden (no data-enter-delay on the child) 115 if(child.hasAttribute('data-enter-delay'))return; 116 var d=parentDelay+(i+1)*stg; 117 child.setAttribute('data-enter-delay',(d*1000)+'ms'); 118 i++; 119 }); 120 }); 121} 122 123// ===== Enter (mount-appear) ===== 124// Strategy: set initial transform/opacity inline (so first paint is at the start
125// position), then animate to identity. On finish, clear inline style so user 126// CSS (including :hover { transform: ... }) takes over again. 127function applyEnter(){ 128 document.querySelectorAll('[data-framer-enter]').forEach(function(el){ 129 var preset=el.getAttribute('data-framer-enter'); 130 if(!preset||preset==='none')return; 131 var v=resolveValues(preset,el.getAttribute.bind(el),'data-enter',ENTER_PRESETS); 132 // Capture the element's CSS-declared transform BEFORE we set inline styles. 133 // Without this, our inline transform overrides the user's CSS (e.g. a card 134 // with .foo-left{transform:rotate(-12deg)} would render at 0deg during the 135 // enter state). We compose: inline = preset + base; end state = base only. 136 var base=getComputedStyle(el).transform;if(base==='none')base=''; 137 var suffix=base?(' '+base):''; 138 el.style.transform=buildTransformStr(v)+suffix; 139 el.style.opacity=v.opacity; 140 var t=buildTiming(el.getAttribute.bind(el),'data-enter',{duration:0.4,delay:0,easing:'cubic-bezier(0.44,0,0.56,1)'}); 141 requestAnimationFrame(function(){ 142 var anim=el.animate([ 143 {transform:buildTransformStr(v)+suffix,opacity:v.opacity}, 144 {transform:'translate(0,0) scale(1) rotate(0deg)'+suffix,opacity:1} 145 ],t); 146 anim.onfinish=function(){clearInlineAnim(el);el.__cvxEnterDone=true;if(el.__cvxAfterEnter)el.__cvxAfterEnter();}; 147 el.__cvxEnterAnim=anim; 148 }); 149 }); 150} 151 152// ===== Scroll-appear (viewport-triggered) ===== 153function applyScrollAppear(){ 154 var nodes=document.querySelectorAll('[data-framer-scroll-appear]'); 155 if(!nodes.length)return; 156 var inViewElems=[],directionElems=[],targetElems=[],mountElems=[]; 157 nodes.forEach(function(el){ 158 var preset=el.getAttribute('data-framer-scroll-appear'); 159 if(!preset||preset==='none')return; 160 var v=resolveValues(preset,el.getAttribute.bind(el),'data-scroll',ENTER_PRESETS); 161 // Same composition rule as applyEnter: capture base CSS transform before 162 // any inline mutation so the user's per-class rotate/scale survives both 163 // the initial out-of-viewport state and the reverse-replay state. 164 var base=getComputedStyle(el).transform;if(base==='none')base=''; 165 el.__cvxBase=base; 166 var suffix=base?(' '+base):''; 167 el.style.transform=buildTransformStr(v)+suffix; 168 el.style.opacity=v.opacity; 169 el.__cvxScrollV=v; 170 el.__cvxScrollTiming=buildTiming(el.getAttribute.bind(el),'data-scroll',{duration:0.4,delay:0,easing:'cubic-bezier(0.44,0,0.56,1)'}); 171 el.__cvxScrollOnce=parseBool(el.getAttribute('data-scroll-once'),true); 172 var trig=el.getAttribute('data-scroll-trigger')||'onInView'; 173 if(trig==='onMount')mountElems.push(el); 174 else if(trig==='onScrollDirection')directionElems.push(el); 175 else if(trig==='onScrollTarget')targetElems.push(el); 176 else inViewElems.push(el); 177 }); 178 function playForward(el){ 179 var v=el.__cvxScrollV; 180 var base=el.__cvxBase||'';var suffix=base?(' '+base):''; 181 var anim=el.animate([ 182 {transform:buildTransformStr(v)+suffix,opacity:v.opacity}, 183 {transform:'translate(0,0) scale(1) rotate(0deg)'+suffix,opacity:1} 184 ],el.__cvxScrollTiming); 185 anim.onfinish=function(){clearInlineAnim(el);}; 186 } 187 function playReverse(el){ 188 var v=el.__cvxScrollV; 189 var base=el.__cvxBase||'';var suffix=base?(' '+base):''; 190 var anim=el.animate([ 191 {transform:'translate(0,0) scale(1) rotate(0deg)'+suffix,opacity:1}, 192 {transform:buildTransformStr(v)+suffix,opacity:v.opacity} 193 ],el.__cvxScrollTiming); 194 anim.onfinish=function(){el.style.transform=buildTransformStr(v)+suffix;el.style.opacity=v.opacity;}; 195 }
196 mountElems.forEach(playForward); 197 if(inViewElems.length){ 198 inViewElems.forEach(function(el){ 199 var th=Math.min(1,Math.max(0.01,parseNumber(el.getAttribute('data-scroll-threshold'),0.1))); 200 var io=new IntersectionObserver(function(entries){ 201 entries.forEach(function(e){ 202 if(e.isIntersecting){ 203 if(el.__cvxScrollPlayed&&el.__cvxScrollOnce)return; 204 playForward(el);el.__cvxScrollPlayed=true; 205 if(el.__cvxScrollOnce)io.unobserve(el); 206 }else if(!el.__cvxScrollOnce&&el.__cvxScrollPlayed){playReverse(el);} 207 }); 208 },{threshold:th}); 209 io.observe(el); 210 }); 211 } 212 if(directionElems.length){ 213 var lastY=window.scrollY; 214 var ioD=new IntersectionObserver(function(entries){ 215 var dy=window.scrollY-lastY;lastY=window.scrollY; 216 entries.forEach(function(e){ 217 if(!e.isIntersecting)return; 218 var el=e.target; 219 if(dy>=0)playForward(el);else playReverse(el); 220 }); 221 },{threshold:0.1}); 222 directionElems.forEach(function(el){ioD.observe(el);}); 223 } 224 if(targetElems.length){
225 targetElems.forEach(function(el){ 226 var sel=el.getAttribute('data-scroll-target'); 227 if(!sel)return; 228 var target=document.querySelector(sel.charAt(0)==='#'?sel:('#'+sel)); 229 if(!target)return; 230 var ioT=new IntersectionObserver(function(entries){ 231 entries.forEach(function(e){ 232 if(e.isIntersecting){ 233 if(el.__cvxScrollPlayed&&el.__cvxScrollOnce)return; 234 playForward(el);el.__cvxScrollPlayed=true; 235 if(el.__cvxScrollOnce)ioT.unobserve(target); 236 }else if(!el.__cvxScrollOnce&&el.__cvxScrollPlayed){playReverse(el);} 237 }); 238 },{threshold:0.1}); 239 ioT.observe(target); 240 }); 241 } 242} 243 244// ===== Exit (play enter in reverse when element leaves viewport) ===== 245function applyExit(){ 246 var nodes=document.querySelectorAll('[data-framer-exit]'); 247 if(!nodes.length)return; 248 var ioE=new IntersectionObserver(function(entries){ 249 entries.forEach(function(e){ 250 var el=e.target; 251 if(!parseBool(el.getAttribute('data-framer-exit'),false))return; 252 var preset=el.getAttribute('data-framer-enter')||el.getAttribute('data-framer-scroll-appear'); 253 if(!preset)return; 254 var v=resolveValues(preset,el.getAttribute.bind(el),'data-enter',ENTER_PRESETS); 255 var t={duration:400,easing:'cubic-bezier(0.44,0,0.56,1)',fill:'both'}; 256 if(!e.isIntersecting){ 257 if(el.__cvxEnterDone||el.__cvxScrollPlayed){ 258 el.animate([ 259 {transform:'translate(0,0) scale(1) rotate(0deg)',opacity:1}, 260 {transform:buildTransformStr(v),opacity:v.opacity} 261 ],t); 262 } 263 }else if(el.__cvxExited){ 264 el.animate([ 265 {transform:buildTransformStr(v),opacity:v.opacity}, 266 {transform:'translate(0,0) scale(1) rotate(0deg)',opacity:1} 267 ],t); 268 } 269 el.__cvxExited=!e.isIntersecting; 270 }); 271 },{threshold:0.05}); 272 nodes.forEach(function(el){ioE.observe(el);}); 273} 274 275// ===== Text effect (per-token reveal) ===== 276function tokenizeText(el,mode){ 277 var walker=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,{acceptNode:function(n){return n.nodeValue&&n.nodeValue.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;}}); 278 var nodes=[],n;while((n=walker.nextNode()))nodes.push(n); 279 var tokens=[]; 280 nodes.forEach(function(textNode){ 281 var text=textNode.nodeValue; 282 var parent=textNode.parentNode; 283 var frag=document.createDocumentFragment(); 284 var parts; 285 if(mode==='character'){ 286 parts=text.split(''); 287 }else if(mode==='line'){ 288 parts=text.split(/(\n+)/); 289 }else{ 290 // word: split keeping whitespace as separators 291 parts=text.split(/(\s+)/); 292 } 293 parts.forEach(function(p){ 294 if(!p)return; 295 if(/^\s+$/.test(p)){frag.appendChild(document.createTextNode(p));return;} 296 var span=document.createElement('span'); 297 span.className='__cvx_text_tok'; 298 span.textContent=p; 299 frag.appendChild(span); 300 tokens.push(span); 301 }); 302 parent.replaceChild(frag,textNode); 303 }); 304 return tokens; 305} 306function applyTextEffect(){ 307 document.querySelectorAll('[data-framer-text-effect]').forEach(function(el){ 308 var preset=el.getAttribute('data-framer-text-effect')||'appear'; 309 var mode=String(el.getAttribute('data-text-tokenization')||'word').toLowerCase(); 310 if(mode==='char'||mode==='characters'||mode==='letter')mode='character'; 311 if(mode!=='character'&&mode!=='line')mode='word'; 312 var tokens=tokenizeText(el,mode); 313 if(!tokens.length)return; 314 var v=resolveValues(preset,el.getAttribute.bind(el),'data-text',TEXT_PRESETS); 315 var dur=parseDuration(el.getAttribute('data-text-duration'),0.4); 316 var stagger=parseDuration(el.getAttribute('data-text-stagger'),0); 317 var startDelay=parseDuration(el.getAttribute('data-text-delay'),0); 318 var ease=parseEase(el.getAttribute('data-text-easing'),'cubic-bezier(0.44,0,0.56,1)'); 319 var trig=el.getAttribute('data-text-trigger')||'onMount'; 320 var replay=parseBool(el.getAttribute('data-text-replay'),false); 321 var threshold=Math.min(1,Math.max(0.01,parseNumber(el.getAttribute('data-text-threshold'),0.1))); 322 function fromStyle(){ 323 return {transform:'translate('+v.x+'px,'+v.y+'px) scale('+v.scale+') rotate('+v.rotate+'deg)',opacity:v.opacity,filter:v.blur?'blur('+v.blur+'px)':'blur(0)'}; 324 } 325 function toStyle(){return {transform:'translate(0,0) scale(1) rotate(0deg)',opacity:1,filter:'blur(0)'};} 326 // set initial 327 tokens.forEach(function(tk){var fs=fromStyle();tk.style.transform=fs.transform;tk.style.opacity=fs.opacity;tk.style.filter=fs.filter;}); 328 function play(){ 329 tokens.forEach(function(tk,i){ 330 tk.animate([fromStyle(),toStyle()],{duration:dur*1000,delay:(startDelay+i*stagger)*1000,easing:ease,fill:'both'}); 331 }); 332 } 333 function reverse(){ 334 tokens.forEach(function(tk,i){ 335 tk.animate([toStyle(),fromStyle()],{duration:dur*1000,delay:i*stagger*1000,easing:ease,fill:'both'}); 336 }); 337 } 338 if(trig==='onMount'){play();return;} 339 var played=false; 340 var io=new IntersectionObserver(function(entries){
341 entries.forEach(function(e){ 342 if(e.isIntersecting){ 343 if(played&&!replay)return; 344 play();played=true; 345 if(!replay)io.unobserve(el); 346 }else if(replay&&played){reverse();} 347 }); 348 },{threshold:threshold}); 349 io.observe(el); 350 }); 351} 352 353// ===== Loop (continuous repeat) ===== 354// Animates transform/opacity directly. When the loop is running, transform is 355// owned by WAAPI - any :hover { transform } on this element won't apply. That 356// matches Framer's behavior (a looping element doesn't accept hover transforms). 357function applyLoop(){ 358 document.querySelectorAll('[data-framer-loop]').forEach(function(el){ 359 var preset=el.getAttribute('data-framer-loop'); 360 if(!preset||preset==='none')return; 361 var pv=LOOP_PRESETS[preset]||{}; 362 var x=parseNumber(el.getAttribute('data-loop-x'),pv.x||0); 363 var y=parseNumber(el.getAttribute('data-loop-y'),pv.y||0); 364 var sc=parseNumber(el.getAttribute('data-loop-scale'),pv.scale!=null?pv.scale:1); 365 var rot=parseNumber(el.getAttribute('data-loop-rotate'),pv.rotate||0); 366 var sx=parseNumber(el.getAttribute('data-loop-skew-x'),0); 367 var sy=parseNumber(el.getAttribute('data-loop-skew-y'),0); 368 var op=parseNumber(el.getAttribute('data-loop-opacity'),pv.opacity!=null?pv.opacity:1); 369 var dur=parseDuration(el.getAttribute('data-loop-duration'),1); 370 var ease=parseEase(el.getAttribute('data-loop-easing'),'linear'); 371 var repeatType=String(el.getAttribute('data-loop-repeat-type')||'loop').toLowerCase(); 372 var direction=repeatType==='reverse'?'reverse':repeatType==='mirror'?'alternate':'normal'; 373 var repeatDelay=parseDuration(el.getAttribute('data-loop-repeat-delay'),0)*1000; 374 var pauseOff=parseBool(el.getAttribute('data-loop-pause-offscreen'),true); 375 function transformAt(){ 376 return 'translate('+x+'px,'+y+'px) scale('+sc+') rotate('+rot+'deg) skew('+sx+'deg,'+sy+'deg)'; 377 } 378 function start(){ 379 if(el.__cvxLoopAnim)return; 380 var keyframes=[ 381 {transform:'translate(0,0) scale(1) rotate(0deg) skew(0deg,0deg)',opacity:1}, 382 {transform:transformAt(),opacity:op} 383 ]; 384 var timing={duration:dur*1000,iterations:Infinity,easing:ease,direction:direction,fill:'forwards'}; 385 if(repeatDelay>0)timing.endDelay=repeatDelay; 386 el.__cvxLoopAnim=el.animate(keyframes,timing); 387 } 388 // If enter is present on the same element, chain: enter finishes, then loop starts. 389 if(el.hasAttribute('data-framer-enter')||el.hasAttribute('data-framer-scroll-appear')){ 390 el.__cvxAfterEnter=start; 391 }else{ 392 start(); 393 } 394 if(pauseOff){ 395 var ioL=new IntersectionObserver(function(entries){ 396 entries.forEach(function(e){ 397 if(e.isIntersecting){if(el.__cvxLoopAnim&&el.__cvxLoopAnim.playState==='paused')el.__cvxLoopAnim.play();} 398 else if(el.__cvxLoopAnim){el.__cvxLoopAnim.pause();} 399 }); 400 },{threshold:0.01}); 401 ioL.observe(el); 402 } 403 }); 404} 405 406// ===== Ticker (marquee / infinite horizontal scroll) ===== 407function applyTicker(){ 408 document.querySelectorAll('[data-framer-ticker]').forEach(function(el){ 409 if(!parseBool(el.getAttribute('data-framer-ticker'),false))return; 410 var velocity=parseNumber(el.getAttribute('data-ticker-velocity'),100); 411 var direction=String(el.getAttribute('data-ticker-direction')||'default').toLowerCase()==='reverse'?-1:1; 412 var hoverMod=parseNumber(el.getAttribute('data-ticker-hover-modifier'),100)/100; 413 var draggable=parseBool(el.getAttribute('data-ticker-draggable'),false); 414 // Axis inferred from parent's flex-direction (matches Framer semantics). 415 var cs=getComputedStyle(el); 416 var vertical=(cs.flexDirection||'row').indexOf('column')===0; 417 // Capture the parent's gap BEFORE we wrap children, so we can re-apply it to 418 // the inner track/clone (which become the new "row" of original children). 419 var gapStr=vertical?cs.rowGap:cs.columnGap; 420 var gapPx=(gapStr==='normal'||!gapStr)?0:(parseFloat(gapStr)||0); 421 // Wrap existing children in a track; we'll add (and grow) clones below. 422 var track=document.createElement('div'); 423 track.className='__cvx_ticker_track'; 424 while(el.firstChild)track.appendChild(el.firstChild); 425 el.appendChild(track); 426 if(gapStr&&gapStr!=='normal')track.style.gap=gapStr; 427 428 var copies=[track]; 429 var unit=0,loopSize=0; 430 function addClone(){ 431 var c=track.cloneNode(true); 432 c.className='__cvx_ticker_clone'; 433 if(gapStr&&gapStr!=='normal')c.style.gap=gapStr; 434 el.appendChild(c); 435 copies.push(c); 436 } 437 // Recompute trackSize + viewport; add clones until total content covers 438 // viewport + 1 unit (the seamless-loop requirement). Called from a 439 // ResizeObserver so it adapts to late image loads, breakpoint changes, 440 // and initial layout where clientHeight may briefly be 0. 441 function recompute(){ 442 var trackSize=vertical?track.scrollHeight:track.scrollWidth; 443 if(!trackSize)return; 444 unit=trackSize+gapPx; 445 loopSize=unit; 446 var vpSize=vertical?el.clientHeight:el.clientWidth; 447 // Guarantee enough copies so total content >= viewport + unit. Solve for 448 // minimum N (additional clones besides track): N >= (vpSize + gap) / unit. 449 // Floor of 2 clones (3 copies) keeps things safe when vpSize is briefly 0. 450 var needed=Math.max(2,Math.ceil(((vpSize||unit*3)+gapPx)/unit)); 451 while(copies.length-1<needed)addClone(); 452 } 453 // Initial measurement after layout settles 454 requestAnimationFrame(function(){ 455 recompute(); 456 if(typeof ResizeObserver!=='undefined'){ 457 var ro=new ResizeObserver(function(){recompute();}); 458 ro.observe(el);ro.observe(track); 459 } 460 // Also re-check after images load (they can shift track height even with 461 // aspect-ratio if any tile lacks one). 462 el.querySelectorAll('img').forEach(function(img){ 463 if(!img.complete)img.addEventListener('load',recompute,{once:true}); 464 }); 465 // Drive the loop 466 function applyTransform(off){ 467 var tr=vertical?('translate3d(0,'+off+'px,0)'):('translate3d('+off+'px,0,0)'); 468 for(var k=0;k<copies.length;k++)copies[k].style.transform=tr; 469 } 470 var offset=0; 471 var hovering=false,dragging=false,dragStart=0,dragBase=0; 472 var lastT=performance.now(); 473 function tick(now){ 474 var dt=(now-lastT)/1000;lastT=now; 475 if(!loopSize){requestAnimationFrame(tick);return;} 476 if(!dragging){ 477 var speed=velocity*(hovering?hoverMod:1); 478 offset-=direction*speed*dt; 479 if(direction>0){while(offset<=-loopSize)offset+=loopSize;} 480 else{while(offset>=loopSize)offset-=loopSize;} 481 } 482 applyTransform(offset); 483 requestAnimationFrame(tick); 484 } 485 requestAnimationFrame(tick); 486 el.addEventListener('mouseenter',function(){hovering=true;}); 487 el.addEventListener('mouseleave',function(){hovering=false;}); 488 if(draggable){ 489 el.style.cursor='grab'; 490 el.addEventListener('pointerdown',function(e){dragging=true;dragStart=vertical?e.clientY:e.clientX;dragBase=offset;el.style.cursor='grabbing';try{el.setPointerCapture(e.pointerId);}catch(_){}}); 491 el.addEventListener('pointermove',function(e){if(!dragging)return;var pos=vertical?e.clientY:e.clientX;offset=dragBase+(pos-dragStart);if(direction>0){while(offset<=-loopSize)offset+=loopSize;while(offset>0)offset-=loopSize;}else{while(offset>=loopSize)offset-=loopSize;while(offset<0)offset+=loopSize;}}); 492 el.addEventListener('pointerup',function(){dragging=false;el.style.cursor='grab';}); 493 el.addEventListener('pointercancel',function(){dragging=false;el.style.cursor='grab';}); 494 } 495 }); 496 }); 497} 498 499// ===== Drag (pointer-driven translate, optional constraint + momentum + snap-back) ===== 500function applyDrag(){ 501 document.querySelectorAll('[data-framer-drag]').forEach(function(el){ 502 if(!parseBool(el.getAttribute('data-framer-drag'),false))return; 503 var freeform=parseBool(el.getAttribute('data-drag-freeform'),false); 504 var momentum=parseBool(el.getAttribute('data-drag-momentum'),true); 505 var snapBack=parseBool(el.getAttribute('data-drag-snap-back'),true); 506 var constraintSel=el.getAttribute('data-drag-constraint'); 507 var constraint=constraintSel?document.querySelector(constraintSel.charAt(0)==='#'?constraintSel:('#'+constraintSel)):el.parentElement; 508 var x=0,y=0,vx=0,vy=0; 509 var dragging=false,lastX=0,lastY=0,lastT=0; 510 function clamp(){ 511 if(freeform||!constraint)return; 512 var cb=constraint.getBoundingClientRect(); 513 var eb=el.getBoundingClientRect(); 514 // The current x/y already shift eb; recover the rest-position bbox 515 var restL=eb.left-x,restR=eb.right-x,restT=eb.top-y,restB=eb.bottom-y; 516 var minX=cb.left-restL,maxX=cb.right-restR; 517 var minY=cb.top-restT,maxY=cb.bottom-restB; 518 if(minX>maxX){var mid=(minX+maxX)/2;minX=maxX=mid;} 519 if(minY>maxY){var mid2=(minY+maxY)/2;minY=maxY=mid2;} 520 x=Math.min(maxX,Math.max(minX,x)); 521 y=Math.min(maxY,Math.max(minY,y)); 522 } 523 function apply(){el.style.transform='translate3d('+x+'px,'+y+'px,0)';} 524 el.addEventListener('pointerdown',function(e){ 525 dragging=true;lastX=e.clientX;lastY=e.clientY;lastT=performance.now();vx=vy=0; 526 el.classList.add('__cvx_dragging');
527 try{el.setPointerCapture(e.pointerId);}catch(_){/* ignore */} 528 e.preventDefault(); 529 }); 530 el.addEventListener('pointermove',function(e){ 531 if(!dragging)return; 532 var now=performance.now();var dt=Math.max(1,now-lastT)/1000; 533 var dx=e.clientX-lastX,dy=e.clientY-lastY; 534 x+=dx;y+=dy;vx=dx/dt;vy=dy/dt; 535 lastX=e.clientX;lastY=e.clientY;lastT=now; 536 clamp();apply(); 537 }); 538 function end(){ 539 if(!dragging)return; 540 dragging=false;el.classList.remove('__cvx_dragging'); 541 if(snapBack){ 542 el.animate([{transform:'translate('+x+'px,'+y+'px)'},{transform:'translate(0,0)'}],{duration:500,easing:'cubic-bezier(0.16,1,0.3,1)',fill:'forwards'}).onfinish=function(){x=0;y=0;apply();el.style.transform='';}; 543 }else if(momentum){ 544 // Decay velocity over ~500ms 545 var t0=performance.now();var startX=x,startY=y;var sVx=vx,sVy=vy; 546 function decay(now){ 547 var dt=(now-t0)/1000; 548 if(dt>0.6){return;} 549 var factor=Math.exp(-3*dt); 550 x=startX+sVx*(1-factor)*0.2; 551 y=startY+sVy*(1-factor)*0.2; 552 clamp();apply(); 553 requestAnimationFrame(decay); 554 } 555 requestAnimationFrame(decay); 556 } 557 } 558 el.addEventListener('pointerup',end); 559 el.addEventListener('pointercancel',end); 560 }); 561} 562 563function run(){ 564 try{applyStagger();}catch(e){console.warn('[cvx framer] stagger',e);} 565 try{applyEnter();}catch(e){console.warn('[cvx framer] enter',e);} 566 try{applyScrollAppear();}catch(e){console.warn('[cvx framer] scroll-appear',e);} 567 try{applyExit();}catch(e){console.warn('[cvx framer] exit',e);} 568 try{applyTextEffect();}catch(e){console.warn('[cvx framer] text-effect',e);} 569 try{applyLoop();}catch(e){console.warn('[cvx framer] loop',e);} 570 try{applyTicker();}catch(e){console.warn('[cvx framer] ticker',e);} 571 try{applyDrag();}catch(e){console.warn('[cvx framer] drag',e);} 572} 573if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run(); 574})();`;let fx=0;function mx({onInspectElement:e,onPartialConvert:t,mcpSyncState:r="idle",mcpSyncMessage:n,onUndo:i,onRedo:d,canUndo:h=!1,canRedo:u=!1}={}){const{t:m}=o(),{profile:O}=a(),x=(b="shared-preview",v=(null==O?void 0:O.plan)??"free",Nr[b].includes(v));var b,v;const{html:y,css:w,js:S,externalScripts:j,activePageId:Q,targetTool:P,components:_}=He(),C=l.useRef(null),T=l.useRef(null),N=l.useRef(null),[E,A]=l.useState("desktop"),[z,Z]=l.useState(null),[R,M]=l.useState(""),[D,L]=l.useState(!1),[Y,I]=l.useState(!1),[V,B]=l.useState([]),[F,G]=l.useState(160),[U,H]=l.useState(!1),[K,J]=l.useState(!1),ee=l.useRef(null),te=l.useCallback(e=>{e.preventDefault();const t=e.clientY,r=F;H(!0);const n=Math.max(200,Math.round(.8*window.innerHeight)),s=document.body.style.userSelect;document.body.style.userSelect="none";const i=e=>{const s=t-e.clientY;G(Math.min(n,Math.max(100,r+s)))},o=()=>{H(!1),document.body.style.userSelect=s,window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",i),window.addEventListener("mouseup",o)},[F]),re=l.useCallback(async()=>{if(0===V.length)return;const e=V.map(e=>`[${e.level.toUpperCase()}] ${e.args}`).join("\n");try{await navigator.clipboard.writeText(e),J(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>J(!1),1500)}catch{}},[V]),[ne,se]=l.useState(!1),[ie,oe]=l.useState("idle"),[ae,le]=l.useState(null),[ce,he]=l.useState(!1),ue=l.useRef(null),[pe,fe]=l.useState(!1),[me,ge]=l.useState([]),Oe=l.useRef(e);Oe.current=e;const xe=l.useRef(t);xe.current=t;const be=l.useRef([]),ve=l.useRef(!1),[we,je]=l.useState(!1),[Qe,_e]=l.useState(null),Ce=l.useMemo(()=>j.filter(e=>e.enabled),[j]),Te="\n<script>\n(function(){\n var _post = function(level, args) {\n try {\n var parts = [];\n for (var i = 0; i < args.length; i++) {\n try { parts.push(typeof args[i] === 'object' ? JSON.stringify(args[i]) : String(args[i])); }\n catch(e) { parts.push(String(args[i])); }\n }\n window.parent.postMessage({ __console: true, level: level, args: parts.join(' ') }, '*');\n } catch(e) {}\n };\n var _log = console.log, _warn = console.warn, _error = console.error, _info = console.info;\n console.log = function() { _log.apply(console, arguments); _post('log', arguments); };\n console.warn = function() { _warn.apply(console, arguments); _post('warn', arguments); };\n console.error = function() { _error.apply(console, arguments); _post('error', arguments); };\n console.info = function() { _info.apply(console, arguments); _post('info', arguments); };\n window.addEventListener('error', function(e) {\n // Cross-origin scripts without CORS headers surface as an opaque\n // \"Script error.\" with no filename and lineno 0 â zero actionable detail and\n // very noisy. Skip those. Same-origin errors (inline Framer runtime, Code\n // Component renders, user scripts) keep their real message/file/line.\n if ((e.message === 'Script error.' || e.message === 'Script error') && !e.filename) return;\n _post('error', [e.message + ' (' + (e.filename||'') + ':' + (e.lineno||0) + ')']);\n });\n window.addEventListener('unhandledrejection', function(e) {\n _post('error', ['Unhandled Promise: ' + (e.reason && e.reason.message || e.reason)]);\n });\n})();\n<\/script>",Ne=l.useMemo(()=>{const e=Ce.filter(e=>"css"===e.type).map(e=>`<link rel="stylesheet" href="${e.url}">`).join("\n"),t=Ce.filter(e=>"js"===e.type).map(e=>`<script src="${e.url}"><\/script>`).join("\n");return`<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n${Te}\n<script>\n(function(){\n // === Block ALL navigation inside the preview iframe ===\n\n // 1. Prevent link clicks (capture phase, fires first)\n document.addEventListener('click', function(e) {\n var node = e.target;\n while (node && node !== document) {\n if (node.nodeName === 'A') {\n var href = node.getAttribute('href') || node.getAttribute('data-href-original');\n if (href && href !== '#' && href.charAt(0) !== '#' && href.slice(0,11) !== 'javascript:') {\n e.preventDefault();\n return;\n }\n break;\n }\n node = node.parentNode;\n }\n }, true);\n\n // 2. Prevent form submissions\n document.addEventListener('submit', function(e) { e.preventDefault(); }, true);
574\n\n // 3. Block window.open\n window.open = function() { return null; };\n\n // 4. Block programmatic navigation\n try { window.location.assign = function(){}; } catch(e){}\n try { window.location.replace = function(){}; } catch(e){}\n // Override Location.prototype.href setter to block window.location.href = '...'\n try {\n var _LP = Object.getPrototypeOf(window.location);\n var _hd = Object.getOwnPropertyDescriptor(_LP, 'href');\n if (_hd && _hd.set) {\n var _origSet = _hd.set;\n Object.defineProperty(_LP, 'href', {\n get: _hd.get,\n set: function(v) {\n if (typeof v === 'string' && (v === '' || v === '#' || v.charAt(0) === '#')) {\n _origSet.call(this, v);\n }\n // else silently block\n },\n enumerable: _hd.enumerable, configurable: true\n });\n }\n } catch(e){}\n // Also block form.submit() which bypasses the submit event\n try { HTMLFormElement.prototype.submit = function(){}; } catch(e){}\n try { HTMLFormElement.prototype.requestSubmit = function(){}; } catch(e){}\n\n // 5. Neutralize navigable hrefs (belt-and-suspenders)\n function neutralizeOne(a) {\n var href = a.getAttribute('href');\n if (!href || href === '#' || href.charAt(0) === '#' || href.slice(0,11) === 'javascript:') return;\n a.setAttribute('data-href-original', href);\n a.setAttribute('href', 'javascript:void(0)');\n a.style.cursor = 'default';\n a.removeAttribute('target');\n }\n function neutralizeAll() {\n document.querySelectorAll('a[href]').forEach(neutralizeOne);\n // Also neutralize form actions\n document.querySelectorAll('form[action]').forEach(function(f) {\n f.setAttribute('data-action-original', f.getAttribute('action'));\n f.removeAttribute('action');\n });\n if (typeof MutationObserver !== 'undefined') {\n new MutationObserver(function(mutations) {\n for (var i = 0; i < mutations.length; i++) {\n var nodes = mutations[i].addedNodes;\n for (var j = 0; j < nodes.length; j++) {\n var n = nodes[j];\n if (n.nodeType !== 1) continue;\n if (n.nodeName === 'A') neutralizeOne(n);\n if (n.nodeName === 'FORM' && n.getAttribute('action')) { n.removeAttribute('action'); }\n if (n.querySelectorAll) {\n n.querySelectorAll('a[href]').forEach(neutralizeOne);\n n.querySelectorAll('form[action]').forEach(function(f){ f.removeAttribute('action'); });\n }\n }\n }\n }).observe(document.documentElement, { childList: true, subtree: true });\n }\n }\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', neutralizeAll);\n } else {\n neutralizeAll();\n }\n})();\n<\/script>\n<style>\n*, *::before, *::after { box-sizing: border-box; }\nbody { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: #fff; color: #111; }\n\n${"framer"===P?"/* Framer reset: Framer renders every element in absolute / native flex\n layout with no UA margins/padding. Mirror that here so the preview spacing\n matches what users will see in Framer after paste (avoids double-counting\n gap + UA margins on h1-h6, p, ul, ol, blockquote, figure, pre). */\nh1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure, pre, dl, dd { margin: 0; padding: 0; }\nul, ol { list-style: none; }\n":""}\n/* Framer Code Component slot overlay: visually marks slots that will be filled\n by a Code File in Framer post-paste. User-defined sizing/background/radius\n on the slot div still applies; we only add a dashed outline + a centered\n pill label so it stays readable regardless of slot background color. */\n[data-framer-component-slot] {\n position: relative;\n outline: 2px dashed rgba(15, 23, 42, 0.45);\n outline-offset: -2px;\n}\n[data-framer-component-slot]::after {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 14px;\n pointer-events: none;\n background: rgba(15, 23, 42, 0.92);\n color: rgba(255, 255, 255, 0.96);\n font-family: Inter, system-ui, -apple-system, sans-serif;\n font-size: 12px;\n font-weight: 500;\n letter-spacing: 0.02em;\n line-height: 1.2;\n border-radius: 999px;\n border: 1px solid rgba(255, 255, 255, 0.12);\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);\n max-width: calc(100% - 32px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n[data-framer-component-slot]:not([data-framer-component-label])::after {\n
574content: "â Composant : " attr(data-framer-component-slot);\n}\n[data-framer-component-slot][data-framer-component-label]::after {\n content: "â Composant : " attr(data-framer-component-label);\n}\n/* When the live React renderer successfully mounts into a slot, hide the\n pill / outline so the component itself is unobstructed. */\n[data-framer-component-slot].cvx-slot-filled {\n outline: none;\n}\n[data-framer-component-slot].cvx-slot-filled::after {\n content: none;\n display: none;\n}\n</style>\n${e}\n<style>${"framer"===P?function(e){let t=e.replace(/spring\(([^)]+)\)/gi,(e,t)=>{const r=t.split(",").map(e=>parseFloat(e.trim()));return`cubic-bezier(0.5, ${(1+(isNaN(r[0])?.2:r[0])).toFixed(3)}, 0.5, 1)`});return t=t.replace(/(\s)spring(?=[,;\s)])/gi,"$1cubic-bezier(0.5, 1.2, 0.5, 1)"),t}(w):w}</style>\n${w.includes("::-webkit-scrollbar")||w.includes("scrollbar-width")?"":"<style>\nhtml { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent; }\n*::-webkit-scrollbar { width: 5px; height: 5px; }\n*::-webkit-scrollbar-track { background: transparent; }\n*::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 99px; }\n*::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }\n</style>"}\n</head>\n<body>\n${y}\n${t}\n${S&&"framer"!==P?`<script>${S}<\/script>`:""}\n${"framer"===P?`<script>${px}<\/script>`:""}\n${"framer"===P?function(e){const t=Object.entries(e).filter(([,e])=>"string"==typeof e&&e.trim().length>0);if(0===t.length)return"";const r=t.map(([e,t])=>{const r=t.replace(/<\/script>/gi,"<\\/script>");return`<script type="text/x-tsx-source" data-cvx-slot="${e.replace(/[<>&"]/g,e=>({"<":"<",">":">","&":"&",'"':"""}[e]))}">${r}<\/script>`}).join("\n");return`\n<script type="importmap">\n{\n "imports": {\n "react": "https://esm.sh/[email protected]",\n "react-dom": "https://esm.sh/[email protected]",\n "react-dom/client": "https://esm.sh/[email protected]/client",\n "react/jsx-runtime": "https://esm.sh/[email protected]/jsx-runtime",\n "react/jsx-dev-runtime": "https://esm.sh/[email protected]/jsx-dev-runtime",\n "framer-motion": "https://esm.sh/[email protected][email protected]&external=react",\n "motion/react": "https://esm.sh/[email protected][email protected]&external=react",\n "framer": "${ux}"\n }\n}\n<\/script>\n${r}\n<script src="https://cdn.jsdelivr.net/npm/@babel/[email protected]/babel.min.js"><\/script>\n<script type="module">\n (async () => {\n try {\n // Wait for Babel (loaded as a classic <script> just above).\n await new Promise((resolve, reject) => {\n let n = 0;\n const tick = () => {\n if (window.Babel) return resolve();\n if (n++ > 200) return reject(new Error("Babel CDN load timeout"));\n setTimeout(tick, 50);\n };\n tick();\n });\n const reactNS = await import("react");\n const React = reactNS.default || reactNS;\n const { createRoot } = await import("react-dom/client");\n\n const tsxScripts = document.querySelectorAll('script[type="text/x-tsx-source"][data-cvx-slot]');\n let mounted = 0;\n for (const scriptEl of tsxScripts) {\n const slotId = scriptEl.getAttribute("data-cvx-slot");\n // A slot id can appear multiple times in the HTML (same Code Component\n // used in several places â e.g. NumberTicker à 4 stats, ScrollVelocity\n // à 2 lines). Mount the SAME compiled module into EVERY matching slot\n // so one TSX in the components map covers all occurrences. Matches\n // Framer's behavior where one Code File can be referenced N times.\n const slots = document.querySelectorAll('[data-framer-component-slot="' + slotId.replace(/"/g, '\\\\"') + '"]');\n if (slots.length === 0) {\n console.warn("[cvx] Composant: slot \\"" + slotId + "\\" introuvable dans le HTML. Ajoute <div data-framer-component-slot=\\"" + slotId + "\\">.");\n continue;\n }\n try {\n // Rewrite named imports from "framer" into a default-import +\n // destructure so the Proxy default export can intercept ANY name\n // (ESM named imports are statically resolved and would throw on\n // unknown names like useIsStaticRenderer / RenderTarget / withCSS).\n let rawSrc = scriptEl.textContent;\n rawSrc = rawSrc.replace(\n /import\\s*\\{([^}]+)\\}\\s*from\\s*["']framer["'];?/g,\n (_, names) => 'import __cvxFramer from "framer";\\nconst { ' + names + ' } = __cvxFramer;'\n );\n const transformed = window.Babel.transform(rawSrc, {\n presets: [\n ["typescript", { isTSX: true, allExtensions: true, allowDeclareFields: true }],\n ["react", { runtime: "automatic" }]\n ]\n }).code;\n const blob = new Blob([transformed], { type: "text/javascript" });\n const url = URL.createObjectURL(blob);\n const mod = await import(/* @vite-ignore */ url);\n const Component = mod.default;\n if (!Component) {\n console.warn("[cvx] Composant \\"" + slotId + "\\": aucun export default trouvé.");\n continue;\n }
574\n slots.forEach((slot) => {\n slot.classList.add("cvx-slot-filled");\n while (slot.firstChild) slot.removeChild(slot.firstChild);\n createRoot(slot).render(React.createElement(Component));\n mounted++;\n });\n } catch (e) {\n console.error("[cvx] Composant \\"" + slotId + "\\" render error:", e);\n }\n }\n } catch (e) {\n console.error("[cvx] Composant runtime error:", e);\n }\n })();\n<\/script>`}(_||{}):""}\n</body>\n</html>`},[y,w,S,Ce,Te,P,_]);l.useEffect(()=>{const e=C.current;if(!e)return;const t=()=>{try{const t=e.contentWindow;if(!t)return;t.addEventListener("unload",()=>{setTimeout(()=>{var t,r;try{const n=null==(r=null==(t=e.contentWindow)?void 0:t.location)?void 0:r.href;n&&"about:srcdoc"!==n&&(e.srcdoc=R)}catch{e.srcdoc=R}},0)})}catch{}};return e.addEventListener("load",t),t(),()=>e.removeEventListener("load",t)},[R]),l.useEffect(()=>{const e=C.current;if(!e)return;const t=()=>{const t=e.contentWindow,r=e.contentDocument||(null==t?void 0:t.document);if(r&&r.body)if(pe){if(r.getElementById("__inspector_script"))return;const e=r.createElement("script");e.id="__inspector_script",e.textContent="(function(){\nif(window.__inspectorDestroy)window.__inspectorDestroy();\nfunction init(){\nvar ov=document.createElement('div');ov.id='__insp_ov';\nov.style.cssText='position:fixed;pointer-events:none;z-index:999999;background:rgba(20,110,245,0.08);border:1.5px dashed rgba(20,110,245,0.5);display:none;transition:all 50ms ease;';\ndocument.body.appendChild(ov);\nvar sel_ov=document.createElement('div');sel_ov.id='__insp_sel';\nsel_ov.style.cssText='position:fixed;pointer-events:none;z-index:999998;background:rgba(20,110,245,0.15);border:2px solid rgba(20,110,245,0.7);display:none;';\ndocument.body.appendChild(sel_ov);\nvar lb=document.createElement('div');lb.id='__insp_lb';\nlb.style.cssText='position:fixed;pointer-events:none;z-index:1000000;background:#146EF5;color:#fff;font-size:10px;font-family:monospace;padding:2px 6px;border-radius:3px;white-space:nowrap;display:none;';\ndocument.body.appendChild(lb);\nvar bar=document.createElement('div');bar.id='__insp_bar';\nbar.style.cssText='position:fixed;pointer-events:auto;z-index:1000001;display:none;flex-direction:row;gap:4px;';\ndocument.body.appendChild(bar);\nvar btn=document.createElement('button');btn.id='__insp_btn';\nbtn.innerHTML='\\u21C4';\nbtn.title='Convertir la s\\u00E9lection';\nbtn.style.cssText='pointer-events:auto;background:#146EF5;color:#fff;font-size:13px;font-family:system-ui,-apple-system,sans-serif;font-weight:600;width:28px;height:28px;line-height:28px;text-align:center;padding:0;border-radius:6px;border:none;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,0.3);transition:background 0.15s ease;';\nbar.appendChild(btn);\nvar delBtn=document.createElement('button');delBtn.id='__insp_del';\ndelBtn.innerHTML='<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"3 6 5 6 21 6\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/><line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"/><line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"/></svg>';\ndelBtn.title='Supprimer l\\u2019\\u00E9l\\u00E9ment';\ndelBtn.style.cssText='pointer-events:auto;background:#e06c75;color:#fff;font-size:13px;font-family:system-ui,-apple-system,sans-serif;font-weight:600;width:28px;height:28px;display:flex;align-items:center;justify-content:center;padding:0;border-radius:6px;border:none;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,0.3);transition:background 0.15s ease;';\nbar.appendChild(delBtn);\ndocument.body.style.cursor='crosshair';\nvar hov=null;var selected=null;var btnState='idle';var pendingJson=null;\nvar ST={idle:{bg:'#146EF5',c:'#fff',t:'\\u21C4',pe:'auto',h:'#2b7ff9'},converting:{bg:'#555',c:'#fff',t:'\\u23F3',pe:'none',h:null},success:{bg:'#98c379',c:'#171717',t:'\\uD83D\\uDCCB',pe:'auto',h:'#7daf5f'},copied:{bg:'#98c379',c:'#171717',t:'\\u2714',pe:'none',h:null},error:{bg:'#e06c75',c:'#fff',t:'\\u26A0',pe:'auto',h:'#c85a63'}};\nfunction setBS(s){btnState=s;var o=ST[s]||ST.idle;btn.innerHTML=o.t;btn.style.background=o.bg;btn.style.color=o.c;btn.style.pointerEvents=o.pe;btn.style.cursor=o.pe==='none'?'default':'pointer';if(s==='idle'){btn.title='Convertir la s\\u00E9lection';}else if(s==='converting'){btn.title='Conversion en cours...';}else if(s==='success'){btn.title='Copier pour Webflow';}else if(s==='copied'){btn.title='Copi\\u00E9 !';}else if(s==='error'){btn.title='R\\u00E9essayer';}}\nbtn.addEventListener('mouseenter',function(){var o=ST[btnState];if(o&&o.h)btn.style.background=o.h;});\nbtn.addEventListener('mouseleave',function(){var o=ST[btnState];if(o)btn.style.background=o.bg;});\ndelBtn.addEventListener('mouseenter',function(){delBtn.style.background='#c85a63';});\ndelBtn.addEventListener('mouseleave',function(){delBtn.style.background='#e06c75';});\nvar onMsg=function(e){if(e.data&&e.data.__inspectorStatus){setBS(e.data.__inspectorStatus);if(e.data.json!=null)pendingJson=e.data.json;}if(e.data&&e.data.__inspectorNav==='ancestor'&&selected){var target=selected;for(var ni=0;ni<e.data.depth;ni++){if(target.parentElement)target=target.parentElement;}selectEl(target);}};\nwindow.addEventListener('message',onMsg);\nvar onMove=function(e){\nvar el=document.elementFromPoint(e.clientX,e.clientY);\nif(!el)return;\nif(el.id==='__insp_ov'||el.id==='__insp_sel'||el.id==='__insp_lb'||el.id==='__insp_btn'||el.id==='__insp_bar'||el.id==='__insp_del'||el.closest&&el.closest('#__insp_bar')){ov.style.display='none';lb.style.display='none';return;}\nhov=el;\nvar r=el.getBoundingClientRect();\nov.style.left=r.left+'px';ov.style.top=r.top+'px';\nov.style.width=r.width+'px';ov.style.height=r.height+'px';ov.style.display='block';\nvar t=el.tagName.toLowerCase();\nvar c=el.className&&typeof el.className==='string'?'.'+el.className.trim().split(/\\s+/).join('.'):'';\nlb.textContent=t+c;\nlb.style.left=r.left+'px';lb.style.top=Math.max(0,r.top-22)+'px';lb.style.display='block';\n};\ndocument.addEventListener('mousemove',onMove,true);\nvar isInsp=function(el){return el&&el.id&&el.id.indexOf('__insp')===0;};\nvar getPath=function(el){var p=[];var c=el;while(c&&c!==document.body){var pr=c.parentElement;
574if(!pr)break;var idx=0;for(var ci=0;ci<pr.children.length;ci++){if(pr.children[ci]===c){idx=ci;break;}}p.unshift(idx);c=pr;}return p;};\nvar selectEl=function(el){\nif(!el||isInsp(el))return;var tn=el.tagName.toLowerCase();if(tn==='html'||tn==='body')return;\nselected=el;setBS('idle');pendingJson=null;\nvar t=tn,id=el.id||'';\nvar cls=el.className&&typeof el.className==='string'?el.className.trim().split(/\\s+/).filter(Boolean):[];\nvar selStr=t;if(id)selStr+='#'+id;else if(cls.length)selStr+='.'+cls.join('.');\nvar cs=window.getComputedStyle(el);\nvar props=['display','position','width','height','paddingTop','paddingRight','paddingBottom','paddingLeft','marginTop','marginRight','marginBottom','marginLeft','color','backgroundColor','fontFamily','fontSize','fontWeight','lineHeight','borderRadius','flexDirection','justifyContent','alignItems','gap','gridTemplateColumns','overflow','opacity','zIndex','textAlign','maxWidth','minHeight'];\nvar st={};for(var i=0;i<props.length;i++){var v=cs[props[i]];if(v&&v!=='none'&&v!=='normal'&&v!=='auto'&&v!=='0px'&&v!=='rgba(0, 0, 0, 0)'&&v!=='start'&&v!=='stretch'&&v!=='visible'&&v!=='1'&&v!=='static')st[props[i]]=v;}\nvar path=[];var cur=el;while(cur&&cur.tagName){var ctn=cur.tagName.toLowerCase();if(ctn==='body'||ctn==='html')break;var pt=ctn;if(cur.id)pt+='#'+cur.id;else if(cur.className&&typeof cur.className==='string'){var fc=cur.className.trim().split(/\\s+/)[0];if(fc)pt+='.'+fc;}path.unshift(pt);cur=cur.parentElement;}\nwindow.parent.postMessage({__inspector:true,tag:t,id:id,classes:cls,selector:selStr,computedStyles:st,outerHTML:el.outerHTML,path:path},'*');\nvar r=el.getBoundingClientRect();\nsel_ov.style.left=r.left+'px';sel_ov.style.top=r.top+'px';\nsel_ov.style.width=r.width+'px';sel_ov.style.height=r.height+'px';sel_ov.style.display='block';\nbar.style.left=r.left+'px';bar.style.top=Math.max(0,r.top-34)+'px';bar.style.display='flex';\nel.scrollIntoView({block:'nearest',behavior:'smooth'});\n};\nvar onClick=function(e){\nif(e.target===btn||e.target===delBtn||e.target.closest&&e.target.closest('#__insp_bar'))return;\ne.preventDefault();e.stopPropagation();e.stopImmediatePropagation();\nif(!hov)return;selectEl(hov);\n};\ndocument.addEventListener('click',onClick,true);\nbtn.addEventListener('click',function(e){\ne.preventDefault();e.stopPropagation();\nif(btnState==='success'&&pendingJson){\nvar jsonStr=typeof pendingJson==='string'?pendingJson:JSON.stringify(pendingJson);\nvar handler=function(ev){ev.preventDefault();ev.clipboardData.setData('application/json',jsonStr);ev.clipboardData.setData('text/plain','');};\nvar temp=document.createElement('textarea');temp.style.cssText='position:fixed;left:-9999px;opacity:0';temp.value=' ';\ndocument.body.appendChild(temp);temp.select();\ndocument.addEventListener('copy',handler);document.execCommand('copy');document.removeEventListener('copy',handler);\ndocument.body.removeChild(temp);\nsetBS('copied');window.parent.postMessage({__inspectorCopied:true},'*');\nsetTimeout(function(){setBS('success');},2000);return;}\nif(btnState!=='idle'&&btnState!=='error')return;\nif(!selected)return;\nsetBS('converting');window.parent.postMessage({__inspectorConvert:true,outerHTML:selected.outerHTML},'*');\n});\ndelBtn.addEventListener('click',function(e){\ne.preventDefault();e.stopPropagation();\nif(!selected)return;\nwindow.parent.postMessage({__inspectorDelete:true,outerHTML:selected.outerHTML,path:getPath(selected)},'*');\nselected=null;sel_ov.style.display='none';bar.style.display='none';setBS('idle');pendingJson=null;\n});\nvar updateSelPos=function(){\nif(!selected)return;\nvar r=selected.getBoundingClientRect();\nsel_ov.style.left=r.left+'px';sel_ov.style.top=r.top+'px';\nsel_ov.style.width=r.width+'px';sel_ov.style.height=r.height+'px';\nbar.style.left=r.left+'px';bar.style.top=Math.max(0,r.top-34)+'px';\n};\nwindow.addEventListener('scroll',updateSelPos,true);\nwindow.addEventListener('resize',updateSelPos);\nvar onKey=function(e){\nif(e.key==='Escape'&&selected){selected=null;sel_ov.style.display='none';bar.style.display='none';setBS('idle');pendingJson=null;return;}\nif(e.key==='Escape'&&!selected){window.parent.postMessage({__inspectorExit:true},'*');return;}\nif(!selected)return;\nif(e.key==='ArrowUp'){e.preventDefault();var p=selected.parentElement;if(p&&!isInsp(p))selectEl(p);}\nif(e.key==='ArrowDown'){e.preventDefault();var ch=selected.children;for(var ci=0;ci<ch.length;ci++){if(!isInsp(ch[ci])){selectEl(ch[ci]);break;}}}\nif(e.key==='ArrowLeft'){e.preventDefault();var prs=selected.previousElementSibling;while(prs&&isInsp(prs))prs=prs.previousElementSibling;if(prs)selectEl(prs);}\nif(e.key==='ArrowRight'){e.preventDefault();var nxs=selected.nextElementSibling;while(nxs&&isInsp(nxs))nxs=nxs.nextElementSibling;if(nxs)selectEl(nxs);}\n};\ndocument.addEventListener('keydown',onKey);\nwindow.__inspectorDestroy=function(){\ndocument.removeEventListener('mousemove',onMove,true);\ndocument.removeEventListener('click',onClick,true);\ndocument.removeEventListener('keydown',onKey);\nwindow.removeEventListener('message',onMsg);\nwindow.removeEventListener('scroll',updateSelPos,true);\nwindow.removeEventListener('resize',updateSelPos);\n['__insp_ov','__insp_sel','__insp_lb','__insp_bar','__inspector_script'].forEach(function(id){var el=document.getElementById(id);if(el)el.remove();});\ndocument.body.style.cursor='';\ndelete window.__inspectorDestroy;\n};\n}\nif(document.body)init();else document.addEventListener('DOMContentLoaded',init);\n})();",r.body.appendChild(e)}else(null==t?void 0:t.__inspectorDestroy)&&t.__inspectorDestroy()};return t(),e.addEventListener("load",t),()=>e.removeEventListener("load",t)},[pe,R]),l.useEffect(()=>{async function e(e){var t,r,n,s,i;
574if(e.source===(null==(t=C.current)?void 0:t.contentWindow)){if(e.data&&e.data.__console&&B(t=>[...t.slice(-199),{id:++fx,level:e.data.level,args:e.data.args,ts:Date.now()}]),e.data&&e.data.__inspector){const t={tag:e.data.tag,id:e.data.id,classes:e.data.classes,selector:e.data.selector,computedStyles:e.data.computedStyles,outerHTML:e.data.outerHTML||"",path:e.data.path||[]};ge(t.path||[]),null==(r=Oe.current)||r.call(Oe,t)}if(e.data&&e.data.__inspectorConvert){const t=C.current,r=await(null==(n=xe.current)?void 0:n.call(xe,e.data.outerHTML));r?null==(s=null==t?void 0:t.contentWindow)||s.postMessage({__inspectorStatus:"success",json:r},"*"):(null==(i=null==t?void 0:t.contentWindow)||i.postMessage({__inspectorStatus:"error"},"*"),setTimeout(()=>{var e;null==(e=null==t?void 0:t.contentWindow)||e.postMessage({__inspectorStatus:"idle"},"*")},3e3))}if(e.data&&e.data.__inspectorExit&&(fe(!1),ge([])),e.data&&e.data.__inspectorDelete){const t=e.data.outerHTML,r=e.data.path,n=He.getState(),s=n.html;let i=function(e,t){let r=e.indexOf(t);if(-1!==r)return e.slice(0,r)+e.slice(r+t.length);if(/^<(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\b/i.test(t))for(const n of[t.replace(/>$/," />"),t.replace(/>$/,"/>")])if(r=e.indexOf(n),-1!==r)return e.slice(0,r)+e.slice(r+n.length);return e}(s,t);if(i===s&&r&&r.length>0&&(i=function(e,t){try{const r=(new DOMParser).parseFromString(e,"text/html");let n=r.body;for(const s of t){if(!(s>=0&&s<n.children.length))return e;n=n.children[s]}return n.remove(),r.body.innerHTML}catch{return e}}(s,r)),i!==s){const e=be.current;e.push({html:s,css:n.css}),e.length>30&&e.shift(),n.setHtml(i);const r=t.match(/class="([^"]*)"/g);if(r){const e=new Set;for(const n of r){n.slice(7,-1).split(/\s+/).filter(Boolean).forEach(t=>e.add(t))}const t=He.getState().html,s=[...e].filter(e=>!t.includes(e));if(s.length>0){let e=n.css;for(const t of s){const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`\\.${r}\\s*\\{[^}]*\\}\\s*`,"g");e=e.replace(n,"")}n.setCss(e)}}}n.setInspectedElementHtml(null)}}}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),l.useEffect(()=>(N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{M(Ne),B([])},300),()=>{N.current&&clearTimeout(N.current)}),[Ne]);const Ae="framer"===P?lx:ax;const ze=we&&null!=Qe?Qe:z,Ze="desktop"===E&&null==ze,Xe=l.useCallback(e=>{e.preventDefault(),ve.current=!0,je(!0),document.body.style.cursor="ew-resize",document.body.style.userSelect="none"},[]);l.useEffect(()=>{function e(e){if(!ve.current||!T.current)return;const t=T.current.getBoundingClientRect(),r=t.left+t.width/2,n=Math.abs(e.clientX-r),s=Math.max(200,Math.min(t.width,2*n));_e(Math.round(s))}function t(){if(ve.current&&(ve.current=!1,je(!1),document.body.style.cursor="",document.body.style.userSelect="",Z(Qe),null!=Qe)){const e="framer"===P;A(Qe>=(e?1200:1024)?"desktop":Qe>=(e?810:600)?"tablet":"mobile")}}return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[Qe]),l.useEffect(()=>{if(D||pe)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){if("Escape"===e.key){if(D)return void L(!1);pe&&(fe(!1),ge([]))}}},[D,pe]),l.useEffect(()=>{function e(e){var t,r,n;if((e.metaKey||e.ctrlKey)&&"z"===e.key&&!e.shiftKey){const s=null==(t=e.target)?void 0:t.tagName;if("INPUT"===s||"TEXTAREA"===s)return;if(null==(n=null==(r=e.target)?void 0:r.closest)?void 0:n.call(r,".cm-editor, .monaco-editor"))return;const i=be.current;if(0===i.length)return;e.preventDefault();const o=i.pop(),a=He.getState();a.setHtml(o.html),a.setCss(o.css),a.setInspectedElementHtml(null)}}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),l.useEffect(()=>{if(!Q||!x)return;let e=!1;return(async()=>{const{data:t}=await s.from("shared_previews").select("id").eq("page_id",Q).maybeSingle();if(!e)if(t){const e=ox.includes("?")?"":"/";le(`${ox}${e}${t.id}`),oe("done")}else le(null),oe("idle")})(),()=>{e=!0}},[Q,x]),l.useEffect(()=>()=>{ue.current&&clearTimeout(ue.current)},[]);const Me=!!y.trim(),De=!!w.trim(),Le=Me&&De,Ye=V.filter(e=>"error"===e.level).length,Ie=V.filter(e=>"warn"===e.level).length,qe=Ye>0?"errors":Ie>0?"warnings":"clean",Ve={clean:"bg-[#98c379]",warnings:"bg-[#e5c07b]",errors:"bg-[#e06c75]"}[qe],We={clean:"Aucune erreur",warnings:`${Ie} avertissement${Ie>1?"s":""}`,errors:`${Ye} erreur${Ye>1?"s":""}`}[qe],Be=c.jsxs("div",{className:"flex flex-col h-full bg-[#1a1a1a] overflow-hidden "+(D?"fixed inset-0 z-[80]":""),children:[c.jsxs("div",{className:"flex items-center justify-between px-3 h-8 min-h-8 border-b border-[#2e2e2e] bg-[#232323]",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[Ae.map(({id:e,label:t,icon:r})=>c.jsxs("button",{onClick:()=>function(e){A(e);const t=Ae.find(t=>
574t.id===e);Z(t.width),_e(null)}(e),className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-colors "+(E===e?"text-[#ededed] bg-white/10":"text-[#707070] hover:text-[#aaa] hover:bg-white/5"),title:t,children:[c.jsx(r,{size:12}),c.jsx("span",{className:"hidden xl:inline",children:t})]},e)),(h||u)&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-px h-3.5 bg-[#2e2e2e] mx-1"}),c.jsx("button",{onClick:i,disabled:!h,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors disabled:opacity-20 disabled:pointer-events-none",title:"Undo",children:c.jsx(Re,{size:12})}),c.jsx("button",{onClick:d,disabled:!u,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors disabled:opacity-20 disabled:pointer-events-none",title:"Redo",children:c.jsx(Pe,{size:12})})]}),null!=ze&&c.jsxs("span",{className:"text-[10px] text-[#888] ml-2 tabular-nums",children:[ze,"px"]})]}),c.jsxs("div",{className:"flex items-center gap-0.5",children:[c.jsxs("button",{onClick:()=>I(e=>!e),className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-colors "+(Y?"text-[#ededed] bg-white/10":"text-[#707070] hover:text-[#aaa] hover:bg-white/5"),title:`Console â ${We}`,children:[Le&&V.length>0&&c.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${Ve} ${"errors"===qe?"animate-pulse":""}`}),c.jsx(Ee,{size:12}),(Ye>0||Ie>0)&&c.jsx("span",{className:"text-[9px] font-bold "+(Ye>0?"text-[#e06c75]":"text-[#e5c07b]"),children:Ye>0?Ye:Ie})]}),c.jsx("button",{"data-tour":"inspector-btn",onClick:function(){const e=!pe;fe(e),e||(He.getState().setInspectedElementHtml(null),ge([]))},className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-colors outline-none "+(pe?"text-[#146EF5] bg-[#146EF5]/10":"text-[#707070] hover:text-[#aaa] hover:bg-white/5"),title:pe?m.converter.preview.inspectorDisable:m.converter.preview.inspectorEnable,children:c.jsx(de,{size:12})}),x?c.jsx("button",{onClick:()=>async function(){var e;if(Q){oe("loading");try{const{data:{session:t}}=await s.auth.getSession(),r=null==(e=null==t?void 0:t.user)?void 0:e.id,n=Ne,{data:i}=await s.from("shared_previews").select("id").eq("page_id",Q).maybeSingle();let o;if(i){const{data:e,error:t}=await s.from("shared_previews").update({html_content:n}).eq("id",i.id).select("id").single();if(t||!e)throw t||new Error("Update failed");o=e.id}else{const{data:e,error:t}=await s.from("shared_previews").insert({user_id:r,page_id:Q,html_content:n}).select("id").single();if(t||!e)throw t||new Error("Insert failed");o=e.id}const a=ox.includes("?")?"":"/",l=`${ox}${a}${o}`;le(l),await navigator.clipboard.writeText(l),oe("done"),he(!0),ue.current&&clearTimeout(ue.current),ue.current=setTimeout(()=>he(!1),2e3)}catch(t){oe("idle")}}}(),disabled:!Le||"loading"===ie,className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-colors outline-none disabled:opacity-30 "+(ce?"text-[#98c379] bg-[#98c379]/10":"done"===ie?"text-[#146EF5] bg-[#146EF5]/10":"text-[#707070] hover:text-[#aaa] hover:bg-white/5"),title:"done"===ie&&ce?m.converter.preview.linkCopied:m.converter.preview.sharePreview,children:"loading"===ie?c.jsx(g,{size:12,className:"animate-spin"}):ce?c.jsx(f,{size:12}):c.jsx(q,{size:12})}):c.jsxs("button",{onClick:()=>se(!0),className:"relative px-1.5 py-0.5 cursor-pointer hover:bg-white/5 rounded transition-colors",title:m.converter.preview.sharePreview,children:[c.jsx(q,{size:12,className:"text-[#707070]/40"}),c.jsx("span",{className:"absolute -top-1 -right-0.5 text-[7px] font-bold leading-none text-[#146EF5] bg-[#146EF5]/10 px-1 py-px rounded",children:"Pro"})]}),c.jsx("button",{onClick:function(){B([]),M(""),requestAnimationFrame(()=>M(Ne))},className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:m.converter.preview.refresh,children:c.jsx($e,{size:13})}),c.jsx("button",{onClick:function(){L(e=>!e)},className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:D?m.converter.preview.exitFullscreen:m.converter.preview.fullscreen,children:D?c.jsx(Se,{size:13}):c.jsx(ye,{size:13})})]})]}),ae&&c.jsxs("div",{className:"flex items-center gap-3 px-3 h-9 min-h-9 bg-[#0f0f0f] border-y border-black/60 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]",children:[c.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-[#ff5f57]"}),c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-[#febc2e]"}),c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-[#28c840]"})]}),c.jsx("div",{className:"flex-1 flex justify-center",children:c.jsxs("div",{className:"flex items-center gap-2 max-w-[460px] w-full pl-3 pr-1 py-1 bg-[#1c1c1c] border border-[#2a2a2a] rounded-md hover:border-[#3a3a3a] transition-colors",children:[c.jsx(X,{size:10,
574className:"text-[#98c379] flex-shrink-0"}),c.jsx("span",{className:"text-[11px] text-[#ededed] truncate font-mono flex-1",children:ae.replace(/^https?:\/\//,"")}),c.jsx("button",{onClick:function(){ae&&(navigator.clipboard.writeText(ae),he(!0),ue.current&&clearTimeout(ue.current),ue.current=setTimeout(()=>he(!1),2e3))},className:"flex items-center justify-center w-6 h-6 rounded transition-colors flex-shrink-0 "+(ce?"text-[#98c379]":"text-[#888] hover:text-[#ededed] hover:bg-white/5"),title:ce?m.converter.preview.copiedLabel:m.converter.preview.copyLabel,children:ce?c.jsx(f,{size:12}):c.jsx($,{size:12})}),c.jsx("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-6 h-6 rounded text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors flex-shrink-0",title:m.converter.preview.openNewTab,children:c.jsx(k,{size:12})})]})}),c.jsx("button",{onClick:()=>{le(null),oe("idle")},className:"p-1 rounded text-[#888] hover:text-[#ededed] hover:bg-white/5 transition-colors flex-shrink-0",title:"Fermer",children:c.jsx(p,{size:11})})]}),pe&&me.length>0&&c.jsxs("div",{className:"flex items-center gap-0 px-3 h-7 min-h-7 border-b border-[#2e2e2e] bg-[#1e1e1e] overflow-x-auto scrollbar-none",children:[c.jsx("span",{className:"text-[10px] text-[#555] mr-1.5 flex-shrink-0",children:"body"}),me.map((e,t)=>{const r=t===me.length-1;return c.jsxs("span",{className:"flex items-center flex-shrink-0",children:[c.jsx("span",{className:"text-[10px] text-[#444] mx-1",children:"âº"}),c.jsx("button",{onClick:()=>function(e){const t=me.length-1-e;if(t<=0)return;const r=C.current;(null==r?void 0:r.contentWindow)&&r.contentWindow.postMessage({__inspectorNav:"ancestor",depth:t},"*")}(t),className:"text-[10px] font-mono px-1 py-0.5 rounded transition-colors "+(r?"text-[#146EF5] bg-[#146EF5]/10":"text-[#888] hover:text-[#ededed] hover:bg-white/5 cursor-pointer"),disabled:r,title:r?"Element actuel":`Naviguer vers ${e} (ou â)`,children:e})]},t)}),c.jsx("span",{className:"text-[9px] text-[#444] ml-auto flex-shrink-0 pl-2",children:"\\u2190\\u2192 freres · \\u2191 parent · \\u2193 enfant"})]}),c.jsxs("div",{ref:T,className:"flex-1 overflow-hidden bg-[#0d0d0d] flex items-start justify-center relative",children:["idle"!==r&&c.jsx("div",{className:"absolute top-3 left-3 z-50 flex items-center gap-2 pl-2.5 pr-3 py-1.5 rounded-md border backdrop-blur-sm shadow-lg transition-colors duration-300 "+("syncing"===r?"bg-[#0f172a]/90 border-[#1e40af]/40":"bg-[#052e16]/90 border-[#15803d]/40"),children:"syncing"===r?c.jsxs(c.Fragment,{children:[c.jsx(g,{size:13,className:"text-blue-400 animate-spin"}),c.jsx("span",{className:"text-[11px] font-medium text-blue-300",children:(null==n?void 0:n.syncing)||m.converter.preview.syncInProgress})]}):c.jsxs(c.Fragment,{children:[c.jsx(f,{size:13,className:"text-emerald-400"}),c.jsx("span",{className:"text-[11px] font-medium text-emerald-300",children:(null==n?void 0:n.done)||m.converter.preview.syncDone})]})}),Le?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"h-full transition-[width] duration-200 ease-out relative",style:{width:Ze?"100%":`${ze??1024}px`,maxWidth:"100%",transition:we?"none":void 0},children:[c.jsx("iframe",{ref:C,srcDoc:R,sandbox:"allow-scripts allow-same-origin allow-popups",title:m.converter.preview.previewTitle,className:"w-full h-full border-0 bg-white",style:Ze?void 0:{borderLeft:"1px solid #2e2e2e",borderRight:"1px solid #2e2e2e"}}),!Ze&&c.jsxs(c.Fragment,{children:[c.jsx("div",{onMouseDown:Xe,className:"absolute top-0 -left-2 bottom-0 w-4 cursor-ew-resize z-10 group flex items-center justify-center",children:c.jsx("div",{className:"w-1 h-10 rounded-full bg-[#555] group-hover:bg-[#146EF5] transition-colors"})}),c.jsx("div",{onMouseDown:Xe,className:"absolute top-0 -right-2 bottom-0 w-4 cursor-ew-resize z-10 group flex items-center justify-center",children:c.jsx("div",{className:"w-1 h-10 rounded-full bg-[#555] group-hover:bg-[#146EF5] transition-colors"})})]})]}),we&&c.jsx("div",{className:"absolute inset-0 z-20"})]}):c.jsx("div",{className:"flex-1 h-full flex items-center justify-center",children:c.jsxs("div",{className:"text-center",children:[c.jsx(ke,{size:28,className:"text-[#888] mx-auto mb-2"}),c.jsx("p",{className:"text-xs text-[#888]",children:Me||De?De?m.converter.preview.waitingHtml:m.converter.preview.waitingCss:m.converter.preview.waitingHtmlCss})]})})]}),U&&c.jsx("div",{className:"fixed inset-0 z-[9999] cursor-ns-resize","aria-hidden":"true"}),Y&&c.jsxs("div",{className:"bg-[#1a1a1a] flex flex-col",style:{height:`${F}px`},children:[c.jsx("div",{role:"separator","aria-orientation":"horizontal","aria-label":"Resize console",onMouseDown:te,className:"group relative h-1.5 cursor-ns-resize border-t border-[#2e2e2e] flex items-center justify-center transition-colors "+(U?"bg-[#6366f1]/20":"hover:bg-[#6366f1]/15"),children:c.jsx("div",{className:"w-8 h-[2px] rounded-full transition-colors "+(U?"bg-[#a78bfa]":"bg-[#555] group-hover:bg-[#a
57478bfa]")})}),c.jsxs("div",{className:"flex items-center justify-between px-3 h-7 min-h-7 border-b border-[#2e2e2e] bg-[#1e1e1e]",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider",children:"Console"}),V.length>0&&c.jsx("span",{className:"text-[10px] text-[#888]",children:V.length})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsxs("button",{onClick:re,disabled:0===V.length,title:m.converter.preview.copyLabel,className:"inline-flex items-center gap-1 text-[10px] text-[#707070] hover:text-[#ededed] px-1.5 py-0.5 rounded hover:bg-white/5 transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[#707070]",children:[K?c.jsx(f,{size:11}):c.jsx($,{size:11}),K?m.converter.preview.copiedLabel:m.converter.preview.copyLabel]}),c.jsx("button",{onClick:()=>B([]),className:"text-[10px] text-[#707070] hover:text-[#ededed] px-1.5 py-0.5 rounded hover:bg-white/5 transition-colors",children:m.converter.preview.consoleClear}),c.jsx("button",{onClick:()=>I(!1),className:"p-0.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(W,{size:12})})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto font-mono text-[11px]",children:0===V.length?c.jsx("p",{className:"text-[#888] px-3 py-3 text-[11px]",children:"Aucun log"}):V.map(e=>{const t=cx[e.level]||cx.log,r=t.icon,n="error"===e.level||"warn"===e.level?function(e){for(const{pattern:t,message:r}of dx)if(t.test(e))return r;return null}(e.args):null;return c.jsxs("div",{className:`flex items-start gap-2 px-3 py-1.5 border-b border-[#1a1a1a] ${t.bg}`,children:[c.jsx(r,{size:12,className:`${t.color} flex-shrink-0 mt-0.5`}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("span",{className:`${t.color} break-all whitespace-pre-wrap ${n?"text-[10px] opacity-60":""}`,children:e.args}),n&&c.jsx("p",{className:"text-[11px] text-[#61afef] mt-0.5 leading-snug",children:n})]})]},e.id)})})]})]});return c.jsxs(c.Fragment,{children:[Be,ne&&c.jsx(Dr,{feature:"shared-preview",onClose:()=>se(!1)})]})}function gx(e,t){const r=e.indexOf("{");if(-1===r)return!1;const n=e.slice(0,r);for(const s of t)if(n.includes("."+s))return!0;return!1}function Ox(){return c.jsx("div",{className:"relative flex-shrink-0 w-9 h-11",children:c.jsxs("svg",{width:"36",height:"44",viewBox:"0 0 36 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M2 3C2 1.34 3.34 0 5 0H23L34 11V41C34 42.66 32.66 44 31 44H5C3.34 44 2 42.66 2 41V3Z",fill:"#131313"}),c.jsx("path",{d:"M23 0L34 11H25C23.9 11 23 10.1 23 9V0Z",fill:"#1f1f1f"}),c.jsx("path",{d:"M2 3C2 1.34 3.34 0 5 0H23L34 11V41C34 42.66 32.66 44 31 44H5C3.34 44 2 42.66 2 41V3Z",stroke:"#146EF5",strokeWidth:"1.2",strokeOpacity:"0.35",fill:"none"}),c.jsx("g",{transform:"translate(8, 19) scale(0.0185)",children:c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z",fill:"#146EF5"})})]})})}function xx({rawJson:e}){const{t:t}=o(),r=l.useMemo(()=>function(e){var t;try{const r=JSON.parse(e),n=(null==(t=null==r?void 0:r.payload)?void 0:t.styles)??[],s=[];for(const e of n)if("class"===e.type&&e.name){const t=!(!e.comb||""===e.comb);s.push({name:e.name,isCombo:t,comboOf:t?e.comb:void 0})}return s}catch{return[]}}(e),[e]),n=r.filter(e=>!e.isCombo),s=r.filter(e=>e.isCombo);return 0===r.length?c.jsx("div",{className:"px-3 pb-3 pt-0",children:c.jsx("p",{className:"text-[11px] text-[#707070] italic",children:t.converter.styles.noClassesFound})}):c.jsxs("div",{className:"border-t border-[#2e2e2e] px-3 py-2 max-h-48 overflow-y-auto space-y-2",children:[n.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider mb-1",children:["Classes (",n.length,")"]}),c.jsx("div",{className:"flex flex-wrap gap-1",children:n.map((e,t)=>c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[#171717] text-[10px] font-mono text-[#98c379]",children:[".",e.name]},t))})]}),s.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider mb-1",children:["Combos (",s.length,")"]}),c.jsx("div",{className:"flex flex-wrap gap-1",children:s.map((e,t)=>c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[#171717] text-[10px] font-mono text-[#c678dd]",title:e.comboOf?`Combo de: ${e.comboOf}`:void 0,children:[".",e.name]},t))})]})]})}function bx(){const{t:e}=o(),{stylesPanelOpen:t,setStylesPanelOpen:r,referenceFiles:n,addReferenceFile:s,removeReferenceFile:i,renameReferenceFile:a,getActiveProject:d,toggleProjectStyles:h}=He(),u=d(),{closing:f,close:m}=xr(()=>r(!1)),[g,O]=l.useState(""),[x,b]=l.useState(!1),[v,y]=l.useState(null),[w,S]=l.useState(null),[k,j]=l.useState(""),Q=l.useRef(null);function P(){w&&k.trim()&&a(w,k.trim()),S(null)}l.useEffect(()=>{w&&Q.current&&(Q.current.focus(),Q.current.select())},[w]);const $=l.useCallback(async t=>{t.preventDefault(),O(""),b(!0);const r=t.clipboardData,n=Array.from(r.types),i=["application/json","text/plain","text"],o=[...i.filter(e=>n.includes(e)),...n.filter(e=>!i.includes(e))];let a="";for(const e of o){const t=r.getData(e);if(!t)continue;const n=t.trimStart();if(n.startsWith("{")||n.startsWith("[")){a=t;break}}if(!a)return O(e.converter.styles.noJsonDetected.replace("{types}",n.join(", ")||"none")),void b(!1);await s(a)||O(e.converter.styles.invalidJson),b(!1)},[s]);function _(t){const r=Math.floor((Date.now()-t)/1e3);return r<60?e.converter.styles.justNow:r<3600?e.converter.styles.minutesAgo.replace("{count}",String(Math.floor(r/60))):r<86400?e.converter.styles.hoursAgo.replace("{count}",String(Math.floor(r/3600))):e.converter.styles.daysAgo.replace("{count}",String(Math.floor(r/86400)))}return t?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 "+(f?"animate-fade-out"
574:"animate-fade-in"),onClick:m}),c.jsxs("div",{className:"fixed top-0 right-0 bottom-0 w-[420px] bg-[#171717] border-l border-[#2e2e2e] z-50 flex flex-col "+(f?"animate-slide-out-right":"animate-slide-in-right"),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#2e2e2e]",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.styles.title}),c.jsx("p",{className:"text-xs text-[#707070] mt-0.5",children:u?u.name:e.converter.styles.existingClasses})]}),c.jsx("button",{onClick:m,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:16})})]}),u&&c.jsx("div",{className:"px-4 pt-3",children:c.jsxs("button",{onClick:()=>h(u.id),className:"flex items-center justify-between w-full px-3 py-2 rounded-lg bg-[#232323] border border-[#2e2e2e] text-xs text-[#aaa] hover:text-[#ededed] transition-colors",children:[c.jsx("span",{children:e.converter.styles.autoSave}),c.jsx("span",{className:"w-7 h-4 rounded-full relative transition-colors "+(u.stylesEnabled?"bg-[#146EF5]":"bg-[#333]"),children:c.jsx("span",{className:"absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform "+(u.stylesEnabled?"left-3.5":"left-0.5")})})]})}),c.jsxs("div",{className:"px-4 pt-4",children:[c.jsx("div",{onPaste:$,tabIndex:0,className:"border-2 border-dashed border-[#146EF5]/30 bg-[#146EF5]/5 rounded-lg px-4 py-6 text-center cursor-text hover:border-[#146EF5]/50 hover:bg-[#146EF5]/10 focus:border-[#146EF5] focus:bg-[#146EF5]/10 focus:outline-none transition-colors",children:x?c.jsx("p",{className:"text-xs text-[#ededed]",children:e.converter.styles.adding}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-xs font-semibold text-[#ededed]",children:e.converter.styles.pasteWebflowElement}),c.jsx("p",{className:"text-[11px] text-[#707070] mt-1",children:e.converter.styles.pasteInstructions})]})}),g&&c.jsx("p",{className:"text-xs text-[#e06c75] mt-2",children:g})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-2",children:[0===n.length&&c.jsx("p",{className:"text-xs text-[#707070] text-center py-8",children:e.converter.styles.noStylesLoaded}),n.map(t=>{const r=v===t.id;return c.jsxs("div",{className:"bg-[#232323] border border-[#2e2e2e] rounded-lg animate-slide-down group",children:[c.jsxs("div",{className:"flex items-center gap-3 px-3 py-3",children:[c.jsx(Ox,{}),c.jsxs("div",{className:"flex-1 min-w-0",children:[w===t.id?c.jsx("input",{ref:Q,value:k,onChange:e=>j(e.target.value),onBlur:P,onKeyDown:e=>{"Enter"===e.key&&P(),"Escape"===e.key&&S(null)},className:"w-full text-xs font-semibold text-[#ededed] font-mono bg-[#171717] border border-[#146EF5] rounded px-1.5 py-0.5 outline-none"}):c.jsxs("div",{className:"flex items-center gap-1.5 group/name cursor-default",onDoubleClick:()=>{return e=t.id,r=t.name,S(e),void j(r);var e,r},children:[c.jsx("span",{className:"text-xs font-semibold text-[#ededed] truncate font-mono",title:t.name,children:t.name}),c.jsx(je,{size:10,className:"flex-shrink-0 text-[#707070] opacity-0 group-hover/name:opacity-100 transition-opacity"})]}),c.jsxs("div",{className:"text-[11px] text-[#707070] mt-0.5",children:[t.classCount-t.comboCount," classes",t.comboCount>0&&c.jsxs(c.Fragment,{children:[" · ",t.comboCount," combos"]})]}),c.jsx("div",{className:"text-[10px] text-[#666] mt-0.5",children:_(t.addedAt)})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:()=>y(r?null:t.id),className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:e.converter.styles.viewClasses,children:c.jsx(W,{size:14,className:"transition-transform "+(r?"rotate-180":"")})}),c.jsx("button",{onClick:()=>i(t.id),className:"p-1 rounded text-[#666] hover:text-[#e06c75] hover:bg-white/5 transition-colors",title:e.common.actions.delete,children:c.jsx(Ze,{size:14})})]})]}),r&&c.jsx(xx,{rawJson:t.rawJson})]},t.id)})]})]})]}):null}function vx(){const{t:e}=o(),{historyPanelOpen:t,setHistoryPanelOpen:r,history:n,removeHistoryEntry:s,renameHistoryEntry:i,restoreHistoryEntry:a,getActiveProject:d}=He(),h=d(),{closing:u,close:m}=xr(()=>r(!1)),[g,O]=l.useState(null),[x,b]=l.useState(null),[v,y]=l.useState(""),[w,S]=l.useState(null),k=l.useRef(null);function j(){x&&v.trim()&&i(x,v.trim()),b(null)}function Q(t){const r=new Date(t),n=(new Date).getTime()-r.getTime(),s=Math.floor(n/1e3);return s<60?e.converter.styles.justNow:s<3600?e.converter.styles.minutesAgo.replace("{count}",String(Math.floor(s/60))):s<86400?e.converter.styles.hoursAgo.replace("{count}
574",String(Math.floor(s/3600))):r.toLocaleString("fr-FR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}return l.useEffect(()=>{x&&k.current&&(k.current.focus(),k.current.select())},[x]),t?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 "+(u?"animate-fade-out":"animate-fade-in"),onClick:m}),c.jsxs("div",{className:"fixed top-0 right-0 bottom-0 w-[420px] bg-[#171717] border-l border-[#2e2e2e] z-50 flex flex-col "+(u?"animate-slide-out-right":"animate-slide-in-right"),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#2e2e2e]",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.historyPanel.title}),c.jsxs("p",{className:"text-xs text-[#707070] mt-0.5",children:[h?`${h.name} · `:"",n.length," ",1!==n.length?e.converter.historyPanel.conversionsPlural:e.converter.historyPanel.conversions]})]}),c.jsx("button",{onClick:m,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:16})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-2",children:[0===n.length&&c.jsx("p",{className:"text-xs text-[#707070] text-center py-8",children:e.converter.historyPanel.noHistory}),n.map(t=>c.jsxs("div",{className:"bg-[#232323] border border-[#2e2e2e] rounded-lg px-3 py-3 flex items-center gap-3 group",children:[c.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-[#98c379]/10 flex items-center justify-center",children:c.jsx("span",{className:"text-[#98c379] font-mono font-bold text-[10px]",children:"{}"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[x===t.id?c.jsx("input",{ref:k,value:v,onChange:e=>y(e.target.value),onBlur:j,onKeyDown:e=>{"Enter"===e.key&&j(),"Escape"===e.key&&b(null)},className:"w-full text-xs font-semibold text-[#ededed] font-mono bg-[#171717] border border-[#146EF5] rounded px-1.5 py-0.5 outline-none"}):c.jsxs("div",{className:"flex items-center gap-1.5 group/name cursor-default",onDoubleClick:()=>{return e=t.id,r=t.name,b(e),void y(r);var e,r},children:[c.jsx("span",{className:"text-xs font-semibold text-[#ededed] truncate font-mono",title:t.name,children:t.name}),c.jsx(je,{size:10,className:"flex-shrink-0 text-[#707070] opacity-0 group-hover/name:opacity-100 transition-opacity"})]}),c.jsx("div",{className:"text-[10px] text-[#666] mt-0.5",children:Q(t.date)})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[t.sourceHtml&&c.jsx("button",{onClick:()=>{a(t.id),m()},className:"p-1 rounded text-[#707070] hover:text-[#2b7ff9] hover:bg-white/5 transition-colors",title:e.converter.historyPanel.restoreInEditor,children:c.jsx($e,{size:14})}),c.jsx("button",{onClick:()=>function(e,t){const r=JSON.stringify(e),n=e=>{var t,n;e.preventDefault(),null==(t=e.clipboardData)||t.setData("application/json",r),null==(n=e.clipboardData)||n.setData("text/plain","")},s=document.createElement("textarea");s.style.position="fixed",s.style.left="-9999px",s.style.opacity="0",s.value=" ",document.body.appendChild(s),s.select(),document.addEventListener("copy",n),document.execCommand("copy"),document.removeEventListener("copy",n),document.body.removeChild(s),O(t),setTimeout(()=>O(null),2e3)}(t.json,t.id),className:"p-1 rounded text-[#707070] hover:text-[#98c379] hover:bg-white/5 transition-colors",title:e.converter.historyPanel.copyForWebflow,children:g===t.id?c.jsx(f,{size:14,className:"text-[#98c379]"}):c.jsx($,{size:14})}),c.jsx("button",{onClick:()=>S({id:t.id,name:t.name}),className:"p-1 rounded text-[#666] hover:text-[#e06c75] hover:bg-white/5 transition-colors",title:e.common.actions.delete,children:c.jsx(Ze,{size:14})})]})]},t.id))]})]}),w&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] animate-fade-in",onClick:()=>S(null)}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:()=>S(null),children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.historyPanel.deleteConversionTitle})}),c.jsx("div",{className:"px-5 py-4",children:c.jsxs("p",{className:"text-xs text-[#707070] leading-relaxed",children:[e.converter.historyPanel.deleteConversionMessage.split('"{name}"')[0],c.jsxs("span",{className:"text-[#ededed] font-medium",children:['"',w.name,'"']}),e.converter.historyPanel.deleteConversionMessage.split('"{name}"')[1]]})}),c.jsxs("div",{className:"flex gap-2 px-5 py-3 border-t border-[#2e2e2e]",children:[c.jsx("button",{onClick:()=>S(null),className:"flex-1 py-2 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:e.common.actions.cancel}),c.jsx("button",{onClick:()=>{s(w.id),S(null)},className:"flex-1 py-2 rounded-lg bg-[#e06c75]/15 border border-[#e06c75]/20 text-xs font-medium text-[#e06c75] hover:bg-[#e06c75]/25 transition-colors cursor-pointer",children:e.common.actions.delete})]})]})})]})]}):null}function yx(){const{t:e}=o(),{scriptsPanelOpen:t,setScriptsPanelOpen:r,externalScripts:n,addExternalScript:s,removeExternalScript:i,toggleExter
574nalScript:a,renameExternalScript:d,syncDetectedScripts:h}=He(),{closing:u,close:m}=xr(()=>r(!1)),[g,O]=l.useState(""),[x,b]=l.useState(""),[v,y]=l.useState("js"),[w,S]=l.useState(!1),[k,j]=l.useState(null),[P,_]=l.useState(""),[C,T]=l.useState(!1),N=l.useRef(null),E=l.useRef(null),A=l.useRef(null);function z(){const e=g.trim();if(!e)return;const t=e.endsWith(".css")?"css":v,r=x.trim()||void 0;s(e,t,r),O(""),b(""),S(!1)}function Z(){k&&P.trim()&&d(k,P.trim()),j(null)}if(l.useEffect(()=>{w&&N.current&&N.current.focus()},[w]),l.useEffect(()=>{k&&E.current&&(E.current.focus(),E.current.select())},[k]),l.useEffect(()=>()=>{A.current&&clearTimeout(A.current)},[]),!t)return null;const R=n.filter(e=>"css"===e.type),X=n.filter(e=>"js"===e.type),M=n.filter(e=>e.enabled).length;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 "+(u?"animate-fade-out":"animate-fade-in"),onClick:m}),c.jsxs("div",{className:"fixed top-0 right-0 bottom-0 w-[420px] bg-[#171717] border-l border-[#2e2e2e] z-50 flex flex-col "+(u?"animate-slide-out-right":"animate-slide-in-right"),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#2e2e2e]",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-sm font-semibold text-[#ededed]",children:e.converter.scripts.title}),c.jsx("p",{className:"text-xs text-[#707070] mt-0.5",children:e.converter.scripts.subtitle})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:h,className:"p-1.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",title:e.converter.scripts.redetectLibraries,children:c.jsx(Q,{size:14})}),c.jsx("button",{onClick:m,className:"p-1 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:c.jsx(p,{size:16})})]})]}),c.jsxs("div",{className:"px-4 pt-4 space-y-3",children:[w?c.jsxs("div",{className:"space-y-2",children:[c.jsx("input",{value:x,onChange:e=>b(e.target.value),placeholder:e.converter.scripts.namePlaceholder,className:"w-full text-xs text-[#ededed] bg-[#141414] border border-[#2e2e2e] rounded-lg px-3 py-2 outline-none focus:border-[#146EF5] placeholder-[#555]"}),c.jsx("input",{ref:N,value:g,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&z(),"Escape"===e.key&&(S(!1),O(""),b(""))},placeholder:"https://cdn.jsdelivr.net/npm/...",className:"w-full text-xs text-[#ededed] bg-[#141414] border border-[#2e2e2e] rounded-lg px-3 py-2 outline-none focus:border-[#146EF5] font-mono placeholder-[#555]"}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>
574y("js"),className:"px-2 py-0.5 rounded text-[10px] font-semibold transition-colors "+("js"===v?"bg-[#e5c07b]/20 text-[#e5c07b]":"text-[#888] hover:text-[#888]"),children:"JS"}),c.jsx("button",{onClick:()=>y("css"),className:"px-2 py-0.5 rounded text-[10px] font-semibold transition-colors "+("css"===v?"bg-[#c678dd]/20 text-[#c678dd]":"text-[#888] hover:text-[#888]"),children:"CSS"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>{S(!1),O(""),b("")},className:"px-3 py-1 rounded-lg text-xs text-[#707070] hover:text-[#ededed] hover:bg-white/5 transition-colors",children:e.common.actions.cancel}),c.jsx("button",{onClick:z,disabled:!g.trim(),className:"px-3 py-1 rounded-lg bg-[#146EF5] text-white text-xs font-semibold hover:bg-[#2b7ff9] transition-colors disabled:opacity-30 disabled:cursor-not-allowed",children:e.converter.scripts.add})]})]})]}):c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("button",{onClick:()=>S(!0),className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-[#2e2e2e] text-xs text-[#707070] hover:text-[#ededed] hover:border-[#146EF5]/40 hover:bg-[#146EF5]/5 transition-colors",children:[c.jsx(Qe,{size:14}),e.converter.scripts.addCdnScript]}),M>0&&c.jsxs("button",{onClick:function(){const e=n.filter(e=>e.enabled);if(0===e.length)return;const t=e.filter(e=>"css"===e.type).map(e=>`<link rel="stylesheet" href="${e.url}">`),r=e.filter(e=>"js"===e.type).map(e=>`<script src="${e.url}"><\/script>`),s=[t.length>0?"\x3c!-- HEAD --\x3e\n"+t.join("\n"):"",r.length>0?"\x3c!-- BODY (before </body>) --\x3e\n"+r.join("\n"):""].filter(Boolean).join("\n\n");navigator.clipboard.writeText(s).then(()=>{T(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>T(!1),2e3)})},className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-semibold transition-all "+(C?"bg-[#98c379]/15 text-[#98c379] border border-[#98c379]/20":"bg-[#232323] border border-[#2e2e2e] text-[#ededed] hover:bg-[#2a2a2a]"),title:e.converter.scripts.copyTagsForWebflow,children:[C?c.jsx(f,{size:13}):c.jsx($,{size:13}),C?e.converter.scripts.copiedTag:e.converter.scripts.copyAll]})]}),c.jsx("div",{className:"bg-[#232323] border border-[#2e2e2e] rounded-lg px-3 py-2.5",children:c.jsx("p",{className:"text-[11px] text-[#707070] leading-relaxed",children:e.converter.scripts.autoDetectInfo})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4",children:[0===n.length&&c.jsx("p",{className:"text-xs text-[#707070] text-center py-8",children:e.converter.scripts.noScripts}),R.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider mb-2",children:["Stylesheets (",R.length,")"]}),c.jsx("div",{className:"space-y-1.5",children:R.map(e=>c.jsx(wx,{script:e,renamingId:k,renameValue:P,renameInputRef:E,onToggle:()=>a(e.id),onRemove:()=>i(e.id),onStartRename:()=>{j(e.id),_(e.label)},onRenameChange:_,onCommitRename:Z,onCancelRename:()=>j(null)},e.id))})]}),X.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider mb-2",children:["Scripts (",X.length,")"]}),c.jsx("div",{className:"space-y-1.5",children:X.map(e=>c.jsx(wx,{script:e,renamingId:k,renameValue:P,renameInputRef:E,onToggle:()=>a(e.id),onRemove:()=>i(e.id),onStartRename:()=>{j(e.id),_(e.label)},onRenameChange:_,onCommitRename:Z,onCancelRename:()=>j(null)},e.id))})]})]})]})]})}function wx({script:e,renamingId:t,renameValue:r,renameInputRef:n,onToggle:s,onRemove:i,onStartRename:a,onRenameChange:d,onCommitRename:h,onCancelRename:u}){const{t:p}=o(),m=t===e.id,g="css"===e.type?"text-[#c678dd]":"text-[#e5c07b]",O="css"===e.type?"bg-[#c678dd]/15":"bg-[#e5c07b]/15",[x,b]=l.useState(!1),v=l.useRef(null);return l.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),c.jsx("div",{className:"bg-[#232323] border border-[#2e2e2e] rounded-lg px-3 py-2.5 group",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:s,className:"flex-shrink-0",title:e.enabled?p.converter.scripts.disable:p.converter.scripts.enable,children:e.enabled?c.jsx(ze,{size:18,className:"text-[#98c379]"}):c.jsx(Ae,{size:18,className:"text-[#888]"})}),c.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-bold uppercase ${O} ${g} flex-shrink-0`,children:e.type}),c.jsx("div",{className:"flex-1 min-w-0",children:m?c.jsx("input",{ref:n,value:r,onChange:e=>d(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&u()},className:"w-full text-[11px] text-[#ededed] bg-[#171717] border border-[#146EF5] rounded px-1.5 py-0.5 outline-none"}):c.jsxs("div",{onDoubleClick:a,title:p.converter.scripts.doubleClickRename,children:[c.jsx("p",{className:"text-[11px] font-medium truncate "+(e.enabled?"text-[#ededed]":"text-[#888]"),children:e.label}),c.jsx("p",{className:"text-[10px] font-mono truncate select-all cursor-text "+(e.enabled,"text-[#888]"),children:e.url})]})}),c.jsx("button",{onClick:function(){const t="css"===e.type?`<link rel="stylesheet" href="${e.url}">`:`<script src="${e.url}"><\/script>`;navigator.clipboard.writeText(t).then(()=>{b(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>b(!1),2e3)})},className:"p-1 rounded flex-shrink-0 transition-colors "+(x?"text-[#98c379]":"text-[#666] hover:text-[#ededed] hover:bg-white/5 opacity-0 group-hover:opacity-100"),title:x?p.converter.scripts.copiedTag:p.converter.scripts.copyTag,children:x?c.jsx(f,{size:13}):c.jsx($,{size:13})}),c.jsx("button",{onClick:i,className:"p-1 rounded text-[#666] hover:text-[#e06c75] hover:bg-white/5 transition-colors opacity-0 group-hover:opacity-100 flex-shrink-0",title:p.common.actions.delete,children:c.jsx(Ze,{size:13})})]})})}const Sx=[{id:"html",label:"HTML",icon:c.jsx("span",{className:"text-[#e06c75] font-mono font-bold text-[10px]",children:"</>"}),color:"#e06c75"},{id:"css",label:"CSS",icon:c.jsx("span",{className:"text-[#c678dd] font-mono font-bold text-[10px]",children:"#"}),color:"#c678dd"}],kx={id:"js",label:"JS",icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 256 256",className:"flex-shrink-0",children:[c.jsx("rect",{width:"256",height:"256",rx:"28",fill:"#F7DF1E"}),c.jsx("path",{d:"M67.3 213.9l19.1-11.6c3.7 6.5 7 12 15.1 12 7.7 0 12.6-3 12.6-14.8V120h23.5v79.8c0 24.4-14.3 35.5-35.2 35.5-18.9 0-29.8-9.8-35.1-21.4zm83.2-2.5l19.1-11.1c5 8.3 11.6 14.4 23.2 14.4 9.7 0 16-4.9 16-11.6 0-8-6.4-10.9-17.2-15.6l-5.9-2.5c-17.1-7.3-28.4-16.4-28.4-35.7 0-17.8 13.5-31.3 34.7-31.3 15.1 0 25.9 5.2 33.7 18.9l-18.5 11.9c-4.1-7.3-8.5-10.2-15.3-10.2-7 0-11.4 4.4-11.4 10.2 0 7.1 4.4 10 14.7 14.4l5.9 2.5c20.1 8.6 31.4 17.4 31.4 37.2 0 21.3-16.7 33-39.2 33-22 0-36.2-10.5-43.1-24.2z",fill:"#000"})]}),color:"#e5c07b"},jx=e=>c.jsx(le,{size:e,className:"flex-shrink-0 text-[#61DAFB]",strokeWidth:2}),Qx=jx(12),Px=[...Sx,kx];function $x(){var e;const{locale:t,t:r}=o(),{html:n,css:i,js:a,setHtml:d,setCss:h,setJs:m,splitRatio:g,setSplitRatio:O,loadProjects:x,referenceFiles:b,activeEditorTab:v,setActiveEditorTab:y,externalScripts:w,setScriptsPanelOpen:S,pages:k,activePageId:j,activeProjectId:Q,setActivePage:P,createPage:_,renamePage:C,reorderPages:T,deletePage:N,getActivePage:E,getActiveProject:A,createProject:Z,targetTool:R,components:X,activeComponentSlot:M,setComponent:D,deleteComponent:L,setActiveComponentSlot:Y}=He(),I=A(),q=(null==I?void 0:I.isDemo)??!1;u((null==I?void 0:I.name)?`Convertex - ${I.name}`:"Convertex - HTML/CSS to Webflow");const[V,B]=l.useState("idle"),[F,G]=l.useState({syncing:"",done:""}),H=l.useRef(null),[K,J]=l.useState(!1),ee=l.useRef(null),[te,re]=l.useState(!1),[ne,se]=l.useState(""),ie=l.useRef(null),[oe,le]=l.useState(!1),[ce,de]=l.useState(!1),[he,ue]=l.useState(""),[pe,me]=l.useState(null),[ge,Oe]=l.useState(""),xe=l.useRef(null),be=l.useRef(null),ve=l.useRef(null),[ye,we]=l.useState(null),[Se,ke]=l.useState(null),[Pe,$e]=l.useState(null),_e=l.useRef(null),Ce=l.useRef(null),Te=l.useRef(!1),[Ne,Ee]=l.useState(!1),[Ae,ze]=l.useState(!1),[Re,Xe]=l.useState(null),Me=l.useRef(0),De=l.useRef(null),Le=l.useRef(null),Ye=l.useRef(null),Ie={html:De,css:Le,js:Ye},qe=l.useMemo(()=>{var e;const t=new Set;for(const r of b)try{const n=JSON.parse(r.rawJson),s=(null==(e=null==n?void 0:n.payload)?void 0:e.styles)??[];for(const e of s)"class"===e.type&&e.name&&t.add(e.name)}catch{}return t},[b]);l.useEffect(()=>{x()},[]),l.useEffect(()=>{const e=Ce.current;if(!e)return;const t=new ResizeObserver(([e])=>{const t=e.contentRect.width;ze(t<480)});return t.observe(e),()=>t.disconnect()},[]),l.useEffect(()=>{const e=["Eh non ! Le code reste de ce côté de l'écran ð","Bien tenté, mais non ð«£","Tu cherches quelque chose ? Convertex est là pour ça ð","Pas touche aux DevTools ! ð","Nope. Utilise Convertex pour générer ton code ð"];function t(t){t.preventDefault();const r=e[Me.current%e.length];Me.current++,Xe(r)}function r(e){"F12"!==e.key?(e.ctrlKey||e.metaKey)&&e.shiftKey&&["I","i","J","j","C","c"].includes(e.ke
574y)?e.preventDefault():!e.ctrlKey&&!e.metaKey||"u"!==e.key&&"U"!==e.key||e.preventDefault():e.preventDefault()}return document.addEventListener("contextmenu",t),document.addEventListener("keydown",r),()=>{document.removeEventListener("contextmenu",t),document.removeEventListener("keydown",r)}},[]),l.useEffect(()=>{if(!Re)return;const e=window.setTimeout(()=>Xe(null),2500);return()=>window.clearTimeout(e)},[Re]),l.useEffect(()=>{if(oe)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){xe.current&&!xe.current.contains(e.target)&&(le(!1),de(!1),me(null))}},[oe]),l.useEffect(()=>{ce&&be.current&&be.current.focus()},[ce]),l.useEffect(()=>{pe&&ve.current&&(ve.current.focus(),ve.current.select())},[pe]);const Ve=l.useRef(null);l.useEffect(()=>{if("idle"!==V)return;return He.getState().activePageId?(Ve.current&&clearTimeout(Ve.current),Ve.current=setTimeout(()=>{He.getState().saveCurrentPage()},2e3),()=>{Ve.current&&clearTimeout(Ve.current)}):void 0},[n,i,a,V]),l.useEffect(()=>{const e=setInterval(()=>{if("visible"!==document.visibilityState)return;if("idle"!==V)return;const e=He.getState();e.activePageId&&e.saveCurrentPage()},3e4);return()=>clearInterval(e)},[V]),l.useEffect(()=>{const e=()=>{"idle"===V&&He.getState().saveCurrentPage()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[V]),l.useEffect(()=>{if(!Q||q)return;let e=(new Date).toISOString(),t=!1;const n=setInterval(async()=>{if(!t){t=!0;try{const{data:t}=await s.from("mcp_sync").select("action, page_name, page_id, created_at").eq("project_id",Q).gt("created_at",e).order("created_at",{ascending:!0}).limit(1);if(t&&t.length>0){const{action:n,page_name:s,page_id:i}=t[0];e=t[0].created_at;const o=s||"Page",a=n.includes(":")?n.split(":")[1]:null;if("sync:reference_styles"===n){const e=He.getState();await e.loadReferenceFiles(),await e.loadProjects(),H.current&&clearTimeout(H.current);const t=`Synchronisation avec ${o}â¦`;G({syncing:t,done:`Classes synchronisées depuis ${o}`}),B("synced"),H.current=setTimeout(()=>B("idle"),3e3)}else if(n.startsWith("start")){H.current&&clearTimeout(H.current);const e="create"===a?r.converter.mcpSync.creating.replace("{name}",o):"delete"===a?r.converter.mcpSync.deleting.replace("{name}",o):r.converter.mcpSync.updating.replace("{name}",o),t="create"===a?r.converter.mcpSync.created.replace("{name}",o):"delete"===a?r.converter.mcpSync.deleted.replace("{name}",o):r.converter.mcpSync.updated.replace("{name}",o);G({syncing:e,done:t}),B("syncing")}else if(n.startsWith("done")){await He.getState().loadPages(),i&&"delete"!==a&&await He.getState().setActivePage(i);const e="create"===a?r.converter.mcpSync.created.replace("{name}",o):"delete"===a?r.converter.mcpSync.deleted.replace("{name}",o):r.converter.mcpSync.updated.replace("{name}",o);G(t=>({...t,done:e})),B("synced"),H.current=setTimeout(()=>B("idle"),3e3)}}}catch{}t=!1}},500);return()=>{clearInterval(n),H.current&&clearTimeout(H.current)}},[Q]),l.useEffect(()=>{if(!Q||q)return;const e=async()=>{const e=He.getState();await e.loadReferenceFiles(),await e.loadProjects()},t=s.channel(`webflow-sync-${Q}`).on("postgres_changes",{event:"*",schema:"public",table:"reference_styles",filter:`project_id=eq.${Q}`},e).on("postgres_changes",{event:"UPDATE",schema:"public",table:"projects",filter:`id=eq.${Q}`},e).subscribe();return()=>{s.removeChannel(t)}},[Q,q]);const We=l.useRef([]),Be=l.useRef([]),Fe=l.useRef({html:n,css:i,js:a}),Ge=l.useRef(null),Ue=l.useRef(!1),[Ke,Je]=l.useState(0);l.useEffect(()=>{if(!Ue.current)return Ge.current&&clearTimeout(Ge.current),Ge.current=setTimeout(()=>{const e=Fe.current;n===e.html&&i===e.css&&a===e.js||(We.current.push(e),We.current.length>50&&We.current.shift(),Be.current=[],Fe.current={html:n,css:i,js:a},Je(e=>e+1))},1e3),()=>{Ge.current&&clearTimeout(Ge.current)};Ue.current=!1},[n,i,a]);const et=l.useCallback(()=>{if(0===We.current.length)return;const e={html:n,css:i,js:a};Be.current.push(e);const t=We.current.pop();Fe.current=t,Ue.current=!0,d(t.html),h(t.css),m(t.js),Je(e=>e+1)},[n,i,a,d,h,m]),tt=l.useCallback(()=>
574{if(0===Be.current.length)return;const e={html:n,css:i,js:a};We.current.push(e);const t=Be.current.pop();Fe.current=t,Ue.current=!0,d(t.html),h(t.css),m(t.js),Je(e=>e+1)},[n,i,a,d,h,m]);l.useEffect(()=>{function e(e){var t,r,n;if((e.metaKey||e.ctrlKey)&&"z"===e.key){if(null==(r=null==(t=e.target)?void 0:t.closest)?void 0:r.call(t,".cm-editor"))return;const s=null==(n=e.target)?void 0:n.tagName;if("INPUT"===s||"TEXTAREA"===s)return;e.preventDefault(),e.stopPropagation(),e.shiftKey?tt():et()}}return document.addEventListener("keydown",e,{capture:!0}),()=>document.removeEventListener("keydown",e,{capture:!0})},[et,tt]),l.useEffect(()=>{function e(e){var t;(e.metaKey||e.ctrlKey)&&"f"===e.key&&(e.preventDefault(),te?null==(t=ie.current)||t.focus():(re(!0),setTimeout(()=>{var e;return null==(e=ie.current)?void 0:e.focus()},0)))}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[te]);const rt=l.useCallback(e=>{e.preventDefault(),Te.current=!0,Ee(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);l.useEffect(()=>{function e(e){if(!Te.current||!_e.current)return;const t=_e.current.getBoundingClientRect(),r=(e.clientX-t.left)/t.width*100;O(Math.max(20,Math.min(80,r)))}function t(){Te.current&&(Te.current=!1,Ee(!1),document.body.style.cursor="",document.body.style.userSelect="")}return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[O]);const nt="framer"===R,st=l.useMemo(()=>{if(!nt)return[];const e=[],t=new Set,r=/data-framer-component-slot=["']([^"']+)["'][^>]*?(?:data-framer-component-label=["']([^"']+)["'])?/g;let s;for(;null!==(s=r.exec(n));){const r=s[1];t.has(r)||(t.add(r),e.push({id:r,label:s[2]||r}))}return e},[n,nt]),it=l.useMemo(()=>{const e=st.map(e=>e.id),t=new Set(e);for(const r of Object.keys(X||{}))t.has(r)||e.push(r);return e},[st,X]);l.useEffect(()=>{nt&&(0!==it.length?M&&it.includes(M)||Y(it[0]):null!==M&&Y(null))},[nt,it,M,Y]);const ot=M&&X[M]||"",at=nt?{label:r.converter.page.componentTabLabel,icon:Qx,color:"#61DAFB"}:kx,lt={html:n,css:i,js:a},ct={html:d,css:h,js:m},dt={html:"html",css:"css",js:nt?"jsx":"javascript"},ht={html:r.converter.page.placeholderHtml,css:r.converter.page.placeholderCss,js:nt?r.converter.page.placeholderReact:r.converter.page.placeholderJs};function ut(e){var t;se(e),null==(t=Ie[v].current)||t.highlightSearch(e)}function pt(){var e,t,r;re(!1),se(""),null==(e=De.current)||e.clearSearch(),null==(t=Le.current)||t.clearSearch(),null==(r=Ye.current)||r.clearSearch()}return c.jsxs("div",{translate:"no",className:"h-screen flex flex-col bg-[#111111] overflow-hidden",children:[Re&&c.jsx("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-[#1f1f1f] text-[#ededed] px-5 py-2.5 rounded-[10px] text-[13px] font-semibold border border-[#2e2e2e] shadow-[0_8px_32px_rgba(0,0,0,0.4)] z-[99999] pointer-events-none animate-fade-in",role:"status",children:Re}),c.jsx(rr,{}),c.jsx("div",{className:"flex lg:hidden fixed inset-0 z-[100] bg-[#111111] items-center justify-center p-6",children:c.jsx("p",{className:"text-sm text-[#707070] text-center",children:r.converter.page.desktopOnly})}),c.jsx(yn,{}),q&&c.jsxs("div",{className:"flex items-center justify-center gap-2 px-3 py-1.5 bg-[#6366f1]/15 border-b border-[#6366f1]/25 text-[12px] text-[#a78bfa]",children:[c.jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"flex-shrink-0",children:c.jsx("path",{d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 1 1 7.072 0l-.548.547A3.374 3.374 0 0 0 14 18.469V19a2 2 0 1 1-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),c.jsx("span",{children:r.converter.page.demoBanner}),c.jsxs("div",{className:"flex items-center gap-1.5 ml-2",children:[k.map(e=>{const t=e.id===j;return c.jsx("button",{onClick:()=>P(e.id),className:"px-2.5 py-0.5 rounded-full border text-[11px] transition-colors "+(t?"border-[#a
57478bfa] text-[#ededed] bg-[#6366f1]/20":"border-[#6366f1]/40 text-[#a78bfa] hover:border-[#a78bfa] hover:text-[#ededed]"),children:e.name},e.id)}),c.jsx("span",{className:"w-px h-4 bg-[#6366f1]/30 mx-1","aria-hidden":"true"}),c.jsxs("button",{onClick:()=>Z("fr"===t?"Mon projet":"My project","webflow"),className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full border border-[#a78bfa] text-[#ededed] bg-[#6366f1]/30 hover:bg-[#6366f1]/45 text-[11px] font-medium transition-colors cursor-pointer",children:[c.jsx(Qe,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),r.converter.page.startNewProject]})]})]}),c.jsxs("div",{ref:_e,className:"flex-1 flex min-h-0",children:[c.jsxs("div",{ref:Ce,style:{width:`${g}%`},className:"min-w-[200px] flex flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between h-8 min-h-8 bg-[#1a1a1a] border-b border-[#2e2e2e]",children:[c.jsxs("div",{className:"flex items-center h-full",children:[c.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 h-8 border-r border-[#2e2e2e]",children:["framer"===R?c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 1080 1080",fill:"none",className:"flex-shrink-0 rounded-full",children:[c.jsx("rect",{width:"1080",height:"1080",rx:"540",fill:"#0099FF"}),c.jsx("path",{d:"M 340 270 L 740 270 L 740 470 L 540 470 Z M 340 470 L 540 470 L 740 670 L 340 670 Z M 340 670 L 540 670 L 540 870 Z",fill:"white"})]}):c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 1080 1080",fill:"none",className:"flex-shrink-0 rounded-full",children:[c.jsx("rect",{width:"1080",height:"1080",rx:"540",fill:"#146EF5"}),c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M902.062 348.75L687.217 768.75H485.417L575.329 594.684H571.295C497.118 690.976 386.444 754.365 228.75 768.75V597.093C228.75 597.093 329.63 591.134 388.935 528.784H228.75V348.753H408.781V496.826L412.822 496.809L486.389 348.753H622.541V495.887L626.582 495.881L702.909 348.75H902.062Z",fill:"white"})]}),"framer"===R&&c.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-semibold uppercase tracking-wider bg-white/5 text-[#aaa] ring-1 ring-white/10 flex-shrink-0",title:"L'export Framer est encore en beta â certaines propriétés peuvent nécessiter un ajustement manuel après paste.",children:"Beta"})]}),c.jsxs("div",{className:"relative",ref:xe,children:[c.jsxs("button",{onClick:()=>le(e=>!e),className:"flex items-center gap-1.5 px-2.5 h-8 text-[11px] font-medium text-[#ededed] hover:bg-white/5 transition-colors border-r border-[#2e2e2e] max-w-[150px]",children:[c.jsx(z,{size:12,className:"text-[#707070] flex-shrink-0"}),c.jsx("span",{className:"truncate",children:(null==(e=E())?void 0:e.name)??"Page 1"}),c.jsx(W,{size:10,className:"text-[#707070] flex-shrink-0 transition-transform "+(oe?"rotate-180":"")})]}),oe&&c.jsxs("div",{className:"absolute top-full left-0 mt-1 w-56 bg-[#1f1f1f] border border-[#2e2e2e] rounded-lg shadow-2xl z-50 overflow-hidden animate-dropdown-in",children:[c.jsx("div",{className:"px-3 py-2 border-b border-[#2e2e2e]",children:c.jsx("p",{className:"text-[10px] font-semibold text-[#707070] uppercase tracking-wider",children:r.converter.page.pagesLabel})}),c.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:k.map((e,t)=>c.jsxs("div",{draggable:!q&&pe!==e.id,onDragStart:()=>we(t),onDragOver:e=>{e.preventDefault(),ke(t)},onDragEnd:()=>{null!==ye&&null!==Se&&ye!==Se&&T(ye,Se),we(null),ke(null)},className:`flex items-center gap-2 px-3 py-2 text-xs cursor-pointer transition-colors group/page ${e.id===j?"bg-[#146EF5]/10 text-[#ededed]":"text-[#aaa] hover:bg-white/5 hover:text-[#ededed]"}${Se===t&&null!==ye&&ye!==t?" border-t border-[#146EF5]":""}`,onClick:()=>{pe!==e.id&&(P(e.id),le(!1))},children:[c.jsxs("span",{className:"w-3 flex-shrink-0 relative flex items-center justify-center",children:[c.jsx(fe,{size:12,className:"text-[#707070] absolute opacity-0 group-hover/page:opacity-100 cursor-grab active:cursor-grabbing transition-opacity"}),e.id===j?c.jsx(f,{size:12,className:"text-[#98c379] group-hover/page:opacity-0 transition-opacity"}):c.jsx("span",{className:"w-3"})]}),pe===e.id?c.jsx("input",{ref:ve,value:ge,onChange:e=>Oe(e.target.value),onBlur:()=>{const e=ge.trim().slice(0,30);e&&pe&&C(pe,e),me(null)},onKeyDown:e=>{if("Enter"===e.key){const e=ge.trim().slice(0,30);e&&pe&&C(pe,e),me(null)}"Escape"===e.key&&me(null)},onClick:e=>e.stopPropagation(),maxLength:30,className:"flex-1 text-xs text-[#ededed] bg-[#171717] border border-[#146EF5] rounded px-1.5 py-0.5 outline-none"}):c.jsx("span",{className:"flex-1 truncate",children:e.name}),!q&&c.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/page:opacity-100 transition-opacity",children:[c.jsx("button",{onClick:t=>{t.stopPropagation(),me(e.id),Oe(e.name)}
574,className:"p-0.5 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/10",title:r.common.actions.rename,children:c.jsx(je,{size:10})}),k.length>1&&c.jsx("button",{onClick:t=>{t.stopPropagation(),$e({id:e.id,name:e.name})},className:"p-0.5 rounded text-[#707070] hover:text-[#e06c75] hover:bg-white/10",title:r.common.actions.delete,children:c.jsx(Ze,{size:10})})]})]},e.id))}),!q&&c.jsx("div",{className:"border-t border-[#2e2e2e] px-3 py-2",children:ce?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{ref:be,value:he,onChange:e=>ue(e.target.value),onKeyDown:e=>{if("Enter"===e.key){const e=he.trim().slice(0,30);e&&(_(e),ue(""),de(!1),le(!1))}"Escape"===e.key&&(de(!1),ue(""))},maxLength:30,placeholder:r.converter.page.pageNamePlaceholder,className:"flex-1 text-xs text-[#ededed] bg-[#171717] border border-[#2e2e2e] rounded px-2 py-1 outline-none focus:border-[#146EF5]"}),c.jsx("button",{onClick:()=>{const e=he.trim().slice(0,30);e&&(_(e),ue(""),de(!1),le(!1))},className:"px-2 py-1 rounded bg-[#146EF5] text-white text-[10px] font-semibold hover:bg-[#2b7ff9] transition-colors",children:"OK"})]}):c.jsxs("button",{onClick:()=>de(!0),className:"flex items-center gap-1.5 text-xs text-[#707070] hover:text-[#ededed] transition-colors w-full",children:[c.jsx(Qe,{size:12}),r.converter.page.newPage]})})]})]}),Sx.map(e=>{const t=v===e.id,r=!!lt[e.id].trim();return c.jsxs("button",{"data-tour":"css"===e.id?"editor-css-tab":void 0,onClick:()=>y(e.id),className:`\n flex items-center gap-1.5 px-3 h-full text-xs font-medium\n border-b-2 transition-colors relative\n ${t?"text-[#ededed] bg-[#232323]":"text-[#707070] hover:text-[#aaa] hover:bg-[#1e1e1e] border-transparent"}\n `,style:t?{borderBottomColor:e.color}:void 0,children:[e.icon,!Ae&&e.label,!t&&r&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:e.color}})]},e.id)}),c.jsxs("div",{className:"flex items-center h-6 my-auto ml-1 rounded-md border border-[#2e2e2e] bg-[#151515] overflow-hidden",children:[c.jsxs("button",{onClick:()=>
574y("js"),className:`\n flex items-center gap-1.5 px-3 h-full text-xs font-medium\n transition-colors relative\n ${"js"===v?"text-[#ededed] bg-[#232323]":"text-[#707070] hover:text-[#aaa] hover:bg-[#1e1e1e]"}\n `,children:[at.icon,!Ae&&at.label,"js"!==v&&(nt?Object.keys(X).length>0:!!a.trim())&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:at.color}})]}),!nt&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-px h-3.5 bg-[#2e2e2e]"}),c.jsxs("button",{onClick:()=>{S(!0)},className:"flex items-center gap-1 px-2 h-full text-xs text-[#707070] hover:text-[#98c379] hover:bg-[#1e1e1e] transition-colors",title:r.converter.page.scriptsCdn,children:[c.jsx(ae,{size:12}),!Ae&&c.jsx("span",{className:"text-[11px]",children:"CDN"}),w.length>0&&c.jsx("span",{className:"min-w-[16px] h-[16px] flex items-center justify-center rounded-full bg-[#98c379]/20 text-[#98c379] text-[9px] font-bold",children:w.length})]})]})]})]}),c.jsxs("div",{className:"flex items-center h-full",children:[c.jsx("button",{onClick:()=>{var e;null==(e=Ie[v].current)||e.clear()},disabled:!lt[v].trim(),className:"flex items-center gap-1 px-2 h-full text-[11px] text-[#707070] hover:text-[#e06c75] hover:bg-white/5 transition-colors disabled:opacity-20",title:r.converter.codePanel.clearTab.replace("{tab}",v.toUpperCase()),children:c.jsx(Ze,{size:12})}),c.jsx("button",{onClick:()=>{const e=lt[v];e.trim()&&(navigator.clipboard.writeText(e),J(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>J(!1),1500))},disabled:!lt[v].trim(),className:"flex items-center gap-1 px-2 h-full text-[11px] transition-colors disabled:opacity-20 "+(K?"text-[#98c379]":"text-[#707070] hover:text-[#ededed] hover:bg-white/5"),title:r.converter.codePanel.copyTab.replace("{tab}",v.toUpperCase()),children:K?c.jsx(f,{size:12}):c.jsx($,{size:12})}),c.jsx("button",{onClick:function(){te?pt():(re(!0),setTimeout(()=>{var e;return null==(e=ie.current)?void 0:e.focus()},0))},className:"flex items-center gap-1 px-2 h-full text-[11px] transition-colors "+(te?"text-[#146EF5] bg-[#146EF5]/10":"text-[#707070] hover:text-[#ededed] hover:bg-white/5"),title:r.converter.page.search,children:c.jsx(U,{size:12})})]})]}),c.jsxs("div",{"data-tour":"editor-html",className:"flex-1 min-h-0 relative",children:[te&&c.jsxs("div",{className:"absolute top-2 right-3 z-20 flex items-center bg-[#232323] border border-[#2e2e2e] rounded-md shadow-xl overflow-hidden",children:[c.jsx(U,{size:12,className:"text-[#707070] ml-2 flex-shrink-0"}
574),c.jsx("input",{ref:ie,autoFocus:!0,type:"text",value:ne,onChange:e=>ut(e.target.value),onKeyDown:e=>{"Escape"===e.key&&pt()},placeholder:"html"===v?r.converter.page.searchInHtml:"css"===v?r.converter.page.searchInCss:r.converter.page.searchInJs,className:"bg-transparent text-[12px] text-[#ededed] placeholder-[#555] outline-none w-[170px] px-2 py-1.5"}),ne&&c.jsx("button",{onClick:()=>ut(""),className:"p-1 text-[#707070] hover:text-[#ededed] transition-colors",children:c.jsx(p,{size:12})}),c.jsx("button",{onClick:pt,className:"p-1 mr-0.5 text-[#707070] hover:text-[#ededed] transition-colors",title:r.common.actions.close,children:c.jsx(p,{size:14})})]}),Px.map(e=>{const t=nt&&"js"===e.id;return c.jsx("div",{className:"absolute inset-0 "+(v===e.id?"":"invisible"),children:t?c.jsx(_x,{slots:st,orphanSlots:it.filter(e=>!st.some(t=>t.id===e)),activeSlot:M,onSelectSlot:Y,tsx:ot,onChange:e=>M&&D(M,e),onDeleteSlot:e=>L(e),placeholder:ht.js,panelRef:Ie.js,readOnly:q}):c.jsx(ix,{ref:Ie[e.id],language:dt[e.id],value:lt[e.id],onChange:ct[e.id],placeholder:ht[e.id],label:e.label,icon:e.icon,hideHeader:!0,readOnly:q,referenceClassNames:"js"===e.id?void 0:qe})},e.id)})]})]}),c.jsx("div",{onMouseDown:rt,className:"w-1 bg-[#2e2e2e] hover:bg-[#146EF5] active:bg-[#146EF5] cursor-col-resize transition-colors flex-shrink-0 relative group",children:c.jsx("div",{className:"absolute inset-y-0 left-0 -right-3"})}),c.jsxs("div",{"data-tour":"preview-panel",className:"flex-1 min-w-[200px] relative",children:[c.jsx(mx,{onInspectElement:function(e){var t,r;const n=e.classes[0];n&&(null==(t=Le.current)||t.highlightSearch("."+n),null==(r=De.current)||r.highlightSearch(n)),He.getState().setInspectedElementHtml(e.outerHTML||null)},onPartialConvert:async function(e){if(!e)return null;const t=He.getState(),r=t.getActiveProject();if(null==r?void 0:r.isDemo)return null;try{const r=function(e){const t=new Set,r=/class\s*=\s*["']([^"']*)["']/gi;let n;for(;null!==(n=r.exec(e));)n[1].trim().split(/\s+/).filter(Boolean).forEach(e=>t.add(e));return t}(e),n=function(e,t){if(0===t.size)return e;const r=[];let n=0,s="",i=0;const o=[];for(let a=0;a<e.length;a++)"{"===e[a]?(0===n&&(i=0===s.length?a:a-s.length),n++):"}"===e[a]?(n--,0===n&&(o.push(e.slice(i,a+1).trim()),s="",i=a+1)):0===n&&(s+=e[a]);for(const a of o)if(a.startsWith(":root")||a.startsWith("@font-face")||a.startsWith("@keyframes")||a.startsWith("@-webkit-keyframes"))r.push(a);else{if(a.startsWith("@media")){const e=a.indexOf("{");if(-1===e)continue;const n=a.slice(0,e+1),s=a.slice(e+1,a.lastIndexOf("}")),i=[];let o=0,l=0;for(let r=0;r<s.length;r++)if("{"===s[r])0===o&&(l=r),o++;else if("}"===s[r]&&(o--,0===o)){let e=l-1;for(;e>=0&&"}"!==s[e]&&";"!==s[e];)e--;e++;const n=s.slice(e,r+1).trim();gx(n,t)&&i.push(n)}i.length>0&&r.push(n+"\n "+i.join("\n ")+"\n}");continue}gx(a,t)&&r.push(a)}return r.join("\n\n")}(i,r),s=t.getMergedReferenceStyles(),o=await ir({html:e,css:n,referenceStyles:s,projectId:t.activeProjectId??void 0,pageId:t.activePageId??void 0});return null!=o.conversionsThisMonth&&t.setConversionsThisMonth(o.conversionsThisMonth),o.json}catch{return null}},mcpSyncState:V,mcpSyncMessage:F,onUndo:et,onRedo:tt,canUndo:Ke>=0&&We.current.length>0,canRedo:Ke>=0&&Be.current.length>0}),Ne&&c.jsx("div",{className:"absolute inset-0 z-10"})]})]}),c.jsx(bx,{}),c.jsx(vx,{}),c.jsx(yx,{}),c.jsx(mn,{}),Pe&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 bg-black/60 z-[70] animate-fade-in",onClick:()=>$e(null)}),c.jsx("div",{className:"fixed inset-0 z-[71] flex items-center justify-center p-4",onClick:()=>$e(null),children:c.jsxs("div",{className:"bg-[#1c1c1c] border border-[#2e2e2e] rounded-xl shadow-2xl w-full max-w-sm animate-modal-in",onClick:e=>e.stopPropagation(),children:[c.jsx("div",{className:"px-5 py-4 border-b border-[#2e2e2e]",children:c.jsx("h3",{className:"text-sm font-semibold text-[#ededed]",children:r.converter.page.deletePageTitle})}),c.jsx("div",{className:"px-5 py-4",children:c.jsxs("p",{className:"text-xs text-[#707070] leading-relaxed",children:[r.converter.page.deletePageMessage.split('"{name}"')[0],c.jsxs("span",{className:"text-[#ededed] font-medium",children:['"',Pe.name,'"']}),r.converter.page.deletePageMessage.split('"{name}"')[1]]})}),c.jsxs("div",{className:"flex gap-2 px-5 py-3 border-t border-[#2e2e2e]",children:[c.jsx("button",{onClick:()=>$e(null),className:"flex-1 py-2 rounded-lg border border-[#2e2e2e] text-xs text-[#ededed] hover:bg-white/5 transition-colors cursor-pointer",children:r.common.actions.cancel}),c.jsx("button",{onClick:()=>{N(Pe.id),$e(null)},className:"flex-1 py-2 rounded-lg bg-[#e06c75]/15 border border-[#e06c75]/20 text-xs font-medium text-[#e06c75] hover:bg-[#e06c75]/25 transition-colors cursor-pointer",children:r.common.actions.delete})]})]})})]})]})}function _x({slots:e,orphanSlots:t,activeSlot:r,onSelectSlot:n,tsx:s,onChange:i,onDeleteSlot:o,placeholder:a,panelRef:d,readOnly:h}){const[u,m]=l.useState(!1),g=l.useRef(null),x=l.useCallback(()=>{s&&navigator.clipboard.writeText(s).then(()=>{m(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>m(!1),1500)})},[s]),[b,v]=l.useState(null);l.useEffect(()=>{if(!b)return;const e=setTimeout(()=>v(null),2500);return()=>clearTimeout(e)},[b]);const y=l.useCallback(e=>{b===e?(o(e),v(null)):v(e)},[b,o]),w=l.useRef(null),[S,k]=l.useState({left:!1,right:!1}),j=l.useCallback(()=>{const e=w.current;e&&k({left:e.scrollLeft>1,right:e.scrollLeft+e.clientWidth<e.scrollWidth-1})},[]);l.useEffect(()=>{const e=w.current;if(!e)return;j(),e.addEventListener("scroll",j,{passive:!0});const t=new ResizeObserver(j);return t.observe(e),()=>{e.removeEventListener("scroll",j),t.disconnect()}},[j,e.length,t.length]);const Q=l.useCallback(e=>{const t=w.current;t&&t.scrollBy({left:e*Math.max(120,.7*t.clientWidth),behavior:"smooth"})},[]);return e.length>0||t.length>0?c.jsxs("div",{className:"absolute inset-0 flex flex-col min-h-0",children:[c.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 h-7 min-h-7 px-2 bg-[#151515] border-b border-[#2e2e2e]",children:[S.left&&c.jsx("button",{onClick:()=>Q(-1),title:"Défiler vers la gauche",className:"flex-shrink-0 flex items-center justify-center w-5 h-6 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5",children:c.jsx(te,{size:14})}),c.jsxs("div",{ref:w,className:"flex items-center gap-1 flex-1 min-w-0 overflow-x-auto scrollbar-hide",children:[e.map(e=>{const t=e.id===r,s=b===e.id;return c.jsxs("div",{className:"group/tab flex items-center h-6 rounded transition-colors "+(t?"bg-[#0099FF]/15 text-[#0099FF]":"text-[#707070] hover:text-[#ededed] hover:bg-white/5"),children:[c.jsxs("button",{onClick:()=>n(e.id),title:e.id,className:"flex items-center gap-1.5 pl-2 pr-1.5 h-full text-[10px] whitespace-nowrap",children:[jx(10),c.jsx("span",{children:e.label})]}),c.jsx("button",{onClick:t=>{t.stopPropagation(),y(e.id)},title:s?"Cliquer à nouveau pour confirmer la suppression":`Supprimer le composant "${e.label}" (le slot HTML reste en place)`,className:"flex items-center justify-center w-4 h-4 mr-1 rounded transition-colors "+(s?"text-[#e06c75] bg-[#e06c75]/20":t?"text-current/60 hover:text-[#e06c75] hover:bg-[#e06c75]/15":"opacity-0 group-hover/tab:opacity-100 text-[#707070] hover:text-[#e06c75] hover:bg-[#e06c75]/15"),children:c.jsx(p,{size:10,strokeWidth:2.5})})]},e.id)}),t.map(e=>{const t=e===r,s=b===e;return c.jsxs("div",{className:"group/tab flex items-center h-6 rounded transition-colors "+(t?"bg-[#e5c07b]/15 text-[#e5c07b]":"text-[#e5c07b]/70 hover:text-[#e5c07b] hover:bg-[#e5c07b]/10"),
574children:[c.jsxs("button",{onClick:()=>n(e),title:`Slot "${e}" absent du HTML â TSX orphelin. Supprime-le ou rajoute le slot dans le HTML.`,className:"flex items-center gap-1.5 pl-2 pr-1.5 h-full text-[10px] whitespace-nowrap",children:[c.jsx(O,{size:10}),c.jsx("span",{children:e})]}),c.jsx("button",{onClick:t=>{t.stopPropagation(),y(e)},title:s?"Cliquer à nouveau pour confirmer":`Supprimer le composant orphelin "${e}"`,className:"flex items-center justify-center w-4 h-4 mr-1 rounded transition-colors "+(s?"text-[#e06c75] bg-[#e06c75]/20":"text-current/60 hover:text-[#e06c75] hover:bg-[#e06c75]/15"),children:c.jsx(p,{size:10,strokeWidth:2.5})})]},e)})]}),S.right&&c.jsx("button",{onClick:()=>Q(1),title:"Défiler vers la droite",className:"flex-shrink-0 flex items-center justify-center w-5 h-6 rounded text-[#707070] hover:text-[#ededed] hover:bg-white/5",children:c.jsx(re,{size:14})}),r&&s&&c.jsxs("button",{onClick:x,title:"Copier le TSX du composant actif",className:"flex-shrink-0 ml-1 flex items-center gap-1 px-2 h-6 rounded text-[10px] font-medium transition-colors "+(u?"bg-[#98c379]/15 text-[#98c379]":"text-[#707070] hover:text-[#ededed] hover:bg-white/5"),children:[u?c.jsx(f,{size:10,strokeWidth:2.5}):c.jsx($,{size:10,strokeWidth:2}),c.jsx("span",{children:u?"Copié":"Copier"})]})]}),c.jsx("div",{className:"flex-1 relative min-h-0",children:c.jsx("div",{className:"absolute inset-0",children:c.jsx(ix,{ref:d,language:"jsx",value:s,onChange:i,placeholder:a,label:"Composant",icon:null,hideHeader:!0,readOnly:h||!r})})})]}):c.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center px-8 text-[#707070] text-xs leading-relaxed",children:[c.jsx("p",{className:"text-[#ededed] text-sm font-medium mb-2",children:"Aucun slot composant détecté"}),c.jsx("p",{children:"Ajoute un slot dans le HTML pour créer un composant :"}),c.jsx("code",{className:"mt-3 px-3 py-2 rounded-md bg-[#1a1a1a] border border-[#2e2e2e] text-[11px] text-[#abb2bf] font-mono",children:'<div data-framer-component-slot="mon-slot"\n data-framer-component-label="Mon composant" />'})]})}export{$x as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.