diff --git a/CLAUDE.md b/CLAUDE.md index e3c5a8806c..e9f70542d4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,3 +2,40 @@ - Unit tests can be run with `bun test` - Run type checking with `bun run typecheck` - Apply database updates to local dev with `bun run db:push` + +## MobX + React Best Practices + +### Pattern for Provider Components with Observable Stores +When creating React providers that manage MobX observable stores (like EditorEngine): + +**✅ DO:** +- Use `useState(() => new Store())` for stable observable instances (MobX recommended pattern) +- Keep refs (`engineRef.current`) to avoid stale closures in effects +- Use `setTimeout(() => store.clear(), 0)` for delayed cleanup to avoid race conditions +- Separate project changes from branch updates with proper dependency arrays + +**❌ DON'T:** +- Use `useMemo` for observable references - React may randomly "forget" them (data loss risk) +- Clean up stores synchronously during navigation - causes "No branch selected" errors +- Include the store instance in effect dependency arrays if it causes infinite loops + +### Example Pattern: +```tsx +const [store, setStore] = useState(() => new Store(props)); +const storeRef = useRef(store); + +useEffect(() => { + if (propChanged) { + setTimeout(() => storeRef.current?.clear(), 0); // Delayed cleanup + const newStore = new Store(newProps); + storeRef.current = newStore; + setStore(newStore); + } +}, [propChanged]); + +useEffect(() => { + return () => setTimeout(() => storeRef.current?.clear(), 0); +}, []); +``` + +This maintains MobX reactivity while preventing cleanup race conditions. diff --git a/apps/web/client/package.json b/apps/web/client/package.json index 30ddddad57..5c6fb38656 100644 --- a/apps/web/client/package.json +++ b/apps/web/client/package.json @@ -72,7 +72,6 @@ "clsx": "^2.1.1", "culori": "^4.0.1", "date-fns": "^4.1.0", - "embla-carousel-react": "^8.6.0", "flexsearch": "^0.8.160", "freestyle-sandboxes": "^0.0.78", "langfuse-vercel": "^3.38.4", diff --git a/apps/web/client/public/onlook-preload-script.js b/apps/web/client/public/onlook-preload-script.js index 70dd5577f9..06836e3f70 100644 --- a/apps/web/client/public/onlook-preload-script.js +++ b/apps/web/client/public/onlook-preload-script.js @@ -1,37 +1,37 @@ -var f4=Object.create;var{getPrototypeOf:z4,defineProperty:pe,getOwnPropertyNames:D4}=Object;var _4=Object.prototype.hasOwnProperty;var Uh=(r,t,i)=>{i=r!=null?f4(z4(r)):{};let o=t||!r||!r.__esModule?pe(i,"default",{value:r,enumerable:!0}):i;for(let n of D4(r))if(!_4.call(o,n))pe(o,n,{get:()=>r[n],enumerable:!0});return o};var vr=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var U=(r,t)=>{for(var i in t)pe(r,i,{get:t[i],enumerable:!0,configurable:!0,set:(o)=>t[i]=()=>o})};var Ie=vr((NU,ah)=>{function j4(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}ah.exports=j4});var Jh=vr((BU,kh)=>{var O4=typeof global=="object"&&global&&global.Object===Object&&global;kh.exports=O4});var Ue=vr((yU,Xh)=>{var p4=Jh(),I4=typeof self=="object"&&self&&self.Object===Object&&self,U4=p4||I4||Function("return this")();Xh.exports=U4});var Wh=vr((AU,qh)=>{var a4=Ue(),k4=function(){return a4.Date.now()};qh.exports=k4});var Kh=vr((HU,Ph)=>{var J4=/\s/;function X4(r){var t=r.length;while(t--&&J4.test(r.charAt(t)));return t}Ph.exports=X4});var Vh=vr((RU,Lh)=>{var q4=Kh(),W4=/^\s+/;function P4(r){return r?r.slice(0,q4(r)+1).replace(W4,""):r}Lh.exports=P4});var ae=vr((MU,Yh)=>{var K4=Ue(),L4=K4.Symbol;Yh.exports=L4});var Gh=vr((ZU,Fh)=>{var Eh=ae(),Qh=Object.prototype,V4=Qh.hasOwnProperty,Y4=Qh.toString,fn=Eh?Eh.toStringTag:void 0;function E4(r){var t=V4.call(r,fn),i=r[fn];try{r[fn]=void 0;var o=!0}catch(e){}var n=Y4.call(r);if(o)if(t)r[fn]=i;else delete r[fn];return n}Fh.exports=E4});var Nh=vr((CU,Sh)=>{var Q4=Object.prototype,F4=Q4.toString;function G4(r){return F4.call(r)}Sh.exports=G4});var Hh=vr((TU,Ah)=>{var Bh=ae(),S4=Gh(),N4=Nh(),B4="[object Null]",y4="[object Undefined]",yh=Bh?Bh.toStringTag:void 0;function A4(r){if(r==null)return r===void 0?y4:B4;return yh&&yh in Object(r)?S4(r):N4(r)}Ah.exports=A4});var Mh=vr((dU,Rh)=>{function H4(r){return r!=null&&typeof r=="object"}Rh.exports=H4});var Ch=vr((sU,Zh)=>{var R4=Hh(),M4=Mh(),Z4="[object Symbol]";function C4(r){return typeof r=="symbol"||M4(r)&&R4(r)==Z4}Zh.exports=C4});var r$=vr((ra,sh)=>{var T4=Vh(),Th=Ie(),d4=Ch(),dh=NaN,s4=/^[-+]0x[0-9a-f]+$/i,r6=/^0b[01]+$/i,t6=/^0o[0-7]+$/i,n6=parseInt;function i6(r){if(typeof r=="number")return r;if(d4(r))return dh;if(Th(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=Th(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=T4(r);var i=r6.test(r);return i||t6.test(r)?n6(r.slice(2),i?2:8):s4.test(r)?dh:+r}sh.exports=i6});var Je=vr((ta,n$)=>{var o6=Ie(),ke=Wh(),t$=r$(),e6="Expected a function",l6=Math.max,c6=Math.min;function u6(r,t,i){var o,n,e,l,u,g,c=0,b=!1,v=!1,h=!0;if(typeof r!="function")throw new TypeError(e6);if(t=t$(t)||0,o6(i))b=!!i.leading,v="maxWait"in i,e=v?l6(t$(i.maxWait)||0,t):e,h="trailing"in i?!!i.trailing:h;function m(Q){var B=o,tr=n;return o=n=void 0,c=Q,l=r.apply(tr,B),l}function w(Q){return c=Q,u=setTimeout(j,t),b?m(Q):l}function _(Q){var B=Q-g,tr=Q-c,Oe=t-B;return v?c6(Oe,e-tr):Oe}function p(Q){var B=Q-g,tr=Q-c;return g===void 0||B>=t||B<0||v&&tr>=e}function j(){var Q=ke();if(p(Q))return J(Q);u=setTimeout(j,_(Q))}function J(Q){if(u=void 0,h&&o)return m(Q);return o=n=void 0,l}function V(){if(u!==void 0)clearTimeout(u);c=0,o=g=n=u=void 0}function q(){return u===void 0?l:J(ke())}function P(){var Q=ke(),B=p(Q);if(o=arguments,n=this,g=Q,B){if(u===void 0)return w(g);if(v)return clearTimeout(u),u=setTimeout(j,t),m(g)}if(u===void 0)u=setTimeout(j,t);return l}return P.cancel=V,P.flush=q,P}n$.exports=u6});var i0=vr((ez)=>{var n0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ez.encode=function(r){if(0<=r&&r{var o0=i0(),Be=5,e0=1<>1;return t?-i:i}bz.encode=function r(t){var i="",o,n=uz(t);do{if(o=n&l0,n>>>=Be,n>0)o|=c0;i+=o0.encode(o)}while(n>0);return i};bz.decode=function r(t,i,o){var n=t.length,e=0,l=0,u,g;do{if(i>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(g=o0.decode(t.charCodeAt(i++)),g===-1)throw new Error("Invalid base64 digit: "+t.charAt(i-1));u=!!(g&c0),g&=l0,e=e+(g<{function hz(r,t,i){if(t in r)return r[t];else if(arguments.length===3)return i;else throw new Error('"'+t+'" is a required argument.')}kz.getArg=hz;var g0=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$z=/^data:.+\,.+$/;function Un(r){var t=r.match(g0);if(!t)return null;return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}kz.urlParse=Un;function At(r){var t="";if(r.scheme)t+=r.scheme+":";if(t+="//",r.auth)t+=r.auth+"@";if(r.host)t+=r.host;if(r.port)t+=":"+r.port;if(r.path)t+=r.path;return t}kz.urlGenerate=At;var xz=32;function wz(r){var t=[];return function(i){for(var o=0;oxz)t.pop();return e}}var ye=wz(function r(t){var i=t,o=Un(t);if(o){if(!o.path)return t;i=o.path}var n=kz.isAbsolute(i),e=[],l=0,u=0;while(!0)if(l=u,u=i.indexOf("/",l),u===-1){e.push(i.slice(l));break}else{e.push(i.slice(l,u));while(u=0;u--)if(g=e[u],g===".")e.splice(u,1);else if(g==="..")c++;else if(c>0)if(g==="")e.splice(u+1,c),c=0;else e.splice(u,2),c--;if(i=e.join("/"),i==="")i=n?"/":".";if(o)return o.path=i,At(o);return i});kz.normalize=ye;function b0(r,t){if(r==="")r=".";if(t==="")t=".";var i=Un(t),o=Un(r);if(o)r=o.path||"/";if(i&&!i.scheme){if(o)i.scheme=o.scheme;return At(i)}if(i||t.match($z))return t;if(o&&!o.host&&!o.path)return o.host=t,At(o);var n=t.charAt(0)==="/"?t:ye(r.replace(/\/+$/,"")+"/"+t);if(o)return o.path=n,At(o);return n}kz.join=b0;kz.isAbsolute=function(r){return r.charAt(0)==="/"||g0.test(r)};function fz(r,t){if(r==="")r=".";r=r.replace(/\/$/,"");var i=0;while(t.indexOf(r+"/")!==0){var o=r.lastIndexOf("/");if(o<0)return t;if(r=r.slice(0,o),r.match(/^([^\/]+:\/)?\/*$/))return t;++i}return Array(i+1).join("../")+t.substr(r.length+1)}kz.relative=fz;var m0=function(){var r=Object.create(null);return!("__proto__"in r)}();function v0(r){return r}function zz(r){if(h0(r))return"$"+r;return r}kz.toSetString=m0?v0:zz;function Dz(r){if(h0(r))return r.slice(1);return r}kz.fromSetString=m0?v0:Dz;function h0(r){if(!r)return!1;var t=r.length;if(t<9)return!1;if(r.charCodeAt(t-1)!==95||r.charCodeAt(t-2)!==95||r.charCodeAt(t-3)!==111||r.charCodeAt(t-4)!==116||r.charCodeAt(t-5)!==111||r.charCodeAt(t-6)!==114||r.charCodeAt(t-7)!==112||r.charCodeAt(t-8)!==95||r.charCodeAt(t-9)!==95)return!1;for(var i=t-10;i>=0;i--)if(r.charCodeAt(i)!==36)return!1;return!0}function _z(r,t,i){var o=tt(r.source,t.source);if(o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}kz.compareByOriginalPositions=_z;function jz(r,t,i){var o=r.originalLine-t.originalLine;if(o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}kz.compareByOriginalPositionsNoSource=jz;function Oz(r,t,i){var o=r.generatedLine-t.generatedLine;if(o!==0)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}kz.compareByGeneratedPositionsDeflated=Oz;function pz(r,t,i){var o=r.generatedColumn-t.generatedColumn;if(o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}kz.compareByGeneratedPositionsDeflatedNoLine=pz;function tt(r,t){if(r===t)return 0;if(r===null)return 1;if(t===null)return-1;if(r>t)return 1;return-1}function Iz(r,t){var i=r.generatedLine-t.generatedLine;if(i!==0)return i;if(i=r.generatedColumn-t.generatedColumn,i!==0)return i;if(i=tt(r.source,t.source),i!==0)return i;if(i=r.originalLine-t.originalLine,i!==0)return i;if(i=r.originalColumn-t.originalColumn,i!==0)return i;return tt(r.name,t.name)}kz.compareByGeneratedPositionsInflated=Iz;function Uz(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}kz.parseSourceMapInput=Uz;function az(r,t,i){if(t=t||"",r){if(r[r.length-1]!=="/"&&t[0]!=="/")r+="/";t=r+t}if(i){var o=Un(i);if(!o)throw new Error("sourceMapURL could not be parsed");if(o.path){var n=o.path.lastIndexOf("/");if(n>=0)o.path=o.path.substring(0,n+1)}t=b0(At(o),t)}return ye(t)}kz.computeSourceURL=az});var $0=vr((yz)=>{var Ae=yi(),He=Object.prototype.hasOwnProperty,at=typeof Map!=="undefined";function nt(){this._array=[],this._set=at?new Map:Object.create(null)}nt.fromArray=function r(t,i){var o=new nt;for(var n=0,e=t.length;n=0)return i}else{var o=Ae.toSetString(t);if(He.call(this._set,o))return this._set[o]}throw new Error('"'+t+'" is not in the set.')};nt.prototype.at=function r(t){if(t>=0&&t{var x0=yi();function Hz(r,t){var i=r.generatedLine,o=t.generatedLine,n=r.generatedColumn,e=t.generatedColumn;return o>i||o==i&&e>=n||x0.compareByGeneratedPositionsInflated(r,t)<=0}function Ai(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ai.prototype.unsortedForEach=function r(t,i){this._array.forEach(t,i)};Ai.prototype.add=function r(t){if(Hz(this._last,t))this._last=t,this._array.push(t);else this._sorted=!1,this._array.push(t)};Ai.prototype.toArray=function r(){if(!this._sorted)this._array.sort(x0.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};Rz.MappingList=Ai});var Vt="PENPAL_CHILD";var x4=Uh(Je(),1);var g6=class extends Error{code;constructor(r,t){super(t);this.name="PenpalError",this.code=r}},_r=g6,b6=(r)=>({name:r.name,message:r.message,stack:r.stack,penpalCode:r instanceof _r?r.code:void 0}),m6=({name:r,message:t,stack:i,penpalCode:o})=>{let n=o?new _r(o,t):new Error(t);return n.name=r,n.stack=i,n},v6=Symbol("Reply"),h6=class{value;transferables;#r=v6;constructor(r,t){this.value=r,this.transferables=t?.transferables}},$6=h6,Jr="penpal",ki=(r)=>{return typeof r==="object"&&r!==null},c$=(r)=>{return typeof r==="function"},x6=(r)=>{return ki(r)&&r.namespace===Jr},Yt=(r)=>{return r.type==="SYN"},Ji=(r)=>{return r.type==="ACK1"},zn=(r)=>{return r.type==="ACK2"},u$=(r)=>{return r.type==="CALL"},g$=(r)=>{return r.type==="REPLY"},w6=(r)=>{return r.type==="DESTROY"},b$=(r,t=[])=>{let i=[];for(let o of Object.keys(r)){let n=r[o];if(c$(n))i.push([...t,o]);else if(ki(n))i.push(...b$(n,[...t,o]))}return i},f6=(r,t)=>{let i=r.reduce((o,n)=>{return ki(o)?o[n]:void 0},t);return c$(i)?i:void 0},bt=(r)=>{return r.join(".")},i$=(r,t,i)=>({namespace:Jr,channel:r,type:"REPLY",callId:t,isError:!0,...i instanceof Error?{value:b6(i),isSerializedErrorInstance:!0}:{value:i}}),z6=(r,t,i,o)=>{let n=!1,e=async(l)=>{if(n)return;if(!u$(l))return;o?.(`Received ${bt(l.methodPath)}() call`,l);let{methodPath:u,args:g,id:c}=l,b,v;try{let h=f6(u,t);if(!h)throw new _r("METHOD_NOT_FOUND",`Method \`${bt(u)}\` is not found.`);let m=await h(...g);if(m instanceof $6)v=m.transferables,m=await m.value;b={namespace:Jr,channel:i,type:"REPLY",callId:c,value:m}}catch(h){b=i$(i,c,h)}if(n)return;try{o?.(`Sending ${bt(u)}() reply`,b),r.sendMessage(b,v)}catch(h){if(h.name==="DataCloneError")b=i$(i,c,h),o?.(`Sending ${bt(u)}() reply`,b),r.sendMessage(b);throw h}};return r.addMessageHandler(e),()=>{n=!0,r.removeMessageHandler(e)}},D6=z6,m$=crypto.randomUUID?.bind(crypto)??(()=>new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")),_6=Symbol("CallOptions"),j6=class{transferables;timeout;#r=_6;constructor(r){this.transferables=r?.transferables,this.timeout=r?.timeout}},O6=j6,p6=new Set(["apply","call","bind"]),v$=(r,t,i=[])=>{return new Proxy(i.length?()=>{}:Object.create(null),{get(o,n){if(n==="then")return;if(i.length&&p6.has(n))return Reflect.get(o,n);return v$(r,t,[...i,n])},apply(o,n,e){return r(i,e)}})},o$=(r)=>{return new _r("CONNECTION_DESTROYED",`Method call ${bt(r)}() failed due to destroyed connection`)},I6=(r,t,i)=>{let o=!1,n=new Map,e=(g)=>{if(!g$(g))return;let{callId:c,value:b,isError:v,isSerializedErrorInstance:h}=g,m=n.get(c);if(!m)return;if(n.delete(c),i?.(`Received ${bt(m.methodPath)}() call`,g),v)m.reject(h?m6(b):b);else m.resolve(b)};return r.addMessageHandler(e),{remoteProxy:v$((g,c)=>{if(o)throw o$(g);let b=m$(),v=c[c.length-1],h=v instanceof O6,{timeout:m,transferables:w}=h?v:{},_=h?c.slice(0,-1):c;return new Promise((p,j)=>{let J=m!==void 0?window.setTimeout(()=>{n.delete(b),j(new _r("METHOD_CALL_TIMEOUT",`Method call ${bt(g)}() timed out after ${m}ms`))},m):void 0;n.set(b,{methodPath:g,resolve:p,reject:j,timeoutId:J});try{let V={namespace:Jr,channel:t,type:"CALL",id:b,methodPath:g,args:_};i?.(`Sending ${bt(g)}() call`,V),r.sendMessage(V,w)}catch(V){j(new _r("TRANSMISSION_FAILED",V.message))}})},i),destroy:()=>{o=!0,r.removeMessageHandler(e);for(let{methodPath:g,reject:c,timeoutId:b}of n.values())clearTimeout(b),c(o$(g));n.clear()}}},U6=I6,a6=()=>{let r,t;return{promise:new Promise((o,n)=>{r=o,t=n}),resolve:r,reject:t}},k6=a6,J6=class extends Error{constructor(r){super(`You've hit a bug in Penpal. Please file an issue with the following information: ${r}`)}},Et=J6,Xe="deprecated-penpal",X6=(r)=>{return ki(r)&&"penpal"in r},q6=(r)=>r.split("."),e$=(r)=>r.join("."),h$=(r)=>{return new Et(`Unexpected message to translate: ${JSON.stringify(r)}`)},W6=(r)=>{if(r.penpal==="syn")return{namespace:Jr,channel:void 0,type:"SYN",participantId:Xe};if(r.penpal==="ack")return{namespace:Jr,channel:void 0,type:"ACK2"};if(r.penpal==="call")return{namespace:Jr,channel:void 0,type:"CALL",id:r.id,methodPath:q6(r.methodName),args:r.args};if(r.penpal==="reply")if(r.resolution==="fulfilled")return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,value:r.returnValue};else return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,isError:!0,...r.returnValueIsError?{value:r.returnValue,isSerializedErrorInstance:!0}:{value:r.returnValue}};throw h$(r)},P6=(r)=>{if(Ji(r))return{penpal:"synAck",methodNames:r.methodPaths.map(e$)};if(u$(r))return{penpal:"call",id:r.id,methodName:e$(r.methodPath),args:r.args};if(g$(r))if(r.isError)return{penpal:"reply",id:r.callId,resolution:"rejected",...r.isSerializedErrorInstance?{returnValue:r.value,returnValueIsError:!0}:{returnValue:r.value}};else return{penpal:"reply",id:r.callId,resolution:"fulfilled",returnValue:r.value};throw h$(r)},K6=({messenger:r,methods:t,timeout:i,channel:o,log:n})=>{let e=m$(),l,u=[],g=!1,c=b$(t),{promise:b,resolve:v,reject:h}=k6(),m=i!==void 0?setTimeout(()=>{h(new _r("CONNECTION_TIMEOUT",`Connection timed out after ${i}ms`))},i):void 0,w=()=>{for(let P of u)P()},_=()=>{if(g)return;u.push(D6(r,t,o,n));let{remoteProxy:P,destroy:Q}=U6(r,o,n);u.push(Q),clearTimeout(m),g=!0,v({remoteProxy:P,destroy:w})},p=()=>{let P={namespace:Jr,type:"SYN",channel:o,participantId:e};n?.("Sending handshake SYN",P);try{r.sendMessage(P)}catch(Q){h(new _r("TRANSMISSION_FAILED",Q.message))}},j=(P)=>{if(n?.("Received handshake SYN",P),P.participantId===l&&l!==Xe)return;if(l=P.participantId,p(),!(e>l||l===Xe))return;let B={namespace:Jr,channel:o,type:"ACK1",methodPaths:c};n?.("Sending handshake ACK1",B);try{r.sendMessage(B)}catch(tr){h(new _r("TRANSMISSION_FAILED",tr.message));return}},J=(P)=>{n?.("Received handshake ACK1",P);let Q={namespace:Jr,channel:o,type:"ACK2"};n?.("Sending handshake ACK2",Q);try{r.sendMessage(Q)}catch(B){h(new _r("TRANSMISSION_FAILED",B.message));return}_()},V=(P)=>{n?.("Received handshake ACK2",P),_()},q=(P)=>{if(Yt(P))j(P);if(Ji(P))J(P);if(zn(P))V(P)};return r.addMessageHandler(q),u.push(()=>r.removeMessageHandler(q)),p(),b},L6=K6,V6=(r)=>{let t=!1,i;return(...o)=>{if(!t)t=!0,i=r(...o);return i}},Y6=V6,l$=new WeakSet,E6=({messenger:r,methods:t={},timeout:i,channel:o,log:n})=>{if(!r)throw new _r("INVALID_ARGUMENT","messenger must be defined");if(l$.has(r))throw new _r("INVALID_ARGUMENT","A messenger can only be used for a single connection");l$.add(r);let e=[r.destroy],l=Y6((c)=>{if(c){let b={namespace:Jr,channel:o,type:"DESTROY"};try{r.sendMessage(b)}catch(v){}}for(let b of e)b();n?.("Connection destroyed")}),u=(c)=>{return x6(c)&&c.channel===o};return{promise:(async()=>{try{r.initialize({log:n,validateReceivedMessage:u}),r.addMessageHandler((v)=>{if(w6(v))l(!1)});let{remoteProxy:c,destroy:b}=await L6({messenger:r,methods:t,timeout:i,channel:o,log:n});return e.push(b),c}catch(c){throw l(!0),c}})(),destroy:()=>{l(!0)}}},$$=E6,Q6=class{#r;#o;#n;#t;#l;#i=new Set;#e;#c=!1;constructor({remoteWindow:r,allowedOrigins:t}){if(!r)throw new _r("INVALID_ARGUMENT","remoteWindow must be defined");this.#r=r,this.#o=t?.length?t:[window.origin]}initialize=({log:r,validateReceivedMessage:t})=>{this.#n=r,this.#t=t,window.addEventListener("message",this.#m)};sendMessage=(r,t)=>{if(Yt(r)){let i=this.#u(r);this.#r.postMessage(r,{targetOrigin:i,transfer:t});return}if(Ji(r)||this.#c){let i=this.#c?P6(r):r,o=this.#u(r);this.#r.postMessage(i,{targetOrigin:o,transfer:t});return}if(zn(r)){let{port1:i,port2:o}=new MessageChannel;this.#e=i,i.addEventListener("message",this.#g),i.start();let n=[o,...t||[]],e=this.#u(r);this.#r.postMessage(r,{targetOrigin:e,transfer:n});return}if(this.#e){this.#e.postMessage(r,{transfer:t});return}throw new Et("Port is undefined")};addMessageHandler=(r)=>{this.#i.add(r)};removeMessageHandler=(r)=>{this.#i.delete(r)};destroy=()=>{window.removeEventListener("message",this.#m),this.#b(),this.#i.clear()};#v=(r)=>{return this.#o.some((t)=>t instanceof RegExp?t.test(r):t===r||t==="*")};#u=(r)=>{if(Yt(r))return"*";if(!this.#l)throw new Et("Concrete remote origin not set");return this.#l==="null"&&this.#o.includes("*")?"*":this.#l};#b=()=>{this.#e?.removeEventListener("message",this.#g),this.#e?.close(),this.#e=void 0};#m=({source:r,origin:t,ports:i,data:o})=>{if(r!==this.#r)return;if(X6(o))this.#n?.("Please upgrade the child window to the latest version of Penpal."),this.#c=!0,o=W6(o);if(!this.#t?.(o))return;if(!this.#v(t)){this.#n?.(`Received a message from origin \`${t}\` which did not match allowed origins \`[${this.#o.join(", ")}]\``);return}if(Yt(o))this.#b(),this.#l=t;if(zn(o)&&!this.#c){if(this.#e=i[0],!this.#e)throw new Et("No port received on ACK2");this.#e.addEventListener("message",this.#g),this.#e.start()}for(let n of this.#i)n(o)};#g=({data:r})=>{if(!this.#t?.(r))return;for(let t of this.#i)t(r)}},x$=Q6,na=class{#r;#o;#n=new Set;#t;constructor({worker:r}){if(!r)throw new _r("INVALID_ARGUMENT","worker must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#i)};sendMessage=(r,t)=>{if(Yt(r)||Ji(r)){this.#r.postMessage(r,{transfer:t});return}if(zn(r)){let{port1:i,port2:o}=new MessageChannel;this.#t=i,i.addEventListener("message",this.#i),i.start(),this.#r.postMessage(r,{transfer:[o,...t||[]]});return}if(this.#t){this.#t.postMessage(r,{transfer:t});return}throw new Et("Port is undefined")};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#i),this.#l(),this.#n.clear()};#l=()=>{this.#t?.removeEventListener("message",this.#i),this.#t?.close(),this.#t=void 0};#i=({ports:r,data:t})=>{if(!this.#o?.(t))return;if(Yt(t))this.#l();if(zn(t)){if(this.#t=r[0],!this.#t)throw new Et("No port received on ACK2");this.#t.addEventListener("message",this.#i),this.#t.start()}for(let i of this.#n)i(t)}};var ia=class{#r;#o;#n=new Set;constructor({port:r}){if(!r)throw new _r("INVALID_ARGUMENT","port must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#t),this.#r.start()};sendMessage=(r,t)=>{this.#r?.postMessage(r,{transfer:t})};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#t),this.#r.close(),this.#n.clear()};#t=({data:r})=>{if(!this.#o?.(r))return;for(let t of this.#n)t(r)}};var w$=["SCRIPT","STYLE","LINK","META","NOSCRIPT"],f$=new Set(["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","h1","h2","h3","h4","h5","h6","i","iframe","img","input","ins","kbd","label","li","map","mark","meter","noscript","object","output","p","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr"]);var qe=".next-prod";var _a={SCALE:0.7,PAN_POSITION:{x:175,y:100},URL:"http://localhost:3000/",FRAME_POSITION:{x:0,y:0},FRAME_DIMENSION:{width:1536,height:960},ASPECT_RATIO_LOCKED:!1,DEVICE:"Custom:Custom",THEME:"system",ORIENTATION:"Portrait",MIN_DIMENSIONS:{width:"280px",height:"360px"},COMMANDS:{run:"bun run dev",build:"bun run build",install:"bun install"},IMAGE_FOLDER:"public",IMAGE_DIMENSION:{width:"100px",height:"100px"},FONT_FOLDER:"fonts",FONT_CONFIG:"app/fonts.ts",TAILWIND_CONFIG:"tailwind.config.ts",CHAT_SETTINGS:{showSuggestions:!0,autoApplyCode:!0,expandCodeBlocks:!1,showMiniChat:!0,maxImages:5},EDITOR_SETTINGS:{shouldWarnDelete:!1,enableBunReplace:!0,buildFlags:"--no-lint"}};var We=["node_modules","dist","build",".git",".next"],pa=[...We,"static","out",qe],Ia=[...We,qe],Ua=[...We,"coverage"],F6=[".jsx",".tsx"],G6=[".js",".ts",".mjs",".cjs"],aa=[...F6,...G6];var Xa={["en"]:"English",["ja"]:"日本語",["zh"]:"中文",["ko"]:"한국어"};var j$=Uh(Je(),1);function S(r){return document.querySelector(`[${"data-odid"}="${r}"]`)}function Pe(r,t=!1){let i=`[${"data-odid"}="${r}"]`;if(!t)return i;return S6(i)}function S6(r){return CSS.escape(r)}function Ot(r){return r&&r instanceof Node&&r.nodeType===Node.ELEMENT_NODE&&!w$.includes(r.tagName)&&!r.hasAttribute("data-onlook-ignore")&&r.style.display!=="none"}var N6="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var z$=(r=21)=>{let t="",i=r|0;while(i--)t+=N6[Math.random()*64|0];return t};function Xr(r){let t=r.getAttribute("data-odid");if(!t)t=`odid-${z$()}`,r.setAttribute("data-odid",t);return t}function Sr(r){return r.getAttribute("data-oid")}function Nr(r){return r.getAttribute("data-oiid")}function D$(r,t){if(!jr)return;jr.onDomProcessed({layerMap:Object.fromEntries(r),rootNode:t}).catch((i)=>{console.error("Failed to send DOM processed event:",i)})}function Ke(r){window._onlookFrameId=r}function Qt(){let r=window._onlookFrameId;if(!r)return console.warn("Frame id not found"),jr?.getFrameId().then((t)=>{Ke(t)}),"";return r}function B6(r=document.body){if(!Qt())return console.warn("frameView id not found, skipping dom processing"),null;let i=zr(r);if(!i)return console.warn("Error building layer tree, root element is null"),null;let o=r.getAttribute("data-odid");if(!o)return console.warn("Root dom id not found"),null;let n=i.get(o);if(!n)return console.warn("Root node not found"),null;return D$(i,n),{rootDomId:o,layerMap:Array.from(i.entries())}}var Xi=j$.default(B6,500),y6=[(r)=>{let t=r.parentElement;return t&&t.tagName.toLowerCase()==="svg"},(r)=>{return r.tagName.toLowerCase()==="next-route-announcer"},(r)=>{return r.tagName.toLowerCase()==="nextjs-portal"}];function zr(r){if(!Ot(r))return null;let t=new Map,i=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:(e)=>{let l=e;if(y6.some((u)=>u(l)))return NodeFilter.FILTER_REJECT;return Ot(l)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),o=_$(r);o.children=[],t.set(o.domId,o);let n=i.nextNode();while(n){let e=_$(n);e.children=[];let l=n.parentElement;if(l){let u=l.getAttribute("data-odid");if(u){e.parent=u;let g=t.get(u);if(g&&g.children)g.children.push(e.domId)}}t.set(e.domId,e),n=i.nextNode()}return t}function _$(r){let t=Xr(r),i=Sr(r),o=Nr(r),n=Array.from(r.childNodes).map((g)=>g.nodeType===Node.TEXT_NODE?g.textContent:"").join(" ").trim().slice(0,500),e=window.getComputedStyle(r),l=r.getAttribute("data-ocname");return{domId:t,oid:i||null,instanceId:o||null,textContent:n||"",tagName:r.tagName.toLowerCase(),isVisible:e.visibility!=="hidden",component:l||null,frameId:Qt(),children:null,parent:null,dynamicType:null,coreElementType:null}}function Le(r){throw new Error(`Expected \`never\`, found: ${JSON.stringify(r)}`)}var O$=(r)=>JSON.parse(JSON.stringify(r));function p$(r){let t=U$(r),i=A6(r),o=H6(r);return{defined:{width:"auto",height:"auto",...i,...o},computed:t}}function I$(r){let t=S(r);if(!t)return{};return U$(t)}function U$(r){return O$(window.getComputedStyle(r))}function A6(r){let t={},i=a$(r.style.cssText);return Object.entries(i).forEach(([o,n])=>{t[o]=n}),t}function H6(r){let t={},i=document.styleSheets;for(let o=0;ot[c]=b)}}catch(u){console.warn("Error",u)}}return t}function a$(r){let t={};return r.split(";").forEach((i)=>{if(i=i.trim(),!i)return;let[o,...n]=i.split(":");t[o?.trim()??""]=n.join(":").trim()}),t}var k$=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},lr=(r,t)=>{let i=r.parentElement,o=i?{domId:i.getAttribute("data-odid"),frameId:Qt(),oid:i.getAttribute("data-oid"),instanceId:i.getAttribute("data-oiid"),rect:i.getBoundingClientRect()}:null,n=r.getBoundingClientRect(),e=t?p$(r):null;return{domId:r.getAttribute("data-odid"),oid:r.getAttribute("data-oid"),frameId:Qt(),instanceId:r.getAttribute("data-oiid"),rect:n,tagName:r.tagName,parent:o,styles:e}};function qi(r){try{let t=r.getAttribute("data-onlook-drag-saved-style");if(t){let i=JSON.parse(t);for(let o in i)r.style[o]=i[o]}}catch(t){console.warn("Error restoring style",t)}}function J$(r){let t=r.parentElement;if(!t)return;return{type:"index",targetDomId:t.getAttribute("data-odid"),targetOid:Nr(t)||Sr(t)||null,index:Array.from(r.parentElement?.children||[]).indexOf(r),originalIndex:Array.from(r.parentElement?.children||[]).indexOf(r)}}var X$=(r)=>{let t=Array.from(r.childNodes).filter((i)=>i.nodeType===Node.TEXT_NODE).map((i)=>i.textContent);if(t.length===0)return;return t.join("")};var Wi=(r,t)=>{let i=S(r)||document.body;return lr(i,t)},q$=(r,t,i)=>{let o=R6(r,t)||document.body;return lr(o,i)},R6=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},W$=(r,t,i)=>{let o=S(r);if(!o){console.warn("Failed to updateElementInstanceId: Element not found");return}o.setAttribute("data-oiid",t),o.setAttribute("data-ocname",i)},P$=(r)=>{let t=S(r);if(!t?.parentElement)return null;return lr(t.parentElement,!1)},K$=(r)=>{let t=S(r);if(!t)return 0;return t.children.length},L$=(r)=>{let t=S(r);if(!t)return null;return lr(t.offsetParent,!1)};function V$(r,t,i){let o=S(r.domId);if(!o)return console.warn("Failed to find parent element",r.domId),null;let n=M6(t),e=new Set(i.map((c)=>c.domId)),l=Array.from(o.children).map((c,b)=>({element:c,index:b,domId:Xr(c)})).filter(({domId:c})=>e.has(c));if(l.length===0)return console.warn("No valid children found to group"),null;let u=Math.min(...l.map((c)=>c.index));return o.insertBefore(n,o.children[u]??null),l.forEach(({element:c})=>{let b=c.cloneNode(!0);b.setAttribute("data-onlook-inserted","true"),n.appendChild(b),c.style.display="none",E$(c)}),{domEl:lr(n,!0),newMap:zr(n)}}function Y$(r,t){let i=S(r.domId);if(!i)return console.warn(`Parent element not found: ${r.domId}`),null;let o;if(t.domId)o=S(t.domId);else return console.warn("Container domId is required for ungrouping"),null;if(!o)return console.warn("Container element not found for ungrouping"),null;return Array.from(o.children).forEach((l)=>{i.appendChild(l)}),o.remove(),{domEl:lr(i,!0),newMap:zr(i)}}function M6(r){let t=document.createElement(r.tagName);return Object.entries(r.attributes).forEach(([i,o])=>{t.setAttribute(i,o)}),t.setAttribute("data-onlook-inserted","true"),t.setAttribute("data-odid",r.domId),t.setAttribute("data-oid",r.oid),t}function E$(r){r.removeAttribute("data-odid"),r.removeAttribute("data-oid"),r.removeAttribute("data-onlook-inserted");let t=Array.from(r.children);if(t.length===0)return;t.forEach((i)=>{E$(i)})}function Pi(r){let t=S(r);if(!t)return console.warn("Element not found for domId:",r),null;return Q$(t)}function Q$(r){let t=Array.from(r.attributes).reduce((o,n)=>{return o[n.name]=n.value,o},{}),i=Nr(r)||Sr(r)||null;if(!i)return console.warn("Element has no oid"),null;return{oid:i,domId:Xr(r),tagName:r.tagName.toLowerCase(),children:Array.from(r.children).map((o)=>Q$(o)).filter(Boolean),attributes:t,textContent:X$(r)||null,styles:{}}}function F$(r){let t=S(r);if(!t)throw new Error("Element not found for domId: "+r);let i=t.parentElement;if(!i)throw new Error("Inserted element has no parent");let o=Nr(i)||Sr(i);if(!o)return console.warn("Parent element has no oid"),null;let n=Xr(i),e=Array.from(i.children).indexOf(t);if(e===-1)return{type:"append",targetDomId:n,targetOid:o};return{type:"index",targetDomId:n,targetOid:o,index:e,originalIndex:e}}function G$(r){let t=document.querySelector(`[${"data-odid"}="${r}"]`);if(!t)return console.warn("No element found",{domId:r}),{dynamicType:null,coreType:null};let i=t.getAttribute("data-onlook-dynamic-type")||null,o=t.getAttribute("data-onlook-core-element-type")||null;return{dynamicType:i,coreType:o}}function S$(r,t,i){let o=document.querySelector(`[${"data-odid"}="${r}"]`);if(o){if(t)o.setAttribute("data-onlook-dynamic-type",t);if(i)o.setAttribute("data-onlook-core-element-type",i)}}function N$(){let t=document.body.querySelector(`[${"data-oid"}]`);if(t)return lr(t,!0);return null}var Qr=0,f=1,a=2,R=3,G=4,gr=5,Ft=6,er=7,wr=8,X=9,k=10,y=11,W=12,Y=13,dr=14,hr=15,d=16,nr=17,ir=18,br=19,fr=20,K=21,I=22,Z=23,xr=24,A=25;function cr(r){return r>=48&&r<=57}function Ir(r){return cr(r)||r>=65&&r<=70||r>=97&&r<=102}function Vi(r){return r>=65&&r<=90}function Z6(r){return r>=97&&r<=122}function C6(r){return Vi(r)||Z6(r)}function T6(r){return r>=128}function Li(r){return C6(r)||T6(r)||r===95}function Dn(r){return Li(r)||cr(r)||r===45}function d6(r){return r>=0&&r<=8||r===11||r>=14&&r<=31||r===127}function _n(r){return r===10||r===13||r===12}function Br(r){return _n(r)||r===32||r===9}function Or(r,t){if(r!==92)return!1;if(_n(t)||t===0)return!1;return!0}function Gt(r,t,i){if(r===45)return Li(t)||t===45||Or(t,i);if(Li(r))return!0;if(r===92)return Or(r,t);return!1}function Yi(r,t,i){if(r===43||r===45){if(cr(t))return 2;return t===46&&cr(i)?3:0}if(r===46)return cr(t)?2:0;if(cr(r))return 1;return 0}function Ei(r){if(r===65279)return 1;if(r===65534)return 1;return 0}var Ve=new Array(128),s6=128,jn=130,Ye=131,Qi=132,Ee=133;for(let r=0;rr.length)return!1;for(let n=t;n=0;t--)if(!Br(r.charCodeAt(t)))break;return t+1}function On(r,t){for(;t=55296&&t<=57343||t>1114111)t=65533;return String.fromCodePoint(t)}var Nt=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function Bt(r=null,t){if(r===null||r.length0?Ei(t.charCodeAt(0)):0,n=Bt(r.lines,i),e=Bt(r.columns,i),l=r.startLine,u=r.startColumn;for(let g=o;g{}){r=String(r||"");let i=r.length,o=Bt(this.offsetAndType,r.length+1),n=Bt(this.balance,r.length+1),e=0,l=-1,u=0,g=r.length;this.offsetAndType=null,this.balance=null,n.fill(0),t(r,(c,b,v)=>{let h=e++;if(o[h]=c<>Hr]}else if(R$(c))g=h,u=It[c]}),o[e]=Qr<e)n[c]=e}this.source=r,this.firstCharOffset=l===-1?0:l,this.tokenCount=e,this.offsetAndType=o,this.balance=n,this.reset(),this.next()}lookupType(r){if(r+=this.tokenIndex,r>Hr;return Qr}lookupTypeNonSC(r){for(let t=this.tokenIndex;t>Hr;if(i!==Y&&i!==A){if(r--===0)return i}}return Qr}lookupOffset(r){if(r+=this.tokenIndex,r>Hr;if(i!==Y&&i!==A){if(r--===0)return t-this.tokenIndex}}return Qr}lookupValue(r,t){if(r+=this.tokenIndex,r0)return r>Hr,this.tokenEnd=t&Ar;else this.tokenIndex=this.tokenCount,this.next()}next(){let r=this.tokenIndex+1;if(r>Hr,this.tokenEnd=r&Ar;else this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Qr,this.tokenStart=this.tokenEnd=this.source.length}skipSC(){while(this.tokenType===Y||this.tokenType===A)this.next()}skipUntilBalanced(r,t){let i=r,o=0,n=0;r:for(;i0?this.offsetAndType[i-1]&Ar:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break r;case 2:i++;break r;default:if(R$(this.offsetAndType[i]>>Hr))i=o}}this.skip(i-this.tokenIndex)}forEachToken(r){for(let t=0,i=this.firstCharOffset;t>Hr;i=e,r(l,o,e,t)}}dump(){let r=new Array(this.tokenCount);return this.forEachToken((t,i,o,n)=>{r[n]={idx:n,type:Nt[t],chunk:this.source.substring(i,o),balance:this.balance[n]}}),r}}function mt(r,t){function i(v){return v=r.length){if(c{i=r!=null?f4(z4(r)):{};let o=t||!r||!r.__esModule?pe(i,"default",{value:r,enumerable:!0}):i;for(let n of D4(r))if(!_4.call(o,n))pe(o,n,{get:()=>r[n],enumerable:!0});return o};var vr=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var a=(r,t)=>{for(var i in t)pe(r,i,{get:t[i],enumerable:!0,configurable:!0,set:(o)=>t[i]=()=>o})};var Ie=vr((Na,Uh)=>{function j4(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}Uh.exports=j4});var Jh=vr((Ba,kh)=>{var O4=typeof global=="object"&&global&&global.Object===Object&&global;kh.exports=O4});var ae=vr((ya,Xh)=>{var p4=Jh(),I4=typeof self=="object"&&self&&self.Object===Object&&self,a4=p4||I4||Function("return this")();Xh.exports=a4});var Ph=vr((Aa,qh)=>{var U4=ae(),k4=function(){return U4.Date.now()};qh.exports=k4});var Kh=vr((Ha,Wh)=>{var J4=/\s/;function X4(r){var t=r.length;while(t--&&J4.test(r.charAt(t)));return t}Wh.exports=X4});var Vh=vr((Ra,Lh)=>{var q4=Kh(),P4=/^\s+/;function W4(r){return r?r.slice(0,q4(r)+1).replace(P4,""):r}Lh.exports=W4});var Ue=vr((Ma,Yh)=>{var K4=ae(),L4=K4.Symbol;Yh.exports=L4});var Sh=vr((Za,Fh)=>{var Eh=Ue(),Qh=Object.prototype,V4=Qh.hasOwnProperty,Y4=Qh.toString,fn=Eh?Eh.toStringTag:void 0;function E4(r){var t=V4.call(r,fn),i=r[fn];try{r[fn]=void 0;var o=!0}catch(e){}var n=Y4.call(r);if(o)if(t)r[fn]=i;else delete r[fn];return n}Fh.exports=E4});var Nh=vr((Ca,Gh)=>{var Q4=Object.prototype,F4=Q4.toString;function S4(r){return F4.call(r)}Gh.exports=S4});var Hh=vr((Ta,Ah)=>{var Bh=Ue(),G4=Sh(),N4=Nh(),B4="[object Null]",y4="[object Undefined]",yh=Bh?Bh.toStringTag:void 0;function A4(r){if(r==null)return r===void 0?y4:B4;return yh&&yh in Object(r)?G4(r):N4(r)}Ah.exports=A4});var Mh=vr((da,Rh)=>{function H4(r){return r!=null&&typeof r=="object"}Rh.exports=H4});var Ch=vr((sa,Zh)=>{var R4=Hh(),M4=Mh(),Z4="[object Symbol]";function C4(r){return typeof r=="symbol"||M4(r)&&R4(r)==Z4}Zh.exports=C4});var r$=vr((rU,sh)=>{var T4=Vh(),Th=Ie(),d4=Ch(),dh=NaN,s4=/^[-+]0x[0-9a-f]+$/i,r6=/^0b[01]+$/i,t6=/^0o[0-7]+$/i,n6=parseInt;function i6(r){if(typeof r=="number")return r;if(d4(r))return dh;if(Th(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=Th(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=T4(r);var i=r6.test(r);return i||t6.test(r)?n6(r.slice(2),i?2:8):s4.test(r)?dh:+r}sh.exports=i6});var Je=vr((tU,n$)=>{var o6=Ie(),ke=Ph(),t$=r$(),e6="Expected a function",l6=Math.max,c6=Math.min;function u6(r,t,i){var o,n,e,l,u,g,c=0,b=!1,v=!1,h=!0;if(typeof r!="function")throw new TypeError(e6);if(t=t$(t)||0,o6(i))b=!!i.leading,v="maxWait"in i,e=v?l6(t$(i.maxWait)||0,t):e,h="trailing"in i?!!i.trailing:h;function m(Q){var B=o,tr=n;return o=n=void 0,c=Q,l=r.apply(tr,B),l}function w(Q){return c=Q,u=setTimeout(j,t),b?m(Q):l}function _(Q){var B=Q-g,tr=Q-c,Oe=t-B;return v?c6(Oe,e-tr):Oe}function p(Q){var B=Q-g,tr=Q-c;return g===void 0||B>=t||B<0||v&&tr>=e}function j(){var Q=ke();if(p(Q))return J(Q);u=setTimeout(j,_(Q))}function J(Q){if(u=void 0,h&&o)return m(Q);return o=n=void 0,l}function V(){if(u!==void 0)clearTimeout(u);c=0,o=g=n=u=void 0}function q(){return u===void 0?l:J(ke())}function W(){var Q=ke(),B=p(Q);if(o=arguments,n=this,g=Q,B){if(u===void 0)return w(g);if(v)return clearTimeout(u),u=setTimeout(j,t),m(g)}if(u===void 0)u=setTimeout(j,t);return l}return W.cancel=V,W.flush=q,W}n$.exports=u6});var i0=vr((ez)=>{var n0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ez.encode=function(r){if(0<=r&&r{var o0=i0(),Be=5,e0=1<>1;return t?-i:i}bz.encode=function r(t){var i="",o,n=uz(t);do{if(o=n&l0,n>>>=Be,n>0)o|=c0;i+=o0.encode(o)}while(n>0);return i};bz.decode=function r(t,i,o){var n=t.length,e=0,l=0,u,g;do{if(i>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(g=o0.decode(t.charCodeAt(i++)),g===-1)throw new Error("Invalid base64 digit: "+t.charAt(i-1));u=!!(g&c0),g&=l0,e=e+(g<{function hz(r,t,i){if(t in r)return r[t];else if(arguments.length===3)return i;else throw new Error('"'+t+'" is a required argument.')}kz.getArg=hz;var g0=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$z=/^data:.+\,.+$/;function an(r){var t=r.match(g0);if(!t)return null;return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}kz.urlParse=an;function At(r){var t="";if(r.scheme)t+=r.scheme+":";if(t+="//",r.auth)t+=r.auth+"@";if(r.host)t+=r.host;if(r.port)t+=":"+r.port;if(r.path)t+=r.path;return t}kz.urlGenerate=At;var xz=32;function wz(r){var t=[];return function(i){for(var o=0;oxz)t.pop();return e}}var ye=wz(function r(t){var i=t,o=an(t);if(o){if(!o.path)return t;i=o.path}var n=kz.isAbsolute(i),e=[],l=0,u=0;while(!0)if(l=u,u=i.indexOf("/",l),u===-1){e.push(i.slice(l));break}else{e.push(i.slice(l,u));while(u=0;u--)if(g=e[u],g===".")e.splice(u,1);else if(g==="..")c++;else if(c>0)if(g==="")e.splice(u+1,c),c=0;else e.splice(u,2),c--;if(i=e.join("/"),i==="")i=n?"/":".";if(o)return o.path=i,At(o);return i});kz.normalize=ye;function b0(r,t){if(r==="")r=".";if(t==="")t=".";var i=an(t),o=an(r);if(o)r=o.path||"/";if(i&&!i.scheme){if(o)i.scheme=o.scheme;return At(i)}if(i||t.match($z))return t;if(o&&!o.host&&!o.path)return o.host=t,At(o);var n=t.charAt(0)==="/"?t:ye(r.replace(/\/+$/,"")+"/"+t);if(o)return o.path=n,At(o);return n}kz.join=b0;kz.isAbsolute=function(r){return r.charAt(0)==="/"||g0.test(r)};function fz(r,t){if(r==="")r=".";r=r.replace(/\/$/,"");var i=0;while(t.indexOf(r+"/")!==0){var o=r.lastIndexOf("/");if(o<0)return t;if(r=r.slice(0,o),r.match(/^([^\/]+:\/)?\/*$/))return t;++i}return Array(i+1).join("../")+t.substr(r.length+1)}kz.relative=fz;var m0=function(){var r=Object.create(null);return!("__proto__"in r)}();function v0(r){return r}function zz(r){if(h0(r))return"$"+r;return r}kz.toSetString=m0?v0:zz;function Dz(r){if(h0(r))return r.slice(1);return r}kz.fromSetString=m0?v0:Dz;function h0(r){if(!r)return!1;var t=r.length;if(t<9)return!1;if(r.charCodeAt(t-1)!==95||r.charCodeAt(t-2)!==95||r.charCodeAt(t-3)!==111||r.charCodeAt(t-4)!==116||r.charCodeAt(t-5)!==111||r.charCodeAt(t-6)!==114||r.charCodeAt(t-7)!==112||r.charCodeAt(t-8)!==95||r.charCodeAt(t-9)!==95)return!1;for(var i=t-10;i>=0;i--)if(r.charCodeAt(i)!==36)return!1;return!0}function _z(r,t,i){var o=tt(r.source,t.source);if(o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}kz.compareByOriginalPositions=_z;function jz(r,t,i){var o=r.originalLine-t.originalLine;if(o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0||i)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0)return o;if(o=r.generatedLine-t.generatedLine,o!==0)return o;return tt(r.name,t.name)}kz.compareByOriginalPositionsNoSource=jz;function Oz(r,t,i){var o=r.generatedLine-t.generatedLine;if(o!==0)return o;if(o=r.generatedColumn-t.generatedColumn,o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}kz.compareByGeneratedPositionsDeflated=Oz;function pz(r,t,i){var o=r.generatedColumn-t.generatedColumn;if(o!==0||i)return o;if(o=tt(r.source,t.source),o!==0)return o;if(o=r.originalLine-t.originalLine,o!==0)return o;if(o=r.originalColumn-t.originalColumn,o!==0)return o;return tt(r.name,t.name)}kz.compareByGeneratedPositionsDeflatedNoLine=pz;function tt(r,t){if(r===t)return 0;if(r===null)return 1;if(t===null)return-1;if(r>t)return 1;return-1}function Iz(r,t){var i=r.generatedLine-t.generatedLine;if(i!==0)return i;if(i=r.generatedColumn-t.generatedColumn,i!==0)return i;if(i=tt(r.source,t.source),i!==0)return i;if(i=r.originalLine-t.originalLine,i!==0)return i;if(i=r.originalColumn-t.originalColumn,i!==0)return i;return tt(r.name,t.name)}kz.compareByGeneratedPositionsInflated=Iz;function az(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}kz.parseSourceMapInput=az;function Uz(r,t,i){if(t=t||"",r){if(r[r.length-1]!=="/"&&t[0]!=="/")r+="/";t=r+t}if(i){var o=an(i);if(!o)throw new Error("sourceMapURL could not be parsed");if(o.path){var n=o.path.lastIndexOf("/");if(n>=0)o.path=o.path.substring(0,n+1)}t=b0(At(o),t)}return ye(t)}kz.computeSourceURL=Uz});var $0=vr((yz)=>{var Ae=yi(),He=Object.prototype.hasOwnProperty,Ut=typeof Map!=="undefined";function nt(){this._array=[],this._set=Ut?new Map:Object.create(null)}nt.fromArray=function r(t,i){var o=new nt;for(var n=0,e=t.length;n=0)return i}else{var o=Ae.toSetString(t);if(He.call(this._set,o))return this._set[o]}throw new Error('"'+t+'" is not in the set.')};nt.prototype.at=function r(t){if(t>=0&&t{var x0=yi();function Hz(r,t){var i=r.generatedLine,o=t.generatedLine,n=r.generatedColumn,e=t.generatedColumn;return o>i||o==i&&e>=n||x0.compareByGeneratedPositionsInflated(r,t)<=0}function Ai(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ai.prototype.unsortedForEach=function r(t,i){this._array.forEach(t,i)};Ai.prototype.add=function r(t){if(Hz(this._last,t))this._last=t,this._array.push(t);else this._sorted=!1,this._array.push(t)};Ai.prototype.toArray=function r(){if(!this._sorted)this._array.sort(x0.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};Rz.MappingList=Ai});var Vt="PENPAL_CHILD";var x4=ah(Je(),1);var g6=class extends Error{code;constructor(r,t){super(t);this.name="PenpalError",this.code=r}},_r=g6,b6=(r)=>({name:r.name,message:r.message,stack:r.stack,penpalCode:r instanceof _r?r.code:void 0}),m6=({name:r,message:t,stack:i,penpalCode:o})=>{let n=o?new _r(o,t):new Error(t);return n.name=r,n.stack=i,n},v6=Symbol("Reply"),h6=class{value;transferables;#r=v6;constructor(r,t){this.value=r,this.transferables=t?.transferables}},$6=h6,Jr="penpal",ki=(r)=>{return typeof r==="object"&&r!==null},c$=(r)=>{return typeof r==="function"},x6=(r)=>{return ki(r)&&r.namespace===Jr},Yt=(r)=>{return r.type==="SYN"},Ji=(r)=>{return r.type==="ACK1"},zn=(r)=>{return r.type==="ACK2"},u$=(r)=>{return r.type==="CALL"},g$=(r)=>{return r.type==="REPLY"},w6=(r)=>{return r.type==="DESTROY"},b$=(r,t=[])=>{let i=[];for(let o of Object.keys(r)){let n=r[o];if(c$(n))i.push([...t,o]);else if(ki(n))i.push(...b$(n,[...t,o]))}return i},f6=(r,t)=>{let i=r.reduce((o,n)=>{return ki(o)?o[n]:void 0},t);return c$(i)?i:void 0},bt=(r)=>{return r.join(".")},i$=(r,t,i)=>({namespace:Jr,channel:r,type:"REPLY",callId:t,isError:!0,...i instanceof Error?{value:b6(i),isSerializedErrorInstance:!0}:{value:i}}),z6=(r,t,i,o)=>{let n=!1,e=async(l)=>{if(n)return;if(!u$(l))return;o?.(`Received ${bt(l.methodPath)}() call`,l);let{methodPath:u,args:g,id:c}=l,b,v;try{let h=f6(u,t);if(!h)throw new _r("METHOD_NOT_FOUND",`Method \`${bt(u)}\` is not found.`);let m=await h(...g);if(m instanceof $6)v=m.transferables,m=await m.value;b={namespace:Jr,channel:i,type:"REPLY",callId:c,value:m}}catch(h){b=i$(i,c,h)}if(n)return;try{o?.(`Sending ${bt(u)}() reply`,b),r.sendMessage(b,v)}catch(h){if(h.name==="DataCloneError")b=i$(i,c,h),o?.(`Sending ${bt(u)}() reply`,b),r.sendMessage(b);throw h}};return r.addMessageHandler(e),()=>{n=!0,r.removeMessageHandler(e)}},D6=z6,m$=crypto.randomUUID?.bind(crypto)??(()=>new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")),_6=Symbol("CallOptions"),j6=class{transferables;timeout;#r=_6;constructor(r){this.transferables=r?.transferables,this.timeout=r?.timeout}},O6=j6,p6=new Set(["apply","call","bind"]),v$=(r,t,i=[])=>{return new Proxy(i.length?()=>{}:Object.create(null),{get(o,n){if(n==="then")return;if(i.length&&p6.has(n))return Reflect.get(o,n);return v$(r,t,[...i,n])},apply(o,n,e){return r(i,e)}})},o$=(r)=>{return new _r("CONNECTION_DESTROYED",`Method call ${bt(r)}() failed due to destroyed connection`)},I6=(r,t,i)=>{let o=!1,n=new Map,e=(g)=>{if(!g$(g))return;let{callId:c,value:b,isError:v,isSerializedErrorInstance:h}=g,m=n.get(c);if(!m)return;if(n.delete(c),i?.(`Received ${bt(m.methodPath)}() call`,g),v)m.reject(h?m6(b):b);else m.resolve(b)};return r.addMessageHandler(e),{remoteProxy:v$((g,c)=>{if(o)throw o$(g);let b=m$(),v=c[c.length-1],h=v instanceof O6,{timeout:m,transferables:w}=h?v:{},_=h?c.slice(0,-1):c;return new Promise((p,j)=>{let J=m!==void 0?window.setTimeout(()=>{n.delete(b),j(new _r("METHOD_CALL_TIMEOUT",`Method call ${bt(g)}() timed out after ${m}ms`))},m):void 0;n.set(b,{methodPath:g,resolve:p,reject:j,timeoutId:J});try{let V={namespace:Jr,channel:t,type:"CALL",id:b,methodPath:g,args:_};i?.(`Sending ${bt(g)}() call`,V),r.sendMessage(V,w)}catch(V){j(new _r("TRANSMISSION_FAILED",V.message))}})},i),destroy:()=>{o=!0,r.removeMessageHandler(e);for(let{methodPath:g,reject:c,timeoutId:b}of n.values())clearTimeout(b),c(o$(g));n.clear()}}},a6=I6,U6=()=>{let r,t;return{promise:new Promise((o,n)=>{r=o,t=n}),resolve:r,reject:t}},k6=U6,J6=class extends Error{constructor(r){super(`You've hit a bug in Penpal. Please file an issue with the following information: ${r}`)}},Et=J6,Xe="deprecated-penpal",X6=(r)=>{return ki(r)&&"penpal"in r},q6=(r)=>r.split("."),e$=(r)=>r.join("."),h$=(r)=>{return new Et(`Unexpected message to translate: ${JSON.stringify(r)}`)},P6=(r)=>{if(r.penpal==="syn")return{namespace:Jr,channel:void 0,type:"SYN",participantId:Xe};if(r.penpal==="ack")return{namespace:Jr,channel:void 0,type:"ACK2"};if(r.penpal==="call")return{namespace:Jr,channel:void 0,type:"CALL",id:r.id,methodPath:q6(r.methodName),args:r.args};if(r.penpal==="reply")if(r.resolution==="fulfilled")return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,value:r.returnValue};else return{namespace:Jr,channel:void 0,type:"REPLY",callId:r.id,isError:!0,...r.returnValueIsError?{value:r.returnValue,isSerializedErrorInstance:!0}:{value:r.returnValue}};throw h$(r)},W6=(r)=>{if(Ji(r))return{penpal:"synAck",methodNames:r.methodPaths.map(e$)};if(u$(r))return{penpal:"call",id:r.id,methodName:e$(r.methodPath),args:r.args};if(g$(r))if(r.isError)return{penpal:"reply",id:r.callId,resolution:"rejected",...r.isSerializedErrorInstance?{returnValue:r.value,returnValueIsError:!0}:{returnValue:r.value}};else return{penpal:"reply",id:r.callId,resolution:"fulfilled",returnValue:r.value};throw h$(r)},K6=({messenger:r,methods:t,timeout:i,channel:o,log:n})=>{let e=m$(),l,u=[],g=!1,c=b$(t),{promise:b,resolve:v,reject:h}=k6(),m=i!==void 0?setTimeout(()=>{h(new _r("CONNECTION_TIMEOUT",`Connection timed out after ${i}ms`))},i):void 0,w=()=>{for(let W of u)W()},_=()=>{if(g)return;u.push(D6(r,t,o,n));let{remoteProxy:W,destroy:Q}=a6(r,o,n);u.push(Q),clearTimeout(m),g=!0,v({remoteProxy:W,destroy:w})},p=()=>{let W={namespace:Jr,type:"SYN",channel:o,participantId:e};n?.("Sending handshake SYN",W);try{r.sendMessage(W)}catch(Q){h(new _r("TRANSMISSION_FAILED",Q.message))}},j=(W)=>{if(n?.("Received handshake SYN",W),W.participantId===l&&l!==Xe)return;if(l=W.participantId,p(),!(e>l||l===Xe))return;let B={namespace:Jr,channel:o,type:"ACK1",methodPaths:c};n?.("Sending handshake ACK1",B);try{r.sendMessage(B)}catch(tr){h(new _r("TRANSMISSION_FAILED",tr.message));return}},J=(W)=>{n?.("Received handshake ACK1",W);let Q={namespace:Jr,channel:o,type:"ACK2"};n?.("Sending handshake ACK2",Q);try{r.sendMessage(Q)}catch(B){h(new _r("TRANSMISSION_FAILED",B.message));return}_()},V=(W)=>{n?.("Received handshake ACK2",W),_()},q=(W)=>{if(Yt(W))j(W);if(Ji(W))J(W);if(zn(W))V(W)};return r.addMessageHandler(q),u.push(()=>r.removeMessageHandler(q)),p(),b},L6=K6,V6=(r)=>{let t=!1,i;return(...o)=>{if(!t)t=!0,i=r(...o);return i}},Y6=V6,l$=new WeakSet,E6=({messenger:r,methods:t={},timeout:i,channel:o,log:n})=>{if(!r)throw new _r("INVALID_ARGUMENT","messenger must be defined");if(l$.has(r))throw new _r("INVALID_ARGUMENT","A messenger can only be used for a single connection");l$.add(r);let e=[r.destroy],l=Y6((c)=>{if(c){let b={namespace:Jr,channel:o,type:"DESTROY"};try{r.sendMessage(b)}catch(v){}}for(let b of e)b();n?.("Connection destroyed")}),u=(c)=>{return x6(c)&&c.channel===o};return{promise:(async()=>{try{r.initialize({log:n,validateReceivedMessage:u}),r.addMessageHandler((v)=>{if(w6(v))l(!1)});let{remoteProxy:c,destroy:b}=await L6({messenger:r,methods:t,timeout:i,channel:o,log:n});return e.push(b),c}catch(c){throw l(!0),c}})(),destroy:()=>{l(!0)}}},$$=E6,Q6=class{#r;#o;#n;#t;#l;#i=new Set;#e;#c=!1;constructor({remoteWindow:r,allowedOrigins:t}){if(!r)throw new _r("INVALID_ARGUMENT","remoteWindow must be defined");this.#r=r,this.#o=t?.length?t:[window.origin]}initialize=({log:r,validateReceivedMessage:t})=>{this.#n=r,this.#t=t,window.addEventListener("message",this.#m)};sendMessage=(r,t)=>{if(Yt(r)){let i=this.#u(r);this.#r.postMessage(r,{targetOrigin:i,transfer:t});return}if(Ji(r)||this.#c){let i=this.#c?W6(r):r,o=this.#u(r);this.#r.postMessage(i,{targetOrigin:o,transfer:t});return}if(zn(r)){let{port1:i,port2:o}=new MessageChannel;this.#e=i,i.addEventListener("message",this.#g),i.start();let n=[o,...t||[]],e=this.#u(r);this.#r.postMessage(r,{targetOrigin:e,transfer:n});return}if(this.#e){this.#e.postMessage(r,{transfer:t});return}throw new Et("Port is undefined")};addMessageHandler=(r)=>{this.#i.add(r)};removeMessageHandler=(r)=>{this.#i.delete(r)};destroy=()=>{window.removeEventListener("message",this.#m),this.#b(),this.#i.clear()};#v=(r)=>{return this.#o.some((t)=>t instanceof RegExp?t.test(r):t===r||t==="*")};#u=(r)=>{if(Yt(r))return"*";if(!this.#l)throw new Et("Concrete remote origin not set");return this.#l==="null"&&this.#o.includes("*")?"*":this.#l};#b=()=>{this.#e?.removeEventListener("message",this.#g),this.#e?.close(),this.#e=void 0};#m=({source:r,origin:t,ports:i,data:o})=>{if(r!==this.#r)return;if(X6(o))this.#n?.("Please upgrade the child window to the latest version of Penpal."),this.#c=!0,o=P6(o);if(!this.#t?.(o))return;if(!this.#v(t)){this.#n?.(`Received a message from origin \`${t}\` which did not match allowed origins \`[${this.#o.join(", ")}]\``);return}if(Yt(o))this.#b(),this.#l=t;if(zn(o)&&!this.#c){if(this.#e=i[0],!this.#e)throw new Et("No port received on ACK2");this.#e.addEventListener("message",this.#g),this.#e.start()}for(let n of this.#i)n(o)};#g=({data:r})=>{if(!this.#t?.(r))return;for(let t of this.#i)t(r)}},x$=Q6,nU=class{#r;#o;#n=new Set;#t;constructor({worker:r}){if(!r)throw new _r("INVALID_ARGUMENT","worker must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#i)};sendMessage=(r,t)=>{if(Yt(r)||Ji(r)){this.#r.postMessage(r,{transfer:t});return}if(zn(r)){let{port1:i,port2:o}=new MessageChannel;this.#t=i,i.addEventListener("message",this.#i),i.start(),this.#r.postMessage(r,{transfer:[o,...t||[]]});return}if(this.#t){this.#t.postMessage(r,{transfer:t});return}throw new Et("Port is undefined")};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#i),this.#l(),this.#n.clear()};#l=()=>{this.#t?.removeEventListener("message",this.#i),this.#t?.close(),this.#t=void 0};#i=({ports:r,data:t})=>{if(!this.#o?.(t))return;if(Yt(t))this.#l();if(zn(t)){if(this.#t=r[0],!this.#t)throw new Et("No port received on ACK2");this.#t.addEventListener("message",this.#i),this.#t.start()}for(let i of this.#n)i(t)}};var iU=class{#r;#o;#n=new Set;constructor({port:r}){if(!r)throw new _r("INVALID_ARGUMENT","port must be defined");this.#r=r}initialize=({validateReceivedMessage:r})=>{this.#o=r,this.#r.addEventListener("message",this.#t),this.#r.start()};sendMessage=(r,t)=>{this.#r?.postMessage(r,{transfer:t})};addMessageHandler=(r)=>{this.#n.add(r)};removeMessageHandler=(r)=>{this.#n.delete(r)};destroy=()=>{this.#r.removeEventListener("message",this.#t),this.#r.close(),this.#n.clear()};#t=({data:r})=>{if(!this.#o?.(r))return;for(let t of this.#n)t(r)}};var w$=["SCRIPT","STYLE","LINK","META","NOSCRIPT"],f$=new Set(["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","h1","h2","h3","h4","h5","h6","i","iframe","img","input","ins","kbd","label","li","map","mark","meter","noscript","object","output","p","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr"]);var qe=".next-prod";var _U={SCALE:0.7,PAN_POSITION:{x:175,y:100},URL:"http://localhost:3000/",FRAME_POSITION:{x:0,y:0},FRAME_DIMENSION:{width:1536,height:960},ASPECT_RATIO_LOCKED:!1,DEVICE:"Custom:Custom",THEME:"system",ORIENTATION:"Portrait",MIN_DIMENSIONS:{width:"280px",height:"360px"},COMMANDS:{run:"bun run dev",build:"bun run build",install:"bun install"},IMAGE_FOLDER:"public",IMAGE_DIMENSION:{width:"100px",height:"100px"},FONT_FOLDER:"fonts",FONT_CONFIG:"app/fonts.ts",TAILWIND_CONFIG:"tailwind.config.ts",CHAT_SETTINGS:{showSuggestions:!0,autoApplyCode:!0,expandCodeBlocks:!1,showMiniChat:!0,maxImages:5},EDITOR_SETTINGS:{shouldWarnDelete:!1,enableBunReplace:!0,buildFlags:"--no-lint"}};var Pe=["node_modules","dist","build",".git",".next"],pU=[...Pe,"static","out",qe],IU=[...Pe,qe],aU=[...Pe,"coverage"],F6=[".jsx",".tsx"],S6=[".js",".ts",".mjs",".cjs"],UU=[...F6,...S6];var XU={["en"]:"English",["ja"]:"日本語",["zh"]:"中文",["ko"]:"한국어"};var j$=ah(Je(),1);function G(r){return document.querySelector(`[${"data-odid"}="${r}"]`)}function We(r,t=!1){let i=`[${"data-odid"}="${r}"]`;if(!t)return i;return G6(i)}function G6(r){return CSS.escape(r)}function Ot(r){return r&&r instanceof Node&&r.nodeType===Node.ELEMENT_NODE&&!w$.includes(r.tagName)&&!r.hasAttribute("data-onlook-ignore")&&r.style.display!=="none"}var N6="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var z$=(r=21)=>{let t="",i=r|0;while(i--)t+=N6[Math.random()*64|0];return t};function Xr(r){let t=r.getAttribute("data-odid");if(!t)t=`odid-${z$()}`,r.setAttribute("data-odid",t);return t}function Gr(r){return r.getAttribute("data-oid")}function Nr(r){return r.getAttribute("data-oiid")}function D$(r,t){if(!jr)return;jr.onDomProcessed({layerMap:Object.fromEntries(r),rootNode:t}).catch((i)=>{console.error("Failed to send DOM processed event:",i)})}function Ke(r){window._onlookFrameId=r}function Qt(){let r=window._onlookFrameId;if(!r)return console.warn("Frame id not found"),jr?.getFrameId().then((t)=>{Ke(t)}),"";return r}function B6(r=document.body){if(!Qt())return console.warn("frameView id not found, skipping dom processing"),null;let i=zr(r);if(!i)return console.warn("Error building layer tree, root element is null"),null;let o=r.getAttribute("data-odid");if(!o)return console.warn("Root dom id not found"),null;let n=i.get(o);if(!n)return console.warn("Root node not found"),null;return D$(i,n),{rootDomId:o,layerMap:Array.from(i.entries())}}var Xi=j$.default(B6,500),y6=[(r)=>{let t=r.parentElement;return t&&t.tagName.toLowerCase()==="svg"},(r)=>{return r.tagName.toLowerCase()==="next-route-announcer"},(r)=>{return r.tagName.toLowerCase()==="nextjs-portal"}];function zr(r){if(!Ot(r))return null;let t=new Map,i=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:(e)=>{let l=e;if(y6.some((u)=>u(l)))return NodeFilter.FILTER_REJECT;return Ot(l)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),o=_$(r);o.children=[],t.set(o.domId,o);let n=i.nextNode();while(n){let e=_$(n);e.children=[];let l=n.parentElement;if(l){let u=l.getAttribute("data-odid");if(u){e.parent=u;let g=t.get(u);if(g&&g.children)g.children.push(e.domId)}}t.set(e.domId,e),n=i.nextNode()}return t}function _$(r){let t=Xr(r),i=Gr(r),o=Nr(r),n=Array.from(r.childNodes).map((g)=>g.nodeType===Node.TEXT_NODE?g.textContent:"").join(" ").trim().slice(0,500),e=window.getComputedStyle(r),l=r.getAttribute("data-ocname");return{domId:t,oid:i||null,instanceId:o||null,textContent:n||"",tagName:r.tagName.toLowerCase(),isVisible:e.visibility!=="hidden",component:l||null,frameId:Qt(),children:null,parent:null,dynamicType:null,coreElementType:null}}function Le(r){throw new Error(`Expected \`never\`, found: ${JSON.stringify(r)}`)}var O$=(r)=>JSON.parse(JSON.stringify(r));function p$(r){let t=a$(r),i=A6(r),o=H6(r);return{defined:{width:"auto",height:"auto",...i,...o},computed:t}}function I$(r){let t=G(r);if(!t)return{};return a$(t)}function a$(r){return O$(window.getComputedStyle(r))}function A6(r){let t={},i=U$(r.style.cssText);return Object.entries(i).forEach(([o,n])=>{t[o]=n}),t}function H6(r){let t={},i=document.styleSheets;for(let o=0;ot[c]=b)}}catch(u){console.warn("Error",u)}}return t}function U$(r){let t={};return r.split(";").forEach((i)=>{if(i=i.trim(),!i)return;let[o,...n]=i.split(":");t[o?.trim()??""]=n.join(":").trim()}),t}var k$=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},lr=(r,t)=>{let i=r.parentElement,o=i?{domId:i.getAttribute("data-odid"),frameId:Qt(),oid:i.getAttribute("data-oid"),instanceId:i.getAttribute("data-oiid"),rect:i.getBoundingClientRect()}:null,n=r.getBoundingClientRect(),e=t?p$(r):null;return{domId:r.getAttribute("data-odid"),oid:r.getAttribute("data-oid"),frameId:Qt(),instanceId:r.getAttribute("data-oiid"),rect:n,tagName:r.tagName,parent:o,styles:e}};function qi(r){try{let t=r.getAttribute("data-onlook-drag-saved-style");if(t){let i=JSON.parse(t);for(let o in i)r.style[o]=i[o]}}catch(t){console.warn("Error restoring style",t)}}function J$(r){let t=r.parentElement;if(!t)return;return{type:"index",targetDomId:t.getAttribute("data-odid"),targetOid:Nr(t)||Gr(t)||null,index:Array.from(r.parentElement?.children||[]).indexOf(r),originalIndex:Array.from(r.parentElement?.children||[]).indexOf(r)}}var X$=(r)=>{let t=Array.from(r.childNodes).filter((i)=>i.nodeType===Node.TEXT_NODE).map((i)=>i.textContent);if(t.length===0)return;return t.join("")};var Pi=(r,t)=>{let i=G(r)||document.body;return lr(i,t)},q$=(r,t,i)=>{let o=R6(r,t)||document.body;return lr(o,i)},R6=(r,t)=>{let i=document.elementFromPoint(r,t);if(!i)return;let o=(e)=>{if(e?.shadowRoot){let l=e.shadowRoot.elementFromPoint(r,t);if(l==e)return e;else if(l?.shadowRoot)return o(l);else return l||e}else return e};return o(i)||i},P$=(r,t,i)=>{let o=G(r);if(!o){console.warn("Failed to updateElementInstanceId: Element not found");return}o.setAttribute("data-oiid",t),o.setAttribute("data-ocname",i)},W$=(r)=>{let t=G(r);if(!t?.parentElement)return null;return lr(t.parentElement,!1)},K$=(r)=>{let t=G(r);if(!t)return 0;return t.children.length},L$=(r)=>{let t=G(r);if(!t)return null;return lr(t.offsetParent,!1)};function V$(r,t,i){let o=G(r.domId);if(!o)return console.warn("Failed to find parent element",r.domId),null;let n=M6(t),e=new Set(i.map((c)=>c.domId)),l=Array.from(o.children).map((c,b)=>({element:c,index:b,domId:Xr(c)})).filter(({domId:c})=>e.has(c));if(l.length===0)return console.warn("No valid children found to group"),null;let u=Math.min(...l.map((c)=>c.index));return o.insertBefore(n,o.children[u]??null),l.forEach(({element:c})=>{let b=c.cloneNode(!0);b.setAttribute("data-onlook-inserted","true"),n.appendChild(b),c.style.display="none",E$(c)}),{domEl:lr(n,!0),newMap:zr(n)}}function Y$(r,t){let i=G(r.domId);if(!i)return console.warn(`Parent element not found: ${r.domId}`),null;let o;if(t.domId)o=G(t.domId);else return console.warn("Container domId is required for ungrouping"),null;if(!o)return console.warn("Container element not found for ungrouping"),null;return Array.from(o.children).forEach((l)=>{i.appendChild(l)}),o.remove(),{domEl:lr(i,!0),newMap:zr(i)}}function M6(r){let t=document.createElement(r.tagName);return Object.entries(r.attributes).forEach(([i,o])=>{t.setAttribute(i,o)}),t.setAttribute("data-onlook-inserted","true"),t.setAttribute("data-odid",r.domId),t.setAttribute("data-oid",r.oid),t}function E$(r){r.removeAttribute("data-odid"),r.removeAttribute("data-oid"),r.removeAttribute("data-onlook-inserted");let t=Array.from(r.children);if(t.length===0)return;t.forEach((i)=>{E$(i)})}function Wi(r){let t=G(r);if(!t)return console.warn("Element not found for domId:",r),null;return Q$(t)}function Q$(r){let t=Array.from(r.attributes).reduce((o,n)=>{return o[n.name]=n.value,o},{}),i=Nr(r)||Gr(r)||null;if(!i)return console.warn("Element has no oid"),null;return{oid:i,domId:Xr(r),tagName:r.tagName.toLowerCase(),children:Array.from(r.children).map((o)=>Q$(o)).filter(Boolean),attributes:t,textContent:X$(r)||null,styles:{}}}function F$(r){let t=G(r);if(!t)throw new Error("Element not found for domId: "+r);let i=t.parentElement;if(!i)throw new Error("Inserted element has no parent");let o=Nr(i)||Gr(i);if(!o)return console.warn("Parent element has no oid"),null;let n=Xr(i),e=Array.from(i.children).indexOf(t);if(e===-1)return{type:"append",targetDomId:n,targetOid:o};return{type:"index",targetDomId:n,targetOid:o,index:e,originalIndex:e}}function S$(r){let t=document.querySelector(`[${"data-odid"}="${r}"]`);if(!t)return console.warn("No element found",{domId:r}),{dynamicType:null,coreType:null};let i=t.getAttribute("data-onlook-dynamic-type")||null,o=t.getAttribute("data-onlook-core-element-type")||null;return{dynamicType:i,coreType:o}}function G$(r,t,i){let o=document.querySelector(`[${"data-odid"}="${r}"]`);if(o){if(t)o.setAttribute("data-onlook-dynamic-type",t);if(i)o.setAttribute("data-onlook-core-element-type",i)}}function N$(){let t=document.body.querySelector(`[${"data-oid"}]`);if(t)return lr(t,!0);return null}var Qr=0,f=1,U=2,R=3,S=4,gr=5,Ft=6,er=7,wr=8,X=9,k=10,y=11,P=12,Y=13,dr=14,hr=15,d=16,nr=17,ir=18,br=19,fr=20,K=21,I=22,Z=23,xr=24,A=25;function cr(r){return r>=48&&r<=57}function Ir(r){return cr(r)||r>=65&&r<=70||r>=97&&r<=102}function Vi(r){return r>=65&&r<=90}function Z6(r){return r>=97&&r<=122}function C6(r){return Vi(r)||Z6(r)}function T6(r){return r>=128}function Li(r){return C6(r)||T6(r)||r===95}function Dn(r){return Li(r)||cr(r)||r===45}function d6(r){return r>=0&&r<=8||r===11||r>=14&&r<=31||r===127}function _n(r){return r===10||r===13||r===12}function Br(r){return _n(r)||r===32||r===9}function Or(r,t){if(r!==92)return!1;if(_n(t)||t===0)return!1;return!0}function St(r,t,i){if(r===45)return Li(t)||t===45||Or(t,i);if(Li(r))return!0;if(r===92)return Or(r,t);return!1}function Yi(r,t,i){if(r===43||r===45){if(cr(t))return 2;return t===46&&cr(i)?3:0}if(r===46)return cr(t)?2:0;if(cr(r))return 1;return 0}function Ei(r){if(r===65279)return 1;if(r===65534)return 1;return 0}var Ve=new Array(128),s6=128,jn=130,Ye=131,Qi=132,Ee=133;for(let r=0;rr.length)return!1;for(let n=t;n=0;t--)if(!Br(r.charCodeAt(t)))break;return t+1}function On(r,t){for(;t=55296&&t<=57343||t>1114111)t=65533;return String.fromCodePoint(t)}var Nt=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function Bt(r=null,t){if(r===null||r.length0?Ei(t.charCodeAt(0)):0,n=Bt(r.lines,i),e=Bt(r.columns,i),l=r.startLine,u=r.startColumn;for(let g=o;g{}){r=String(r||"");let i=r.length,o=Bt(this.offsetAndType,r.length+1),n=Bt(this.balance,r.length+1),e=0,l=-1,u=0,g=r.length;this.offsetAndType=null,this.balance=null,n.fill(0),t(r,(c,b,v)=>{let h=e++;if(o[h]=c<>Hr]}else if(R$(c))g=h,u=It[c]}),o[e]=Qr<e)n[c]=e}this.source=r,this.firstCharOffset=l===-1?0:l,this.tokenCount=e,this.offsetAndType=o,this.balance=n,this.reset(),this.next()}lookupType(r){if(r+=this.tokenIndex,r>Hr;return Qr}lookupTypeNonSC(r){for(let t=this.tokenIndex;t>Hr;if(i!==Y&&i!==A){if(r--===0)return i}}return Qr}lookupOffset(r){if(r+=this.tokenIndex,r>Hr;if(i!==Y&&i!==A){if(r--===0)return t-this.tokenIndex}}return Qr}lookupValue(r,t){if(r+=this.tokenIndex,r0)return r>Hr,this.tokenEnd=t&Ar;else this.tokenIndex=this.tokenCount,this.next()}next(){let r=this.tokenIndex+1;if(r>Hr,this.tokenEnd=r&Ar;else this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Qr,this.tokenStart=this.tokenEnd=this.source.length}skipSC(){while(this.tokenType===Y||this.tokenType===A)this.next()}skipUntilBalanced(r,t){let i=r,o=0,n=0;r:for(;i0?this.offsetAndType[i-1]&Ar:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break r;case 2:i++;break r;default:if(R$(this.offsetAndType[i]>>Hr))i=o}}this.skip(i-this.tokenIndex)}forEachToken(r){for(let t=0,i=this.firstCharOffset;t>Hr;i=e,r(l,o,e,t)}}dump(){let r=new Array(this.tokenCount);return this.forEachToken((t,i,o,n)=>{r[n]={idx:n,type:Nt[t],chunk:this.source.substring(i,o),balance:this.balance[n]}}),r}}function mt(r,t){function i(v){return v=r.length){if(cString(w+j+1).padStart(h)+" |"+p).join(` `)}let u=` `.repeat(Math.max(o-1,0)),g=" ".repeat(Math.max(n-1,0)),c=(u+g+r).split(/\r\n?|\n|\f/),b=Math.max(1,t-e)-1,v=Math.min(t+e,c.length+1),h=Math.max(4,String(v).length)+1,m=0;if(i+=(Z$.length-1)*(c[t-1].substr(0,i-1).match(/\t/g)||[]).length,i>Fe)m=i-M$+3,i=M$-2;for(let w=b;w<=v;w++)if(w>=0&&w0&&c[w].length>m?"…":"")+c[w].substr(m,Fe-2)+(c[w].length>m+Fe-1?"…":"");return[l(b,t),new Array(i+h+2).join("-")+"^",l(t,v)].filter(Boolean).join(` -`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Ge(r,t,i,o,n,e=1,l=1){return Object.assign(Ut("SyntaxError",r),{source:t,offset:i,line:o,column:n,sourceFragment(g){return C$({source:t,line:o,column:n,baseLine:e,baseColumn:l},isNaN(g)?0:g)},get formattedMessage(){return`Parse error: ${r} -`+C$({source:t,line:o,column:n,baseLine:e,baseColumn:l},2)}})}function T$(r){let t=this.createList(),i=!1,o={recognizer:r};while(!this.eof){switch(this.tokenType){case A:this.next();continue;case Y:i=!0,this.next();continue}let n=r.getNode.call(this,o);if(n===void 0)break;if(i){if(r.onWhiteSpace)r.onWhiteSpace.call(this,n,t,o);i=!1}t.push(n)}if(i&&r.onWhiteSpace)r.onWhiteSpace.call(this,null,t,o);return t}var d$=()=>{},tz=33,nz=35,Se=59,s$=123,r0=0;function iz(r){return function(){return this[r]()}}function Ne(r){let t=Object.create(null);for(let i of Object.keys(r)){let o=r[i],n=o.parse||o;if(n)t[i]=n}return t}function oz(r){let t={context:Object.create(null),features:Object.assign(Object.create(null),r.features),scope:Object.assign(Object.create(null),r.scope),atrule:Ne(r.atrule),pseudo:Ne(r.pseudo),node:Ne(r.node)};for(let[i,o]of Object.entries(r.parseContext))switch(typeof o){case"function":t.context[i]=o;break;case"string":t.context[i]=iz(o);break}return{config:t,...t,...t.node}}function t0(r){let t="",i="",o=!1,n=d$,e=!1,l=new Ni,u=Object.assign(new Bi,oz(r||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:T$,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===s$?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===s$||c===Se?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===tz||c===Se?1:0},consumeUntilSemicolonIncluded(c){return c===Se?2:0},createList(){return new or},createSingleNodeList(c){return new or().appendData(c)},getFirstListNode(c){return c&&c.first},getLastListNode(c){return c&&c.last},parseWithFallback(c,b){let v=this.tokenIndex;try{return c.call(this)}catch(h){if(e)throw h;this.skip(v-this.tokenIndex);let m=b.call(this);return e=!0,n(h,m),e=!1,m}},lookupNonWSType(c){let b;do if(b=this.lookupType(c++),b!==Y&&b!==A)return b;while(b!==r0);return r0},charCodeAt(c){return c>=0&&cm.toUpperCase()),v=`${/[[\](){}]/.test(b)?`"${b}"`:b} is expected`,h=this.tokenStart;switch(c){case f:if(this.tokenType===a||this.tokenType===er)h=this.tokenEnd-1,v="Identifier is expected but function found";else v="Identifier is expected";break;case G:if(this.isDelim(nz))this.next(),h++,v="Name is expected";break;case y:if(this.tokenType===k)h=this.tokenEnd,v="Percent sign is expected";break}this.error(v,h)}this.next()},eatIdent(c){if(this.tokenType!==f||this.lookupValue(0,c)===!1)this.error(`Identifier "${c}" is expected`);this.next()},eatDelim(c){if(!this.isDelim(c))this.error(`Delim "${String.fromCharCode(c)}" is expected`);this.next()},getLocation(c,b){if(o)return l.getLocationRange(c,b,i);return null},getLocationFromList(c){if(o){let b=this.getFirstListNode(c),v=this.getLastListNode(c);return l.getLocationRange(b!==null?b.loc.start.offset-l.startOffset:this.tokenStart,v!==null?v.loc.end.offset-l.startOffset:this.tokenStart,i)}return null},error(c,b){let v=typeof b!=="undefined"&&b",o=Boolean(b.positions),n=typeof b.onParseError==="function"?b.onParseError:d$,e=!1,u.parseAtrulePrelude="parseAtrulePrelude"in b?Boolean(b.parseAtrulePrelude):!0,u.parseRulePrelude="parseRulePrelude"in b?Boolean(b.parseRulePrelude):!0,u.parseValue="parseValue"in b?Boolean(b.parseValue):!0,u.parseCustomProperty="parseCustomProperty"in b?Boolean(b.parseCustomProperty):!1;let{context:v="default",onComment:h}=b;if(v in u.context===!1)throw new Error("Unknown context `"+v+"`");if(typeof h==="function")u.forEachToken((w,_,p)=>{if(w===A){let j=u.getLocation(_,p),J=rt(t,p-2,p,"*/")?t.slice(_+2,p-2):t.slice(_+2,p);h(J,j)}});let m=u.context[v].call(u,b);if(!u.eof)u.error();return m},{SyntaxError:Ge,config:u.config})}var an=u0(),ur=yi(),Hi=$0().ArraySet,Zz=w0().MappingList;function Lr(r){if(!r)r={};this._file=ur.getArg(r,"file",null),this._sourceRoot=ur.getArg(r,"sourceRoot",null),this._skipValidation=ur.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=ur.getArg(r,"ignoreInvalidMapping",!1),this._sources=new Hi,this._names=new Hi,this._mappings=new Zz,this._sourcesContents=null}Lr.prototype._version=3;Lr.fromSourceMap=function r(t,i){var o=t.sourceRoot,n=new Lr(Object.assign(i||{},{file:t.file,sourceRoot:o}));return t.eachMapping(function(e){var l={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){if(l.source=e.source,o!=null)l.source=ur.relative(o,l.source);if(l.original={line:e.originalLine,column:e.originalColumn},e.name!=null)l.name=e.name}n.addMapping(l)}),t.sources.forEach(function(e){var l=e;if(o!==null)l=ur.relative(o,e);if(!n._sources.has(l))n._sources.add(l);var u=t.sourceContentFor(e);if(u!=null)n.setSourceContent(e,u)}),n};Lr.prototype.addMapping=function r(t){var i=ur.getArg(t,"generated"),o=ur.getArg(t,"original",null),n=ur.getArg(t,"source",null),e=ur.getArg(t,"name",null);if(!this._skipValidation){if(this._validateMapping(i,o,n,e)===!1)return}if(n!=null){if(n=String(n),!this._sources.has(n))this._sources.add(n)}if(e!=null){if(e=String(e),!this._names.has(e))this._names.add(e)}this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:n,name:e})};Lr.prototype.setSourceContent=function r(t,i){var o=t;if(this._sourceRoot!=null)o=ur.relative(this._sourceRoot,o);if(i!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[ur.toSetString(o)]=i}else if(this._sourcesContents){if(delete this._sourcesContents[ur.toSetString(o)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};Lr.prototype.applySourceMap=function r(t,i,o){var n=i;if(i==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=t.file}var e=this._sourceRoot;if(e!=null)n=ur.relative(e,n);var l=new Hi,u=new Hi;this._mappings.unsortedForEach(function(g){if(g.source===n&&g.originalLine!=null){var c=t.originalPositionFor({line:g.originalLine,column:g.originalColumn});if(c.source!=null){if(g.source=c.source,o!=null)g.source=ur.join(o,g.source);if(e!=null)g.source=ur.relative(e,g.source);if(g.originalLine=c.line,g.originalColumn=c.column,c.name!=null)g.name=c.name}}var b=g.source;if(b!=null&&!l.has(b))l.add(b);var v=g.name;if(v!=null&&!u.has(v))u.add(v)},this),this._sources=l,this._names=u,t.sources.forEach(function(g){var c=t.sourceContentFor(g);if(c!=null){if(o!=null)g=ur.join(o,g);if(e!=null)g=ur.relative(e,g);this.setSourceContent(g,c)}},this)};Lr.prototype._validateMapping=function r(t,i,o,n){if(i&&typeof i.line!=="number"&&typeof i.column!=="number"){var e="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping){if(typeof console!=="undefined"&&console.warn)console.warn(e);return!1}else throw new Error(e)}if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!i&&!o&&!n)return;else if(t&&"line"in t&&"column"in t&&i&&"line"in i&&"column"in i&&t.line>0&&t.column>=0&&i.line>0&&i.column>=0&&o)return;else{var e="Invalid mapping: "+JSON.stringify({generated:t,source:o,original:i,name:n});if(this._ignoreInvalidMapping){if(typeof console!=="undefined"&&console.warn)console.warn(e);return!1}else throw new Error(e)}};Lr.prototype._serializeMappings=function r(){var t=0,i=1,o=0,n=0,e=0,l=0,u="",g,c,b,v,h=this._mappings.toArray();for(var m=0,w=h.length;m0){if(!ur.compareByGeneratedPositionsInflated(c,h[m-1]))continue;g+=","}if(g+=an.encode(c.generatedColumn-t),t=c.generatedColumn,c.source!=null){if(v=this._sources.indexOf(c.source),g+=an.encode(v-l),l=v,g+=an.encode(c.originalLine-1-n),n=c.originalLine-1,g+=an.encode(c.originalColumn-o),o=c.originalColumn,c.name!=null)b=this._names.indexOf(c.name),g+=an.encode(b-e),e=b}u+=g}return u};Lr.prototype._generateSourcesContent=function r(t,i){return t.map(function(o){if(!this._sourcesContents)return null;if(i!=null)o=ur.relative(i,o);var n=ur.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Lr.prototype.toJSON=function r(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)t.file=this._file;if(this._sourceRoot!=null)t.sourceRoot=this._sourceRoot;if(this._sourcesContents)t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot);return t};Lr.prototype.toString=function r(){return JSON.stringify(this.toJSON())};var Re=Lr;var f0=new Set(["Atrule","Selector","Declaration"]);function z0(r){let t=new Re,i={line:1,column:0},o={line:0,column:0},n={line:1,column:0},e={generated:n},l=1,u=0,g=!1,c=r.node;r.node=function(h){if(h.loc&&h.loc.start&&f0.has(h.type)){let m=h.loc.start.line,w=h.loc.start.column-1;if(o.line!==m||o.column!==w){if(o.line=m,o.column=w,i.line=l,i.column=u,g){if(g=!1,i.line!==n.line||i.column!==n.column)t.addMapping(e)}g=!0,t.addMapping({source:h.loc.source,original:o,generated:i})}}if(c.call(this,h),g&&f0.has(h.type))n.line=l,n.column=u};let b=r.emit;r.emit=function(h,m,w){for(let _=0;_sz,safe:()=>Ze});var Cz=43,Tz=45,Me=(r,t)=>{if(r===X)r=t;if(typeof r==="string"){let i=r.charCodeAt(0);return i>127?32768:i<<8}return r},D0=[[f,f],[f,a],[f,er],[f,wr],[f,"-"],[f,k],[f,y],[f,W],[f,hr],[f,K],[R,f],[R,a],[R,er],[R,wr],[R,"-"],[R,k],[R,y],[R,W],[R,hr],[G,f],[G,a],[G,er],[G,wr],[G,"-"],[G,k],[G,y],[G,W],[G,hr],[W,f],[W,a],[W,er],[W,wr],[W,"-"],[W,k],[W,y],[W,W],[W,hr],["#",f],["#",a],["#",er],["#",wr],["#","-"],["#",k],["#",y],["#",W],["#",hr],["-",f],["-",a],["-",er],["-",wr],["-","-"],["-",k],["-",y],["-",W],["-",hr],[k,f],[k,a],[k,er],[k,wr],[k,k],[k,y],[k,W],[k,"%"],[k,hr],["@",f],["@",a],["@",er],["@",wr],["@","-"],["@",hr],[".",k],[".",y],[".",W],["+",k],["+",y],["+",W],["/","*"]],dz=D0.concat([[f,G],[W,G],[G,G],[R,K],[R,gr],[R,d],[y,y],[y,W],[y,a],[y,"-"],[I,f],[I,a],[I,y],[I,W],[I,G],[I,"-"]]);function _0(r){let t=new Set(r.map(([i,o])=>Me(i)<<16|Me(o)));return function(i,o,n){let e=Me(o,n),l=n.charCodeAt(0);if(l===Tz&&o!==f&&o!==a&&o!==hr||l===Cz?t.has(i<<16|l<<8):t.has(i<<16|e))this.emit(" ",Y,!0);return e}}var sz=_0(D0),Ze=_0(dz);var r1=92;function t1(r,t){if(typeof t==="function"){let i=null;r.children.forEach((o)=>{if(i!==null)t.call(this,i);this.node(o),i=o});return}r.children.forEach(this.node,this)}function n1(r){mt(r,(t,i,o)=>{this.token(t,r.slice(i,o))})}function j0(r){let t=new Map;for(let[i,o]of Object.entries(r.node))if(typeof(o.generate||o)==="function")t.set(i,o.generate||o);return function(i,o){let n="",e=0,l={node(g){if(t.has(g.type))t.get(g.type).call(u,g);else throw new Error("Unknown node type: "+g.type)},tokenBefore:Ze,token(g,c){if(e=this.tokenBefore(e,g,c),this.emit(c,g,!1),g===X&&c.charCodeAt(0)===r1)this.emit(` -`,Y,!0)},emit(g){n+=g},result(){return n}};if(o){if(typeof o.decorator==="function")l=o.decorator(l);if(o.sourceMap)l=z0(l);if(o.mode in Ri)l.tokenBefore=Ri[o.mode]}let u={node:(g)=>l.node(g),children:t1,token:(g,c)=>l.token(g,c),tokenize:n1};return l.node(i),l.result()}}function O0(r){return{fromPlainObject(t){return r(t,{enter(i){if(i.children&&i.children instanceof or===!1)i.children=new or().fromArray(i.children)}}),t},toPlainObject(t){return r(t,{leave(i){if(i.children&&i.children instanceof or)i.children=i.children.toArray()}}),t}}}var{hasOwnProperty:Ce}=Object.prototype,kn=function(){};function p0(r){return typeof r==="function"?r:kn}function I0(r,t){return function(i,o,n){if(i.type===t)r.call(this,i,o,n)}}function i1(r,t){let i=t.structure,o=[];for(let n in i){if(Ce.call(i,n)===!1)continue;let e=i[n],l={name:n,type:!1,nullable:!1};if(!Array.isArray(e))e=[e];for(let u of e)if(u===null)l.nullable=!0;else if(typeof u==="string")l.type="node";else if(Array.isArray(u))l.type="list";if(l.type)o.push(l)}if(o.length)return{context:t.walkContext,fields:o};return null}function o1(r){let t={};for(let i in r.node)if(Ce.call(r.node,i)){let o=r.node[i];if(!o.structure)throw new Error("Missed `structure` field in `"+i+"` node type definition");t[i]=i1(i,o)}return t}function U0(r,t){let i=r.fields.slice(),o=r.context,n=typeof o==="string";if(t)i.reverse();return function(e,l,u,g){let c;if(n)c=l[o],l[o]=e;for(let b of i){let v=e[b.name];if(!b.nullable||v){if(b.type==="list"){if(t?v.reduceRight(g,!1):v.reduce(g,!1))return!0}else if(u(v))return!0}}if(n)l[o]=c}}function a0({StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}){return{Atrule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Rule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Declaration:{StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}}}function k0(r){let t=o1(r),i={},o={},n=Symbol("break-walk"),e=Symbol("skip-node");for(let c in t)if(Ce.call(t,c)&&t[c]!==null)i[c]=U0(t[c],!1),o[c]=U0(t[c],!0);let l=a0(i),u=a0(o),g=function(c,b){function v(j,J,V){let q=h.call(p,j,J,V);if(q===n)return!0;if(q===e)return!1;if(w.hasOwnProperty(j.type)){if(w[j.type](j,p,v,_))return!0}if(m.call(p,j,J,V)===n)return!0;return!1}let h=kn,m=kn,w=i,_=(j,J,V,q)=>j||v(J,V,q),p={break:n,skip:e,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof b==="function")h=b;else if(b){if(h=p0(b.enter),m=p0(b.leave),b.reverse)w=o;if(b.visit){if(l.hasOwnProperty(b.visit))w=b.reverse?u[b.visit]:l[b.visit];else if(!t.hasOwnProperty(b.visit))throw new Error("Bad value `"+b.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=I0(h,b.visit),m=I0(m,b.visit)}}if(h===kn&&m===kn)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");v(c)};return g.break=n,g.skip=e,g.find=function(c,b){let v=null;return g(c,function(h,m,w){if(b.call(this,h,m,w))return v=h,n}),v},g.findLast=function(c,b){let v=null;return g(c,{reverse:!0,enter(h,m,w){if(b.call(this,h,m,w))return v=h,n}}),v},g.findAll=function(c,b){let v=[];return g(c,function(h,m,w){if(b.call(this,h,m,w))v.push(h)}),v},g}function e1(r){return r}function l1(r){let{min:t,max:i,comma:o}=r;if(t===0&&i===0)return o?"#?":"*";if(t===0&&i===1)return"?";if(t===1&&i===0)return o?"#":"+";if(t===1&&i===1)return"";return(o?"#":"")+(t===i?"{"+t+"}":"{"+t+","+(i!==0?i:"")+"}")}function c1(r){switch(r.type){case"Range":return" ["+(r.min===null?"-∞":r.min)+","+(r.max===null?"∞":r.max)+"]";default:throw new Error("Unknown node type `"+r.type+"`")}}function u1(r,t,i,o){let n=r.combinator===" "||o?r.combinator:" "+r.combinator+" ",e=r.terms.map((l)=>Mi(l,t,i,o)).join(n);if(r.explicit||i)return(o||e[0]===","?"[":"[ ")+e+(o?"]":" ]");return e}function Mi(r,t,i,o){let n;switch(r.type){case"Group":n=u1(r,t,i,o)+(r.disallowEmpty?"!":"");break;case"Multiplier":return Mi(r.term,t,i,o)+t(l1(r),r);case"Boolean":n="";break;case"Type":n="<"+r.name+(r.opts?t(c1(r.opts),r.opts):"")+">";break;case"Property":n="<'"+r.name+"'>";break;case"Keyword":n=r.name;break;case"AtKeyword":n="@"+r.name;break;case"Function":n=r.name+"(";break;case"String":case"Token":n=r.value;break;case"Comma":n=",";break;default:throw new Error("Unknown node type `"+r.type+"`")}return t(n,r)}function Ht(r,t){let i=e1,o=!1,n=!1;if(typeof t==="function")i=t;else if(t){if(o=Boolean(t.forceBraces),n=Boolean(t.compact),typeof t.decorate==="function")i=t.decorate}return Mi(r,i,o,n)}var J0={offset:0,line:1,column:1};function g1(r,t){let{tokens:i,longestMatch:o}=r,n=o1)b=Zi(e||t,"end")||Jn(J0,c),v=Jn(b);else b=Zi(e,"start")||Jn(Zi(t,"start")||J0,c.slice(0,l)),v=Zi(e,"end")||Jn(b,c.substr(l,u));return{css:c,mismatchOffset:l,mismatchLength:u,start:b,end:v}}function Zi(r,t){let i=r&&r.loc&&r.loc[t];if(i)return"line"in i?Jn(i):i;return null}function Jn({offset:r,line:t,column:i},o){let n={offset:r,line:t,column:i};if(o){let e=o.split(/\n|\r\n?|\f/);n.offset+=o.length,n.line+=e.length-1,n.column=e.length===1?n.column+o.length:e.pop().length+1}return n}var Rt=function(r,t){let i=Ut("SyntaxReferenceError",r+(t?" `"+t+"`":""));return i.reference=t,i},X0=function(r,t,i,o){let n=Ut("SyntaxMatchError",r),{css:e,mismatchOffset:l,mismatchLength:u,start:g,end:c}=g1(o,i);return n.rawMessage=r,n.syntax=t?Ht(t):"",n.css=e,n.mismatchOffset=l,n.mismatchLength=u,n.message=r+` +`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Se(r,t,i,o,n,e=1,l=1){return Object.assign(at("SyntaxError",r),{source:t,offset:i,line:o,column:n,sourceFragment(g){return C$({source:t,line:o,column:n,baseLine:e,baseColumn:l},isNaN(g)?0:g)},get formattedMessage(){return`Parse error: ${r} +`+C$({source:t,line:o,column:n,baseLine:e,baseColumn:l},2)}})}function T$(r){let t=this.createList(),i=!1,o={recognizer:r};while(!this.eof){switch(this.tokenType){case A:this.next();continue;case Y:i=!0,this.next();continue}let n=r.getNode.call(this,o);if(n===void 0)break;if(i){if(r.onWhiteSpace)r.onWhiteSpace.call(this,n,t,o);i=!1}t.push(n)}if(i&&r.onWhiteSpace)r.onWhiteSpace.call(this,null,t,o);return t}var d$=()=>{},tz=33,nz=35,Ge=59,s$=123,r0=0;function iz(r){return function(){return this[r]()}}function Ne(r){let t=Object.create(null);for(let i of Object.keys(r)){let o=r[i],n=o.parse||o;if(n)t[i]=n}return t}function oz(r){let t={context:Object.create(null),features:Object.assign(Object.create(null),r.features),scope:Object.assign(Object.create(null),r.scope),atrule:Ne(r.atrule),pseudo:Ne(r.pseudo),node:Ne(r.node)};for(let[i,o]of Object.entries(r.parseContext))switch(typeof o){case"function":t.context[i]=o;break;case"string":t.context[i]=iz(o);break}return{config:t,...t,...t.node}}function t0(r){let t="",i="",o=!1,n=d$,e=!1,l=new Ni,u=Object.assign(new Bi,oz(r||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:T$,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===s$?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===s$||c===Ge?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===tz||c===Ge?1:0},consumeUntilSemicolonIncluded(c){return c===Ge?2:0},createList(){return new or},createSingleNodeList(c){return new or().appendData(c)},getFirstListNode(c){return c&&c.first},getLastListNode(c){return c&&c.last},parseWithFallback(c,b){let v=this.tokenIndex;try{return c.call(this)}catch(h){if(e)throw h;this.skip(v-this.tokenIndex);let m=b.call(this);return e=!0,n(h,m),e=!1,m}},lookupNonWSType(c){let b;do if(b=this.lookupType(c++),b!==Y&&b!==A)return b;while(b!==r0);return r0},charCodeAt(c){return c>=0&&cm.toUpperCase()),v=`${/[[\](){}]/.test(b)?`"${b}"`:b} is expected`,h=this.tokenStart;switch(c){case f:if(this.tokenType===U||this.tokenType===er)h=this.tokenEnd-1,v="Identifier is expected but function found";else v="Identifier is expected";break;case S:if(this.isDelim(nz))this.next(),h++,v="Name is expected";break;case y:if(this.tokenType===k)h=this.tokenEnd,v="Percent sign is expected";break}this.error(v,h)}this.next()},eatIdent(c){if(this.tokenType!==f||this.lookupValue(0,c)===!1)this.error(`Identifier "${c}" is expected`);this.next()},eatDelim(c){if(!this.isDelim(c))this.error(`Delim "${String.fromCharCode(c)}" is expected`);this.next()},getLocation(c,b){if(o)return l.getLocationRange(c,b,i);return null},getLocationFromList(c){if(o){let b=this.getFirstListNode(c),v=this.getLastListNode(c);return l.getLocationRange(b!==null?b.loc.start.offset-l.startOffset:this.tokenStart,v!==null?v.loc.end.offset-l.startOffset:this.tokenStart,i)}return null},error(c,b){let v=typeof b!=="undefined"&&b",o=Boolean(b.positions),n=typeof b.onParseError==="function"?b.onParseError:d$,e=!1,u.parseAtrulePrelude="parseAtrulePrelude"in b?Boolean(b.parseAtrulePrelude):!0,u.parseRulePrelude="parseRulePrelude"in b?Boolean(b.parseRulePrelude):!0,u.parseValue="parseValue"in b?Boolean(b.parseValue):!0,u.parseCustomProperty="parseCustomProperty"in b?Boolean(b.parseCustomProperty):!1;let{context:v="default",onComment:h}=b;if(v in u.context===!1)throw new Error("Unknown context `"+v+"`");if(typeof h==="function")u.forEachToken((w,_,p)=>{if(w===A){let j=u.getLocation(_,p),J=rt(t,p-2,p,"*/")?t.slice(_+2,p-2):t.slice(_+2,p);h(J,j)}});let m=u.context[v].call(u,b);if(!u.eof)u.error();return m},{SyntaxError:Se,config:u.config})}var Un=u0(),ur=yi(),Hi=$0().ArraySet,Zz=w0().MappingList;function Lr(r){if(!r)r={};this._file=ur.getArg(r,"file",null),this._sourceRoot=ur.getArg(r,"sourceRoot",null),this._skipValidation=ur.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=ur.getArg(r,"ignoreInvalidMapping",!1),this._sources=new Hi,this._names=new Hi,this._mappings=new Zz,this._sourcesContents=null}Lr.prototype._version=3;Lr.fromSourceMap=function r(t,i){var o=t.sourceRoot,n=new Lr(Object.assign(i||{},{file:t.file,sourceRoot:o}));return t.eachMapping(function(e){var l={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){if(l.source=e.source,o!=null)l.source=ur.relative(o,l.source);if(l.original={line:e.originalLine,column:e.originalColumn},e.name!=null)l.name=e.name}n.addMapping(l)}),t.sources.forEach(function(e){var l=e;if(o!==null)l=ur.relative(o,e);if(!n._sources.has(l))n._sources.add(l);var u=t.sourceContentFor(e);if(u!=null)n.setSourceContent(e,u)}),n};Lr.prototype.addMapping=function r(t){var i=ur.getArg(t,"generated"),o=ur.getArg(t,"original",null),n=ur.getArg(t,"source",null),e=ur.getArg(t,"name",null);if(!this._skipValidation){if(this._validateMapping(i,o,n,e)===!1)return}if(n!=null){if(n=String(n),!this._sources.has(n))this._sources.add(n)}if(e!=null){if(e=String(e),!this._names.has(e))this._names.add(e)}this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:n,name:e})};Lr.prototype.setSourceContent=function r(t,i){var o=t;if(this._sourceRoot!=null)o=ur.relative(this._sourceRoot,o);if(i!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[ur.toSetString(o)]=i}else if(this._sourcesContents){if(delete this._sourcesContents[ur.toSetString(o)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};Lr.prototype.applySourceMap=function r(t,i,o){var n=i;if(i==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=t.file}var e=this._sourceRoot;if(e!=null)n=ur.relative(e,n);var l=new Hi,u=new Hi;this._mappings.unsortedForEach(function(g){if(g.source===n&&g.originalLine!=null){var c=t.originalPositionFor({line:g.originalLine,column:g.originalColumn});if(c.source!=null){if(g.source=c.source,o!=null)g.source=ur.join(o,g.source);if(e!=null)g.source=ur.relative(e,g.source);if(g.originalLine=c.line,g.originalColumn=c.column,c.name!=null)g.name=c.name}}var b=g.source;if(b!=null&&!l.has(b))l.add(b);var v=g.name;if(v!=null&&!u.has(v))u.add(v)},this),this._sources=l,this._names=u,t.sources.forEach(function(g){var c=t.sourceContentFor(g);if(c!=null){if(o!=null)g=ur.join(o,g);if(e!=null)g=ur.relative(e,g);this.setSourceContent(g,c)}},this)};Lr.prototype._validateMapping=function r(t,i,o,n){if(i&&typeof i.line!=="number"&&typeof i.column!=="number"){var e="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping){if(typeof console!=="undefined"&&console.warn)console.warn(e);return!1}else throw new Error(e)}if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!i&&!o&&!n)return;else if(t&&"line"in t&&"column"in t&&i&&"line"in i&&"column"in i&&t.line>0&&t.column>=0&&i.line>0&&i.column>=0&&o)return;else{var e="Invalid mapping: "+JSON.stringify({generated:t,source:o,original:i,name:n});if(this._ignoreInvalidMapping){if(typeof console!=="undefined"&&console.warn)console.warn(e);return!1}else throw new Error(e)}};Lr.prototype._serializeMappings=function r(){var t=0,i=1,o=0,n=0,e=0,l=0,u="",g,c,b,v,h=this._mappings.toArray();for(var m=0,w=h.length;m0){if(!ur.compareByGeneratedPositionsInflated(c,h[m-1]))continue;g+=","}if(g+=Un.encode(c.generatedColumn-t),t=c.generatedColumn,c.source!=null){if(v=this._sources.indexOf(c.source),g+=Un.encode(v-l),l=v,g+=Un.encode(c.originalLine-1-n),n=c.originalLine-1,g+=Un.encode(c.originalColumn-o),o=c.originalColumn,c.name!=null)b=this._names.indexOf(c.name),g+=Un.encode(b-e),e=b}u+=g}return u};Lr.prototype._generateSourcesContent=function r(t,i){return t.map(function(o){if(!this._sourcesContents)return null;if(i!=null)o=ur.relative(i,o);var n=ur.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Lr.prototype.toJSON=function r(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)t.file=this._file;if(this._sourceRoot!=null)t.sourceRoot=this._sourceRoot;if(this._sourcesContents)t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot);return t};Lr.prototype.toString=function r(){return JSON.stringify(this.toJSON())};var Re=Lr;var f0=new Set(["Atrule","Selector","Declaration"]);function z0(r){let t=new Re,i={line:1,column:0},o={line:0,column:0},n={line:1,column:0},e={generated:n},l=1,u=0,g=!1,c=r.node;r.node=function(h){if(h.loc&&h.loc.start&&f0.has(h.type)){let m=h.loc.start.line,w=h.loc.start.column-1;if(o.line!==m||o.column!==w){if(o.line=m,o.column=w,i.line=l,i.column=u,g){if(g=!1,i.line!==n.line||i.column!==n.column)t.addMapping(e)}g=!0,t.addMapping({source:h.loc.source,original:o,generated:i})}}if(c.call(this,h),g&&f0.has(h.type))n.line=l,n.column=u};let b=r.emit;r.emit=function(h,m,w){for(let _=0;_sz,safe:()=>Ze});var Cz=43,Tz=45,Me=(r,t)=>{if(r===X)r=t;if(typeof r==="string"){let i=r.charCodeAt(0);return i>127?32768:i<<8}return r},D0=[[f,f],[f,U],[f,er],[f,wr],[f,"-"],[f,k],[f,y],[f,P],[f,hr],[f,K],[R,f],[R,U],[R,er],[R,wr],[R,"-"],[R,k],[R,y],[R,P],[R,hr],[S,f],[S,U],[S,er],[S,wr],[S,"-"],[S,k],[S,y],[S,P],[S,hr],[P,f],[P,U],[P,er],[P,wr],[P,"-"],[P,k],[P,y],[P,P],[P,hr],["#",f],["#",U],["#",er],["#",wr],["#","-"],["#",k],["#",y],["#",P],["#",hr],["-",f],["-",U],["-",er],["-",wr],["-","-"],["-",k],["-",y],["-",P],["-",hr],[k,f],[k,U],[k,er],[k,wr],[k,k],[k,y],[k,P],[k,"%"],[k,hr],["@",f],["@",U],["@",er],["@",wr],["@","-"],["@",hr],[".",k],[".",y],[".",P],["+",k],["+",y],["+",P],["/","*"]],dz=D0.concat([[f,S],[P,S],[S,S],[R,K],[R,gr],[R,d],[y,y],[y,P],[y,U],[y,"-"],[I,f],[I,U],[I,y],[I,P],[I,S],[I,"-"]]);function _0(r){let t=new Set(r.map(([i,o])=>Me(i)<<16|Me(o)));return function(i,o,n){let e=Me(o,n),l=n.charCodeAt(0);if(l===Tz&&o!==f&&o!==U&&o!==hr||l===Cz?t.has(i<<16|l<<8):t.has(i<<16|e))this.emit(" ",Y,!0);return e}}var sz=_0(D0),Ze=_0(dz);var r1=92;function t1(r,t){if(typeof t==="function"){let i=null;r.children.forEach((o)=>{if(i!==null)t.call(this,i);this.node(o),i=o});return}r.children.forEach(this.node,this)}function n1(r){mt(r,(t,i,o)=>{this.token(t,r.slice(i,o))})}function j0(r){let t=new Map;for(let[i,o]of Object.entries(r.node))if(typeof(o.generate||o)==="function")t.set(i,o.generate||o);return function(i,o){let n="",e=0,l={node(g){if(t.has(g.type))t.get(g.type).call(u,g);else throw new Error("Unknown node type: "+g.type)},tokenBefore:Ze,token(g,c){if(e=this.tokenBefore(e,g,c),this.emit(c,g,!1),g===X&&c.charCodeAt(0)===r1)this.emit(` +`,Y,!0)},emit(g){n+=g},result(){return n}};if(o){if(typeof o.decorator==="function")l=o.decorator(l);if(o.sourceMap)l=z0(l);if(o.mode in Ri)l.tokenBefore=Ri[o.mode]}let u={node:(g)=>l.node(g),children:t1,token:(g,c)=>l.token(g,c),tokenize:n1};return l.node(i),l.result()}}function O0(r){return{fromPlainObject(t){return r(t,{enter(i){if(i.children&&i.children instanceof or===!1)i.children=new or().fromArray(i.children)}}),t},toPlainObject(t){return r(t,{leave(i){if(i.children&&i.children instanceof or)i.children=i.children.toArray()}}),t}}}var{hasOwnProperty:Ce}=Object.prototype,kn=function(){};function p0(r){return typeof r==="function"?r:kn}function I0(r,t){return function(i,o,n){if(i.type===t)r.call(this,i,o,n)}}function i1(r,t){let i=t.structure,o=[];for(let n in i){if(Ce.call(i,n)===!1)continue;let e=i[n],l={name:n,type:!1,nullable:!1};if(!Array.isArray(e))e=[e];for(let u of e)if(u===null)l.nullable=!0;else if(typeof u==="string")l.type="node";else if(Array.isArray(u))l.type="list";if(l.type)o.push(l)}if(o.length)return{context:t.walkContext,fields:o};return null}function o1(r){let t={};for(let i in r.node)if(Ce.call(r.node,i)){let o=r.node[i];if(!o.structure)throw new Error("Missed `structure` field in `"+i+"` node type definition");t[i]=i1(i,o)}return t}function a0(r,t){let i=r.fields.slice(),o=r.context,n=typeof o==="string";if(t)i.reverse();return function(e,l,u,g){let c;if(n)c=l[o],l[o]=e;for(let b of i){let v=e[b.name];if(!b.nullable||v){if(b.type==="list"){if(t?v.reduceRight(g,!1):v.reduce(g,!1))return!0}else if(u(v))return!0}}if(n)l[o]=c}}function U0({StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}){return{Atrule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Rule:{StyleSheet:r,Atrule:t,Rule:i,Block:o},Declaration:{StyleSheet:r,Atrule:t,Rule:i,Block:o,DeclarationList:n}}}function k0(r){let t=o1(r),i={},o={},n=Symbol("break-walk"),e=Symbol("skip-node");for(let c in t)if(Ce.call(t,c)&&t[c]!==null)i[c]=a0(t[c],!1),o[c]=a0(t[c],!0);let l=U0(i),u=U0(o),g=function(c,b){function v(j,J,V){let q=h.call(p,j,J,V);if(q===n)return!0;if(q===e)return!1;if(w.hasOwnProperty(j.type)){if(w[j.type](j,p,v,_))return!0}if(m.call(p,j,J,V)===n)return!0;return!1}let h=kn,m=kn,w=i,_=(j,J,V,q)=>j||v(J,V,q),p={break:n,skip:e,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof b==="function")h=b;else if(b){if(h=p0(b.enter),m=p0(b.leave),b.reverse)w=o;if(b.visit){if(l.hasOwnProperty(b.visit))w=b.reverse?u[b.visit]:l[b.visit];else if(!t.hasOwnProperty(b.visit))throw new Error("Bad value `"+b.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=I0(h,b.visit),m=I0(m,b.visit)}}if(h===kn&&m===kn)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");v(c)};return g.break=n,g.skip=e,g.find=function(c,b){let v=null;return g(c,function(h,m,w){if(b.call(this,h,m,w))return v=h,n}),v},g.findLast=function(c,b){let v=null;return g(c,{reverse:!0,enter(h,m,w){if(b.call(this,h,m,w))return v=h,n}}),v},g.findAll=function(c,b){let v=[];return g(c,function(h,m,w){if(b.call(this,h,m,w))v.push(h)}),v},g}function e1(r){return r}function l1(r){let{min:t,max:i,comma:o}=r;if(t===0&&i===0)return o?"#?":"*";if(t===0&&i===1)return"?";if(t===1&&i===0)return o?"#":"+";if(t===1&&i===1)return"";return(o?"#":"")+(t===i?"{"+t+"}":"{"+t+","+(i!==0?i:"")+"}")}function c1(r){switch(r.type){case"Range":return" ["+(r.min===null?"-∞":r.min)+","+(r.max===null?"∞":r.max)+"]";default:throw new Error("Unknown node type `"+r.type+"`")}}function u1(r,t,i,o){let n=r.combinator===" "||o?r.combinator:" "+r.combinator+" ",e=r.terms.map((l)=>Mi(l,t,i,o)).join(n);if(r.explicit||i)return(o||e[0]===","?"[":"[ ")+e+(o?"]":" ]");return e}function Mi(r,t,i,o){let n;switch(r.type){case"Group":n=u1(r,t,i,o)+(r.disallowEmpty?"!":"");break;case"Multiplier":return Mi(r.term,t,i,o)+t(l1(r),r);case"Boolean":n="";break;case"Type":n="<"+r.name+(r.opts?t(c1(r.opts),r.opts):"")+">";break;case"Property":n="<'"+r.name+"'>";break;case"Keyword":n=r.name;break;case"AtKeyword":n="@"+r.name;break;case"Function":n=r.name+"(";break;case"String":case"Token":n=r.value;break;case"Comma":n=",";break;default:throw new Error("Unknown node type `"+r.type+"`")}return t(n,r)}function Ht(r,t){let i=e1,o=!1,n=!1;if(typeof t==="function")i=t;else if(t){if(o=Boolean(t.forceBraces),n=Boolean(t.compact),typeof t.decorate==="function")i=t.decorate}return Mi(r,i,o,n)}var J0={offset:0,line:1,column:1};function g1(r,t){let{tokens:i,longestMatch:o}=r,n=o1)b=Zi(e||t,"end")||Jn(J0,c),v=Jn(b);else b=Zi(e,"start")||Jn(Zi(t,"start")||J0,c.slice(0,l)),v=Zi(e,"end")||Jn(b,c.substr(l,u));return{css:c,mismatchOffset:l,mismatchLength:u,start:b,end:v}}function Zi(r,t){let i=r&&r.loc&&r.loc[t];if(i)return"line"in i?Jn(i):i;return null}function Jn({offset:r,line:t,column:i},o){let n={offset:r,line:t,column:i};if(o){let e=o.split(/\n|\r\n?|\f/);n.offset+=o.length,n.line+=e.length-1,n.column=e.length===1?n.column+o.length:e.pop().length+1}return n}var Rt=function(r,t){let i=at("SyntaxReferenceError",r+(t?" `"+t+"`":""));return i.reference=t,i},X0=function(r,t,i,o){let n=at("SyntaxMatchError",r),{css:e,mismatchOffset:l,mismatchLength:u,start:g,end:c}=g1(o,i);return n.rawMessage=r,n.syntax=t?Ht(t):"",n.css=e,n.mismatchOffset=l,n.mismatchLength=u,n.message=r+` syntax: `+n.syntax+` value: `+(e||"")+` - --------`+new Array(n.mismatchOffset+1).join("-")+"^",Object.assign(n,g),n.loc={source:i&&i.loc&&i.loc.source||"",start:g,end:c},n};var Ci=new Map,Mt=new Map;var Ti=b1,Te=m1;function di(r,t){return t=t||0,r.length-t>=2&&r.charCodeAt(t)===45&&r.charCodeAt(t+1)===45}function q0(r,t){if(t=t||0,r.length-t>=3){if(r.charCodeAt(t)===45&&r.charCodeAt(t+1)!==45){let i=r.indexOf("-",t+2);if(i!==-1)return r.substring(t,i+1)}}return""}function b1(r){if(Ci.has(r))return Ci.get(r);let t=r.toLowerCase(),i=Ci.get(t);if(i===void 0){let o=di(t,0),n=!o?q0(t,0):"";i=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:o})}return Ci.set(r,i),i}function m1(r){if(Mt.has(r))return Mt.get(r);let t=r,i=r[0];if(i==="/")i=r[1]==="/"?"//":"/";else if(i!=="_"&&i!=="*"&&i!=="$"&&i!=="#"&&i!=="+"&&i!=="&")i="";let o=di(t,i.length);if(!o){if(t=t.toLowerCase(),Mt.has(t)){let u=Mt.get(t);return Mt.set(r,u),u}}let n=!o?q0(t,i.length):"",e=t.substr(0,i.length+n.length),l=Object.freeze({basename:t.substr(e.length),name:t.substr(i.length),hack:i,vendor:n,prefix:e,custom:o});return Mt.set(r,l),l}var Zt=["initial","inherit","unset","revert","revert-layer"];var qn=43,Rr=45,de=110,Ct=!0,h1=!1;function rl(r,t){return r!==null&&r.type===X&&r.value.charCodeAt(0)===t}function Xn(r,t,i){while(r!==null&&(r.type===Y||r.type===A))r=i(++t);return t}function vt(r,t,i,o){if(!r)return 0;let n=r.value.charCodeAt(t);if(n===qn||n===Rr){if(i)return 0;t++}for(;t6)return 0}return o}function si(r,t,i){if(!r)return 0;while(nl(i(t),P0)){if(++r>6)return 0;t++}return t}function il(r,t){let i=0;if(r===null||r.type!==f||!sr(r.value,0,x1))return 0;if(r=t(++i),r===null)return 0;if(nl(r,$1)){if(r=t(++i),r===null)return 0;if(r.type===f)return si(Wn(r,0,!0),++i,t);if(nl(r,P0))return si(1,++i,t);return 0}if(r.type===k){let o=Wn(r,1,!0);if(o===0)return 0;if(r=t(++i),r===null)return i;if(r.type===W||r.type===k){if(!w1(r,W0)||!Wn(r,1,!1))return 0;return i+1}return si(o,i,t)}if(r.type===W)return si(Wn(r,1,!0),++i,t);return 0}var f1=["calc(","-moz-calc(","-webkit-calc("],ol=new Map([[a,I],[K,I],[br,fr],[Z,xr]]);function Fr(r,t){return tr.max&&typeof r.max!=="string")return!0}return!1}function z1(r,t){let i=0,o=[],n=0;r:do{switch(r.type){case xr:case I:case fr:if(r.type!==i)break r;if(i=o.pop(),o.length===0){n++;break r}break;case a:case K:case br:case Z:o.push(i),i=ol.get(r.type);break}n++}while(r=t(n));return n}function Vr(r){return function(t,i,o){if(t===null)return 0;if(t.type===a&&L0(t.value,f1))return z1(t,i);return r(t,i,o)}}function C(r){return function(t){if(t===null||t.type!==r)return 0;return 1}}function D1(r){if(r===null||r.type!==f)return 0;let t=r.value.toLowerCase();if(L0(t,Zt))return 0;if(K0(t,"default"))return 0;return 1}function Y0(r){if(r===null||r.type!==f)return 0;if(Fr(r.value,0)!==45||Fr(r.value,1)!==45)return 0;return 1}function _1(r){if(!Y0(r))return 0;if(r.value==="--")return 0;return 1}function j1(r){if(r===null||r.type!==G)return 0;let t=r.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let i=1;iK1,semitones:()=>Q1,resolution:()=>V1,length:()=>W1,frequency:()=>L1,flex:()=>Y1,decibel:()=>E1,angle:()=>P1});var W1=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],P1=["deg","grad","rad","turn"],K1=["s","ms"],L1=["hz","khz"],V1=["dpi","dpcm","dppx","x"],Y1=["fr"],E1=["db"],Q1=["st"];function el(r,t,i){return Object.assign(Ut("SyntaxError",r),{input:t,offset:i,rawMessage:r,message:r+` + --------`+new Array(n.mismatchOffset+1).join("-")+"^",Object.assign(n,g),n.loc={source:i&&i.loc&&i.loc.source||"",start:g,end:c},n};var Ci=new Map,Mt=new Map;var Ti=b1,Te=m1;function di(r,t){return t=t||0,r.length-t>=2&&r.charCodeAt(t)===45&&r.charCodeAt(t+1)===45}function q0(r,t){if(t=t||0,r.length-t>=3){if(r.charCodeAt(t)===45&&r.charCodeAt(t+1)!==45){let i=r.indexOf("-",t+2);if(i!==-1)return r.substring(t,i+1)}}return""}function b1(r){if(Ci.has(r))return Ci.get(r);let t=r.toLowerCase(),i=Ci.get(t);if(i===void 0){let o=di(t,0),n=!o?q0(t,0):"";i=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:o})}return Ci.set(r,i),i}function m1(r){if(Mt.has(r))return Mt.get(r);let t=r,i=r[0];if(i==="/")i=r[1]==="/"?"//":"/";else if(i!=="_"&&i!=="*"&&i!=="$"&&i!=="#"&&i!=="+"&&i!=="&")i="";let o=di(t,i.length);if(!o){if(t=t.toLowerCase(),Mt.has(t)){let u=Mt.get(t);return Mt.set(r,u),u}}let n=!o?q0(t,i.length):"",e=t.substr(0,i.length+n.length),l=Object.freeze({basename:t.substr(e.length),name:t.substr(i.length),hack:i,vendor:n,prefix:e,custom:o});return Mt.set(r,l),l}var Zt=["initial","inherit","unset","revert","revert-layer"];var qn=43,Rr=45,de=110,Ct=!0,h1=!1;function rl(r,t){return r!==null&&r.type===X&&r.value.charCodeAt(0)===t}function Xn(r,t,i){while(r!==null&&(r.type===Y||r.type===A))r=i(++t);return t}function vt(r,t,i,o){if(!r)return 0;let n=r.value.charCodeAt(t);if(n===qn||n===Rr){if(i)return 0;t++}for(;t6)return 0}return o}function si(r,t,i){if(!r)return 0;while(nl(i(t),W0)){if(++r>6)return 0;t++}return t}function il(r,t){let i=0;if(r===null||r.type!==f||!sr(r.value,0,x1))return 0;if(r=t(++i),r===null)return 0;if(nl(r,$1)){if(r=t(++i),r===null)return 0;if(r.type===f)return si(Pn(r,0,!0),++i,t);if(nl(r,W0))return si(1,++i,t);return 0}if(r.type===k){let o=Pn(r,1,!0);if(o===0)return 0;if(r=t(++i),r===null)return i;if(r.type===P||r.type===k){if(!w1(r,P0)||!Pn(r,1,!1))return 0;return i+1}return si(o,i,t)}if(r.type===P)return si(Pn(r,1,!0),++i,t);return 0}var f1=["calc(","-moz-calc(","-webkit-calc("],ol=new Map([[U,I],[K,I],[br,fr],[Z,xr]]);function Fr(r,t){return tr.max&&typeof r.max!=="string")return!0}return!1}function z1(r,t){let i=0,o=[],n=0;r:do{switch(r.type){case xr:case I:case fr:if(r.type!==i)break r;if(i=o.pop(),o.length===0){n++;break r}break;case U:case K:case br:case Z:o.push(i),i=ol.get(r.type);break}n++}while(r=t(n));return n}function Vr(r){return function(t,i,o){if(t===null)return 0;if(t.type===U&&L0(t.value,f1))return z1(t,i);return r(t,i,o)}}function C(r){return function(t){if(t===null||t.type!==r)return 0;return 1}}function D1(r){if(r===null||r.type!==f)return 0;let t=r.value.toLowerCase();if(L0(t,Zt))return 0;if(K0(t,"default"))return 0;return 1}function Y0(r){if(r===null||r.type!==f)return 0;if(Fr(r.value,0)!==45||Fr(r.value,1)!==45)return 0;return 1}function _1(r){if(!Y0(r))return 0;if(r.value==="--")return 0;return 1}function j1(r){if(r===null||r.type!==S)return 0;let t=r.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let i=1;iK1,semitones:()=>Q1,resolution:()=>V1,length:()=>P1,frequency:()=>L1,flex:()=>Y1,decibel:()=>E1,angle:()=>W1});var P1=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],W1=["deg","grad","rad","turn"],K1=["s","ms"],L1=["hz","khz"],V1=["dpi","dpcm","dppx","x"],Y1=["fr"],E1=["db"],Q1=["st"];function el(r,t,i){return Object.assign(at("SyntaxError",r),{input:t,offset:i,rawMessage:r,message:r+` `+t+` ---`+new Array((i||t.length)+1).join("-")+"^"})}var F1=9,G1=10,S1=12,N1=13,B1=32,F0=new Uint8Array(128).map((r,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0);class ll{constructor(r){this.str=r,this.pos=0}charCodeAt(r){return r=128||F0[t]===0)break}if(this.pos===r)this.error("Expect a keyword");return this.substringToPos(r)}scanNumber(){let r=this.pos;for(;r57)break}if(this.pos===r)this.error("Expect a number");return this.substringToPos(r)}scanString(){let r=this.str.indexOf("'",this.pos+1);if(r===-1)this.pos=this.str.length,this.error("Expect an apostrophe");return this.substringToPos(r+1)}}var y1=9,A1=10,H1=12,R1=13,M1=32,R0=33,bl=35,G0=38,no=39,M0=40,Z1=41,Z0=42,ml=43,vl=44,S0=45,hl=60,ul=62,gl=63,C1=64,Pn=91,Kn=93,io=123,N0=124,B0=125,y0=8734,A0={" ":1,"&&":2,"||":3,"|":4};function H0(r){let t=null,i=null;if(r.eat(io),r.skipWs(),t=r.scanNumber(r),r.skipWs(),r.charCode()===vl){if(r.pos++,r.skipWs(),r.charCode()!==B0)i=r.scanNumber(r),r.skipWs()}else i=t;return r.eat(B0),{min:Number(t),max:i?Number(i):0}}function T1(r){let t=null,i=!1;switch(r.charCode()){case Z0:r.pos++,t={min:0,max:0};break;case ml:r.pos++,t={min:1,max:0};break;case gl:r.pos++,t={min:0,max:1};break;case bl:if(r.pos++,i=!0,r.charCode()===io)t=H0(r);else if(r.charCode()===gl)r.pos++,t={min:0,max:0};else t={min:1,max:0};break;case io:t=H0(r);break;default:return null}return{type:"Multiplier",comma:i,min:t.min,max:t.max,term:null}}function ht(r,t){let i=T1(r);if(i!==null){if(i.term=t,r.charCode()===bl&&r.charCodeAt(r.pos-1)===ml)return ht(r,i);return i}return t}function cl(r){let t=r.peek();if(t==="")return null;return ht(r,{type:"Token",value:t})}function d1(r){let t;return r.eat(hl),r.eat(no),t=r.scanWord(),r.eat(no),r.eat(ul),ht(r,{type:"Property",name:t})}function s1(r){let t=null,i=null,o=1;if(r.eat(Pn),r.charCode()===S0)r.peek(),o=-1;if(o==-1&&r.charCode()===y0)r.peek();else if(t=o*Number(r.scanNumber(r)),r.isNameCharCode())t+=r.scanWord();if(r.skipWs(),r.eat(vl),r.skipWs(),r.charCode()===y0)r.peek();else{if(o=1,r.charCode()===S0)r.peek(),o=-1;if(i=o*Number(r.scanNumber(r)),r.isNameCharCode())i+=r.scanWord()}return r.eat(Kn),{type:"Range",min:t,max:i}}function r2(r){let t,i=null;if(r.eat(hl),t=r.scanWord(),t==="boolean-expr"){r.eat(Pn);let o=$l(r,Kn);return r.eat(Kn),r.eat(ul),ht(r,{type:"Boolean",term:o.terms.length===1?o.terms[0]:o})}if(r.charCode()===M0&&r.nextCharCode()===Z1)r.pos+=2,t+="()";if(r.charCodeAt(r.findWsEnd(r.pos))===Pn)r.skipWs(),i=s1(r);return r.eat(ul),ht(r,{type:"Type",name:t,opts:i})}function t2(r){let t=r.scanWord();if(r.charCode()===M0)return r.pos++,{type:"Function",name:t};return ht(r,{type:"Keyword",name:t})}function n2(r,t){function i(n,e){return{type:"Group",terms:n,combinator:e,disallowEmpty:!1,explicit:!1}}let o;t=Object.keys(t).sort((n,e)=>A0[n]-A0[e]);while(t.length>0){o=t.shift();let n=0,e=0;for(;n1)r.splice(e,n-e,i(r.slice(e,n),o)),n=e+1;e=-1}}if(e!==-1&&t.length)r.splice(e,n-e,i(r.slice(e,n),o))}return o}function $l(r,t){let i=Object.create(null),o=[],n,e=null,l=r.pos;while(r.charCode()!==t&&(n=o2(r,t)))if(n.type!=="Spaces"){if(n.type==="Combinator"){if(e===null||e.type==="Combinator")r.pos=l,r.error("Unexpected combinator");i[n.value]=!0}else if(e!==null&&e.type!=="Combinator")i[" "]=!0,o.push({type:"Combinator",value:" "});o.push(n),e=n,l=r.pos}if(e!==null&&e.type==="Combinator")r.pos-=l,r.error("Unexpected combinator");return{type:"Group",terms:o,combinator:n2(o,i)||" ",disallowEmpty:!1,explicit:!1}}function i2(r,t){let i;if(r.eat(Pn),i=$l(r,t),r.eat(Kn),i.explicit=!0,r.charCode()===R0)r.pos++,i.disallowEmpty=!0;return i}function o2(r,t){let i=r.charCode();switch(i){case Kn:break;case Pn:return ht(r,i2(r,t));case hl:return r.nextCharCode()===no?d1(r):r2(r);case N0:return{type:"Combinator",value:r.substringToPos(r.pos+(r.nextCharCode()===N0?2:1))};case G0:return r.pos++,r.eat(G0),{type:"Combinator",value:"&&"};case vl:return r.pos++,{type:"Comma"};case no:return ht(r,{type:"String",value:r.scanString()});case M1:case y1:case A1:case R1:case H1:return{type:"Spaces",value:r.scanSpaces()};case C1:if(i=r.nextCharCode(),r.isNameCharCode(i))return r.pos++,{type:"AtKeyword",name:r.scanWord()};return cl(r);case Z0:case ml:case gl:case bl:case R0:break;case io:if(i=r.nextCharCode(),i<48||i>57)return cl(r);break;default:if(r.isNameCharCode(i))return t2(r);return cl(r)}}function Ln(r){let t=new ll(r),i=$l(t);if(t.pos!==r.length)t.error("Unexpected input");if(i.terms.length===1&&i.terms[0].type==="Group")return i.terms[0];return i}var Vn=function(){};function C0(r){return typeof r==="function"?r:Vn}function xl(r,t,i){function o(l){switch(n.call(i,l),l.type){case"Group":l.terms.forEach(o);break;case"Multiplier":case"Boolean":o(l.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+l.type)}e.call(i,l)}let n=Vn,e=Vn;if(typeof t==="function")n=t;else if(t)n=C0(t.enter),e=C0(t.leave);if(n===Vn&&e===Vn)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");o(r,i)}var l2={decorator(r){let t=[],i=null;return{...r,node(o){let n=i;i=o,r.node.call(this,o),i=n},emit(o,n,e){t.push({type:n,value:o,node:e?null:i})},result(){return t}}}};function c2(r){let t=[];return mt(r,(i,o,n)=>t.push({type:i,value:r.slice(o,n),node:null})),t}function wl(r,t){if(typeof r==="string")return c2(r);return t.generate(r,l2)}var N={type:"Match"},H={type:"Mismatch"},oo={type:"DisallowEmpty"},u2=40,g2=41;function Dr(r,t,i){if(t===N&&i===H)return r;if(r===N&&t===N&&i===N)return r;if(r.type==="If"&&r.else===H&&t===N)t=r.then,r=r.match;return{type:"If",match:r,then:t,else:i}}function d0(r){return r.length>2&&r.charCodeAt(r.length-2)===u2&&r.charCodeAt(r.length-1)===g2}function T0(r){return r.type==="Keyword"||r.type==="AtKeyword"||r.type==="Function"||r.type==="Type"&&d0(r.name)}function $t(r,t=" ",i=!1){return{type:"Group",terms:r,combinator:t,disallowEmpty:!1,explicit:i}}function Yn(r,t,i=new Set){if(!i.has(r))switch(i.add(r),r.type){case"If":r.match=Yn(r.match,t,i),r.then=Yn(r.then,t,i),r.else=Yn(r.else,t,i);break;case"Type":return t[r.name]||r}return r}function fl(r,t,i){switch(r){case" ":{let o=N;for(let n=t.length-1;n>=0;n--){let e=t[n];o=Dr(e,o,H)}return o}case"|":{let o=H,n=null;for(let e=t.length-1;e>=0;e--){let l=t[e];if(T0(l)){if(n===null&&e>0&&T0(t[e-1]))n=Object.create(null),o=Dr({type:"Enum",map:n},N,o);if(n!==null){let u=(d0(l.name)?l.name.slice(0,-1):l.name).toLowerCase();if(u in n===!1){n[u]=l;continue}}}n=null,o=Dr(l,N,o)}return o}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let o=H;for(let n=t.length-1;n>=0;n--){let e=t[n],l;if(t.length>1)l=fl(r,t.filter(function(u){return u!==e}),!1);else l=N;o=Dr(e,l,o)}return o}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let o=i?N:H;for(let n=t.length-1;n>=0;n--){let e=t[n],l;if(t.length>1)l=fl(r,t.filter(function(u){return u!==e}),!0);else l=N;o=Dr(e,l,o)}return o}}}function b2(r){let t=N,i=Tt(r.term);if(r.max===0){if(i=Dr(i,oo,H),t=Dr(i,null,H),t.then=Dr(N,N,t),r.comma)t.then.else=Dr({type:"Comma",syntax:r},t,H)}else for(let o=r.min||1;o<=r.max;o++){if(r.comma&&t!==N)t=Dr({type:"Comma",syntax:r},t,H);t=Dr(i,Dr(N,N,t),H)}if(r.min===0)t=Dr(N,N,t);else for(let o=0;o=65&&n<=90)n=n|32;if(n!==o)return!1}return!0}function f2(r){if(r.type!==X)return!1;return r.value!=="?"}function nx(r){if(r===null)return!0;return r.type===ir||r.type===a||r.type===K||r.type===br||r.type===Z||f2(r)}function ix(r){if(r===null)return!0;return r.type===I||r.type===fr||r.type===xr||r.type===X&&r.value==="/"}function z2(r,t,i){function o(){do J++,j=JV)V=J}function c(){v={syntax:t.syntax,opts:t.syntax.opts||v!==null&&v.opts||null,prev:v},q={type:Dl,syntax:t.syntax,token:q.token,prev:q}}function b(){if(q.type===Dl)q=q.prev;else q={type:ox,syntax:v.syntax,token:q.token,prev:q};v=v.prev}let v=null,h=null,m=null,w=null,_=0,p=null,j=null,J=-1,V=0,q={type:m2,syntax:null,token:null,prev:null};o();while(p===null&&++_m.tokenIndex)m=w,w=!1}else if(m===null){p=h2;break}t=m.nextState,h=m.thenStack,v=m.syntaxStack,q=m.matchStack,J=m.tokenIndex,j=JJ){while(J":"<'"+t.name+"'>"));if(w!==!1&&j!==null&&t.type==="Type"){if(t.name==="custom-ident"&&j.type===f||t.name==="length"&&j.value==="0"){if(w===null)w=e(t,m);t=H;break}}c(),t=tr.matchRef||tr.match;break}case"Keyword":{let B=t.name;if(j!==null){let tr=j.value;if(tr.indexOf("\\")!==-1)tr=tr.replace(/\\[09].*$/,"");if(zl(tr,B)){g(),t=N;break}}t=H;break}case"AtKeyword":case"Function":if(j!==null&&zl(j.value,t.name)){g(),t=N;break}t=H;break;case"Token":if(j!==null&&j.value===t.value){g(),t=N;break}t=H;break;case"Comma":if(j!==null&&j.type===ir)if(nx(q.token))t=H;else g(),t=ix(j)?H:N;else t=nx(q.token)||ix(j)?N:H;break;case"String":let P="",Q=J;for(;QD2,isProperty:()=>_2,isKeyword:()=>j2,getTrace:()=>ex});function ex(r){function t(n){if(n===null)return!1;return n.type==="Type"||n.type==="Property"||n.type==="Keyword"}function i(n){if(Array.isArray(n.match)){for(let e=0;ei.type==="Type"&&i.name===t)}function _2(r,t){return jl(this,r,(i)=>i.type==="Property"&&i.name===t)}function j2(r){return jl(this,r,(t)=>t.type==="Keyword")}function jl(r,t,i){let o=ex.call(r,t);if(o===null)return!1;return o.some(i)}function lx(r){if("node"in r)return r.node;return lx(r.match[0])}function cx(r){if("node"in r)return r.node;return cx(r.match[r.match.length-1])}function pl(r,t,i,o,n){function e(u){if(u.syntax!==null&&u.syntax.type===o&&u.syntax.name===n){let g=lx(u),c=cx(u);r.syntax.walk(t,function(b,v,h){if(b===g){let m=new or;do{if(m.appendData(v.data),v.data===c)break;v=v.next}while(v!==null);l.push({parent:h,nodes:m})}})}if(Array.isArray(u.match))u.match.forEach(e)}let l=[];if(i.matched!==null)e(i.matched);return l}var{hasOwnProperty:Qn}=Object.prototype;function Il(r){return typeof r==="number"&&isFinite(r)&&Math.floor(r)===r&&r>=0}function ux(r){return Boolean(r)&&Il(r.offset)&&Il(r.line)&&Il(r.column)}function O2(r,t){return function i(o,n){if(!o||o.constructor!==Object)return n(o,"Type of node should be an Object");for(let e in o){let l=!0;if(Qn.call(o,e)===!1)continue;if(e==="type"){if(o.type!==r)n(o,"Wrong node type `"+o.type+"`, expected `"+r+"`")}else if(e==="loc"){if(o.loc===null)continue;else if(o.loc&&o.loc.constructor===Object)if(typeof o.loc.source!=="string")e+=".source";else if(!ux(o.loc.start))e+=".start";else if(!ux(o.loc.end))e+=".end";else continue;l=!1}else if(t.hasOwnProperty(e)){l=!1;for(let u=0;!l&&u");else throw new Error("Wrong value `"+n+"` in `"+t+"` structure definition")}return i.join(" | ")}function p2(r,t){let i=t.structure,o={type:String,loc:!0},n={type:'"'+r+'"'};for(let e in i){if(Qn.call(i,e)===!1)continue;let l=o[e]=Array.isArray(i[e])?i[e].slice():[i[e]];n[e]=gx(l,r+"."+e)}return{docs:n,check:O2(r,o)}}function bx(r){let t={};if(r.node){for(let i in r.node)if(Qn.call(r.node,i)){let o=r.node[i];if(o.structure)t[i]=p2(i,o);else throw new Error("Missed `structure` field in `"+i+"` node type definition")}}return t}function Ul(r,t,i){let o={};for(let n in r)if(r[n].syntax)o[n]=i?r[n].syntax:Ht(r[n].syntax,{compact:t});return o}function I2(r,t,i){let o={};for(let[n,e]of Object.entries(r))o[n]={prelude:e.prelude&&(i?e.prelude.syntax:Ht(e.prelude.syntax,{compact:t})),descriptors:e.descriptors&&Ul(e.descriptors,t,i)};return o}function U2(r){for(let t=0;t{return i[o]=this.createDescriptor(t.descriptors[o],"AtruleDescriptor",o,r),i},Object.create(null)):null}}addProperty_(r,t){if(!t)return;this.properties[r]=this.createDescriptor(t,"Property",r)}addType_(r,t){if(!t)return;this.types[r]=this.createDescriptor(t,"Type",r)}checkAtruleName(r){if(!this.getAtrule(r))return new Rt("Unknown at-rule","@"+r)}checkAtrulePrelude(r,t){let i=this.checkAtruleName(r);if(i)return i;let o=this.getAtrule(r);if(!o.prelude&&t)return new SyntaxError("At-rule `@"+r+"` should not contain a prelude");if(o.prelude&&!t){if(!dt(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+r+"` should contain a prelude")}}checkAtruleDescriptorName(r,t){let i=this.checkAtruleName(r);if(i)return i;let o=this.getAtrule(r),n=Ti(t);if(!o.descriptors)return new SyntaxError("At-rule `@"+r+"` has no known descriptors");if(!o.descriptors[n.name]&&!o.descriptors[n.basename])return new Rt("Unknown at-rule descriptor",t)}checkPropertyName(r){if(!this.getProperty(r))return new Rt("Unknown property",r)}matchAtrulePrelude(r,t){let i=this.checkAtrulePrelude(r,t);if(i)return Gr(null,i);let o=this.getAtrule(r);if(!o.prelude)return Gr(null,null);return dt(this,o.prelude,t||"",!1)}matchAtruleDescriptor(r,t,i){let o=this.checkAtruleDescriptorName(r,t);if(o)return Gr(null,o);let n=this.getAtrule(r),e=Ti(t);return dt(this,n.descriptors[e.name]||n.descriptors[e.basename],i,!1)}matchDeclaration(r){if(r.type!=="Declaration")return Gr(null,new Error("Not a Declaration node"));return this.matchProperty(r.property,r.value)}matchProperty(r,t){if(Te(r).custom)return Gr(null,new Error("Lexer matching doesn't applicable for custom properties"));let i=this.checkPropertyName(r);if(i)return Gr(null,i);return dt(this,this.getProperty(r),t,!0)}matchType(r,t){let i=this.getType(r);if(!i)return Gr(null,new Rt("Unknown type",r));return dt(this,i,t,!1)}match(r,t){if(typeof r!=="string"&&(!r||!r.type))return Gr(null,new Rt("Bad syntax"));if(typeof r==="string"||!r.match)r=this.createDescriptor(r,"Type","anonymous");return dt(this,r,t,!1)}findValueFragments(r,t,i,o){return pl(this,t,this.matchProperty(r,t),i,o)}findDeclarationValueFragments(r,t,i){return pl(this,r.value,this.matchDeclaration(r),t,i)}findAllFragments(r,t,i){let o=[];return this.syntax.walk(r,{visit:"Declaration",enter:(n)=>{o.push.apply(o,this.findDeclarationValueFragments(n,t,i))}}),o}getAtrule(r,t=!0){let i=Ti(r);return(i.vendor&&t?this.atrules[i.name]||this.atrules[i.basename]:this.atrules[i.name])||null}getAtrulePrelude(r,t=!0){let i=this.getAtrule(r,t);return i&&i.prelude||null}getAtruleDescriptor(r,t){return this.atrules.hasOwnProperty(r)&&this.atrules.declarators?this.atrules[r].declarators[t]||null:null}getProperty(r,t=!0){let i=Te(r);return(i.vendor&&t?this.properties[i.name]||this.properties[i.basename]:this.properties[i.name])||null}getType(r){return hasOwnProperty.call(this.types,r)?this.types[r]:null}validate(){function r(u,g){return g?`<${u}>`:`<'${u}'>`}function t(u,g,c,b){if(c.has(g))return c.get(g);if(c.set(g,!1),b.syntax!==null)xl(b.syntax,function(v){if(v.type!=="Type"&&v.type!=="Property")return;let h=v.type==="Type"?u.types:u.properties,m=v.type==="Type"?o:n;if(!hasOwnProperty.call(h,v.name))i.push(`${r(g,c===o)} used missed syntax definition ${r(v.name,v.type==="Type")}`),c.set(g,!0);else if(t(u,v.name,m,h[v.name]))i.push(`${r(g,c===o)} used broken syntax definition ${r(v.name,v.type==="Type")}`),c.set(g,!0)},this)}let i=[],o=new Map,n=new Map;for(let u in this.types)t(this,u,o,this.types[u]);for(let u in this.properties)t(this,u,n,this.properties[u]);let e=[...o.keys()].filter((u)=>o.get(u)),l=[...n.keys()].filter((u)=>n.get(u));if(e.length||l.length)return{errors:i,types:e,properties:l};return null}dump(r,t){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:Ul(this.types,!t,r),properties:Ul(this.properties,!t,r),atrules:I2(this.atrules,!t,r)}}toString(){return JSON.stringify(this.dump())}}function al(r,t){if(typeof t==="string"&&/^\s*\|/.test(t))return typeof r==="string"?r+t:t.replace(/^\s*\|\s*/,"");return t||null}function mx(r,t){let i=Object.create(null);for(let[o,n]of Object.entries(r))if(n){i[o]={};for(let e of Object.keys(n))if(t.includes(e))i[o][e]=n[e]}return i}function Gn(r,t){let i={...r};for(let[o,n]of Object.entries(t))switch(o){case"generic":i[o]=Boolean(n);break;case"cssWideKeywords":i[o]=r[o]?[...r[o],...n]:n||[];break;case"units":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]=Array.isArray(l)?l:[];break;case"atrules":i[o]={...r[o]};for(let[e,l]of Object.entries(n)){let u=i[o][e]||{},g=i[o][e]={prelude:u.prelude||null,descriptors:{...u.descriptors}};if(!l)continue;g.prelude=l.prelude?al(g.prelude,l.prelude):g.prelude||null;for(let[c,b]of Object.entries(l.descriptors||{}))g.descriptors[c]=b?al(g.descriptors[c],b):null;if(!Object.keys(g.descriptors).length)g.descriptors=null}break;case"types":case"properties":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]=al(i[o][e],l);break;case"scope":case"features":i[o]={...r[o]};for(let[e,l]of Object.entries(n))i[o][e]={...i[o][e],...l};break;case"parseContext":i[o]={...r[o],...n};break;case"atrule":case"pseudo":i[o]={...r[o],...mx(n,["parse"])};break;case"node":i[o]={...r[o],...mx(n,["name","structure","parse","generate","walkContext"])};break}return i}function vx(r){let t=t0(r),i=k0(r),o=j0(r),{fromPlainObject:n,toPlainObject:e}=O0(i),l={lexer:null,createLexer:(u)=>new Fn(u,l,l.lexer.structure),tokenize:mt,parse:t,generate:o,walk:i,find:i.find,findLast:i.findLast,findAll:i.findAll,fromPlainObject:n,toPlainObject:e,fork(u){let g=Gn({},r);return vx(typeof u==="function"?u(g):Gn(g,u))}};return l.lexer=new Fn({generic:r.generic,cssWideKeywords:r.cssWideKeywords,units:r.units,types:r.types,atrules:r.atrules,properties:r.properties,node:r.node},l),l}var kl=(r)=>vx(Gn({},r));var hx={generic:!0,cssWideKeywords:["initial","inherit","unset","revert","revert-layer"],units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|x|y","baseline-position":"[first|last]? baseline","basic-shape":"||||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|currentColor||||<-non-standard-color>","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ","color-interpolation-method":"in [| ?|]",combinator:"'>'|'+'|'~'|['|' '|']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? *]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","cos()":"cos( )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","exp()":"exp( )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ ? )]|[( ? )]","generic-family":"|||<-non-standard-generic-family>","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hue-interpolation-method":"[shorter|longer|increasing|decreasing] hue","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )","hypot()":"hypot( # )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"|min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|| ","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","light-dark()":"light-dark( , )","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [[|to ]||]? , )","log()":"log( , ? )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )","mod()":"mod( , )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( [|none] )","polygon()":"polygon( ? , [ ]# )","polar-color-space":"hsl|hwb|lch|oklch",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' |","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )",ratio:" [/ ]?","ray()":"ray( &&?&&contain?&&[at ]? )","ray-size":"closest-side|closest-corner|farthest-side|farthest-corner|sides","rectangular-color-space":"srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","reversed-counter-name":"reversed( )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )","scroll()":"scroll( [||]? )",scroller:"root|nearest|self","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( )","single-animation":"<'animation-duration'>||||<'animation-delay'>||||||||||[none|]||","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|||","single-transition":"[none|]||