@lipsjs/lips 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -1
- package/dist/lips.js +3532 -1094
- package/dist/lips.js.map +44 -19
- package/dist/lips.min.js +13 -9
- package/dist/lips.min.js.map +44 -19
- package/dist/mf2.min.js +4 -0
- package/dist/mf2.min.js.map +38 -0
- package/dist/precompile.min.js +19 -16
- package/dist/precompile.min.js.map +7 -6
- package/dist/runtime.min.js +4 -3
- package/dist/runtime.min.js.map +13 -12
- package/dist/stylis.min.js +3 -0
- package/dist/stylis.min.js.map +16 -0
- package/dist/types/i18n/engine.d.ts +14 -0
- package/dist/types/i18n/index.d.ts +122 -5
- package/dist/types/i18n/intl.d.ts +1 -0
- package/dist/types/i18n/lookup.d.ts +22 -0
- package/dist/types/ir/compiler.d.ts +75 -2
- package/dist/types/ir/expression.d.ts +32 -3
- package/dist/types/ir/facade.d.ts +74 -30
- package/dist/types/ir/host.d.ts +75 -0
- package/dist/types/ir/index.d.ts +5 -2
- package/dist/types/ir/policy.d.ts +95 -0
- package/dist/types/ir/runtime.d.ts +54 -19
- package/dist/types/ir/signal.d.ts +6 -4
- package/dist/types/ir/style.d.ts +119 -0
- package/dist/types/ir/swap.d.ts +5 -0
- package/dist/types/ir/tree.d.ts +51 -0
- package/dist/types/lips.d.ts +20 -3
- package/dist/types/lynx/a11y.d.ts +61 -0
- package/dist/types/lynx/background.d.ts +71 -0
- package/dist/types/lynx/main.d.ts +46 -0
- package/dist/types/lynx/protocol.d.ts +52 -0
- package/dist/types/lynx/style.d.ts +49 -0
- package/dist/types/lynx/template.d.ts +37 -0
- package/dist/types/mf2.d.ts +14 -0
- package/dist/types/precompile.d.ts +30 -5
- package/dist/types/runtime.d.ts +1 -1
- package/dist/types/stylesheet.d.ts +12 -16
- package/dist/types/stylis.d.ts +2 -0
- package/dist/types/types.d.ts +138 -11
- package/dist/types/untrusted.d.ts +17 -0
- package/dist/untrusted.min.js +5 -0
- package/dist/untrusted.min.js.map +13 -0
- package/package.json +20 -3
package/dist/precompile.min.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)this.lineStarts.push(
|
|
3
|
-
`).length+(/\n\s*\n$/.test(
|
|
4
|
-
`).length-1:0
|
|
5
|
-
`)
|
|
6
|
-
`){
|
|
7
|
-
`,t:"\t",r:"\r",b:"\b",f:"\f",v:"\v","0":"\x00"};if(
|
|
8
|
-
`)this.lineStarts.push(Q+1)}let K=0,X=this.lineStarts.length-1;while(K<X){let Q=K+X+1>>1;this.lineStarts[Q]<=J?K=Q:X=Q-1}return{line:K+1,col:J-this.lineStarts[K]+1}}report(J,K,X,Q,Y=1,Z){let{line:$,col:z}=this.locate(Q);this.diagnostics.push({code:J,severity:K,message:X,hint:Z,loc:{line:$,col:z,offset:Q,length:Y}})}expr(J,K){let X=this.exprIndex.get(J);if(X!==void 0)return X;let{diagnostics:Q}=C(J);for(let Z of Q){let $=(K?.offset??0)+Z.loc.offset;this.report(Z.code,"error",Z.message,$,Z.loc.length)}let Y=this.exprs.length;return this.exprs.push(J),this.exprIndex.set(J,Y),Y}synth(J){let K=this.exprIndex.get(J);if(K!==void 0)return K;let X=this.exprs.length;return this.exprs.push(J),this.exprIndex.set(J,X),X}concat(J){J.filter((X)=>typeof X!=="string").forEach((X)=>{let{diagnostics:Q}=C(X.expr);for(let Y of Q)this.report(Y.code,"error",Y.message,X.loc.offset+Y.loc.offset,Y.loc.length)});let K=J.map((X)=>typeof X==="string"?JSON.stringify(X):`((${X.expr})??"")`).join("+");return this.synth(K)}compInput(J){switch(J.k){case"literal":return{lit:J.value};case"bool":return{lit:J.value};case"expr":return{e:this.expr(J.source,J.loc)};case"interp":return{e:this.concat(J.parts)}}}compile(J){return{v:1,exprs:this.exprs,root:this.block(J,[])}}block(J,K){let X={html:"",scope:[...K],binds:[],blocks:[]},Q=[],Y=(Z,$,z=!1)=>{let U=0,B=!1,F=()=>{return Q.push(u),B=!1,[...$,U++]};for(let V=0;V<Z.length;V++){let D=Z[V];switch(D.t){case"text":{if(z){X.binds.push({t:"text",p:F(),e:this.synth(JSON.stringify(D.value)),i18n:1});break}if(Q.push(i(D.value)),!B)U++;B=!0;break}case"comment":{Q.push(`<!--${D.value.replace(/--/g,"- -")}-->`),B=!1,U++;break}case"interp":{let H={t:"text",p:F(),e:this.concat(D.parts)};if(z)H.i18n=1;X.binds.push(H);break}case"fragment":{Z=[...Z.slice(0,V),...D.children,...Z.slice(V+1)],V--;break}case"element":{if(h.has(D.tag)){if(this.controlBlock(D,Z,V,F(),X,K),D.tag==="if"){let H=V+1;while(H<Z.length){let W=Z[H];if(W.t==="element"&&(W.tag==="else-if"||W.tag==="else"))H++;else break}Z=[...Z.slice(0,V+1),...Z.slice(H)]}break}if(g.has(D.tag)){this.report("LIPS-C002","error",`<${D.tag}> is only valid inside its parent construct`,D.loc.offset,D.loc.length);break}if(D.tag==="#dynamic"){X.blocks.push(this.compLike(D,F(),K,"dynamic"));break}if(this.macros.has(D.tag)){let H=this.macroCall(D,F(),K);H&&X.blocks.push(H);break}if(!m.has(D.tag)){X.blocks.push(this.compLike(D,F(),K,"comp"));break}this.emitElement(D,$,U++,Q,X,Y),B=!1;break}}}};return Y(J,[]),X.html=Q.join(""),X}emitElement(J,K,X,Q,Y,Z){let $=[...K,X],z=`<${J.tag}`,U=J.attrs.some((F)=>F.k==="bool"&&F.name==="i18n"&&F.value),B=(F)=>U&&(F==="title"||F==="placeholder");for(let F of J.attrs)switch(F.k){case"literal":if(F.name==="@format"){Y.binds.push(this.formatBind($,F));break}if(F.name.startsWith("@")){Y.binds.push({t:"prop",p:$,name:F.name.slice(1),e:this.synth(JSON.stringify(F.value))});break}if(B(F.name)){Y.binds.push({t:"attr",p:$,name:F.name,e:this.synth(JSON.stringify(F.value)),i18n:1});break}z+=` ${F.name}="${l(F.value)}"`;break;case"bool":F.name!=="i18n"&&F.value&&(z+=` ${F.name}`);break;case"expr":{if(F.name==="@format"){Y.binds.push(this.formatBind($,F));break}if(F.name.startsWith("@")){Y.binds.push({t:"prop",p:$,name:F.name.slice(1),e:this.expr(F.source,F.loc)});break}let V={t:"attr",p:$,name:F.name,e:this.expr(F.source,F.loc)};if(B(F.name))V.i18n=1;Y.binds.push(V);break}case"interp":{if(F.name==="@format"){Y.binds.push(this.formatBind($,F));break}let V={t:"attr",p:$,name:F.name,e:this.concat(F.parts)};if(B(F.name))V.i18n=1;Y.binds.push(V);break}case"event":Y.binds.push({t:"event",p:$,name:F.name,e:this.synth(F.source)});break;case"spread":Y.binds.push({t:"spread",p:$,e:this.expr(F.source,F.loc)});break;case"fn":this.report("LIPS-C007","warning",`Callable attribute '${F.name}(…)' has no meaning on <${J.tag}>`,F.loc.offset,F.loc.length);break;case"args":this.report("LIPS-C008","warning",`Iterator arguments are not applicable to <${J.tag}>`,F.loc.offset,F.loc.length);break}if(p.has(J.tag)){Q.push(z+">");return}Q.push(z+">"),J.children.length&&Z(J.children,$,U),Q.push(`</${J.tag}>`)}formatBind(J,K){let X=K.k==="literal"?K.value:K.k==="expr"?K.source:K.parts.map(($)=>typeof $==="string"?$:`{${$.expr}}`).join(""),Q=X.indexOf(",");if(Q===-1)return this.report("LIPS-C012","error",'@format expects "reference, { params }"',K.loc.offset,K.loc.length),{t:"prop",p:J,name:"format",e:this.synth("({})"),ref:X.trim()};let Y=X.slice(0,Q).trim(),Z=X.slice(Q+1).trim();return{t:"prop",p:J,name:"format",e:this.expr(Z,K.loc),ref:Y}}attrsOf(J){let K=new Map,X=[];for(let Q of J.attrs)if(Q.k==="args")X.push(...Q.names);else if("name"in Q)K.set(Q.name,Q);return{byName:K,args:X}}controlBlock(J,K,X,Q,Y,Z){switch(J.tag){case"if":{let $=[{when:J.head?this.expr(J.head.expr,J.head.loc):this.missingHead(J),block:this.block(J.children,Z)}];for(let z=X+1;z<K.length;z++){let U=K[z];if(U.t!=="element")break;if(U.tag==="else-if")$.push({when:U.head?this.expr(U.head.expr,U.head.loc):this.missingHead(U),block:this.block(U.children,Z)});else if(U.tag==="else"){$.push({when:null,block:this.block(U.children,Z)});break}else break}Y.blocks.push({t:"if",p:Q,branches:$});break}case"else-if":case"else":this.report("LIPS-C001","error",`<${J.tag}> without a preceding <if>`,J.loc.offset,J.loc.length);break;case"for":{let{byName:$,args:z}=this.attrsOf(J),U=$.get("in"),B=$.get("from"),F=$.get("to"),V=$.get("by");if(!U&&!B){this.report("LIPS-C004","error","<for> requires 'in' or 'from'/'to'",J.loc.offset,J.loc.length);break}let D={t:"for",p:Q,args:z,block:this.block(J.children,[...Z,...z])};if(U&&U.k==="expr")D.of=this.expr(U.source,U.loc);if(B)D.from=this.numInput(B);if(F)D.to=this.numInput(F);if(V&&(V.k==="literal"||V.k==="expr"))D.by=V.k==="literal"?{lit:V.value}:{e:this.expr(V.source,V.loc)};Y.blocks.push(D);break}case"switch":{let $=J.head?this.expr(J.head.expr,J.head.loc):this.missingHead(J),z=[];for(let U of J.children){if(U.t!=="element")continue;if(U.tag==="case"){let{byName:B}=this.attrsOf(U),F=B.get("is");if(!F||F.k!=="literal"&&F.k!=="expr"){this.report("LIPS-C004","error","<case> requires an 'is' attribute",U.loc.offset,U.loc.length);continue}z.push({is:F.k==="literal"?{lit:F.value}:{e:this.expr(F.source,F.loc)},block:this.block(U.children,Z)})}else if(U.tag==="default")z.push({is:null,block:this.block(U.children,Z)});else this.report("LIPS-C003","error","Only <case>/<default> are valid inside <switch>",U.loc.offset,U.loc.length)}Y.blocks.push({t:"switch",p:Q,on:$,cases:z});break}case"async":{let $=J.attrs.find((U)=>U.k==="fn"&&U.name==="await");if(!$){this.report("LIPS-C004","error","<async> requires await(…)",J.loc.offset,J.loc.length);break}let z={t:"async",p:Q,awaitE:this.expr($.source,$.loc)};for(let U of J.children){if(U.t!=="element")continue;let{args:B}=this.attrsOf(U);if(U.tag==="then")z.then={args:B,block:this.block(U.children,[...Z,...B])};else if(U.tag==="catch")z.catch={args:B,block:this.block(U.children,[...Z,...B])};else if(U.tag==="loading")z.loading=this.block(U.children,Z);else this.report("LIPS-C003","error","Only <then>/<catch>/<loading> are valid inside <async>",U.loc.offset,U.loc.length)}Y.blocks.push(z);break}case"let":case"const":{let $={};for(let z of J.attrs)if(z.k==="literal"||z.k==="expr"||z.k==="interp"||z.k==="bool")$[z.name]=this.compInput(z),!Y.scope.includes(z.name)&&Y.scope.push(z.name),!Z.includes(z.name)&&Z.push(z.name);Y.blocks.push({t:"let",p:Q,const:J.tag==="const",vars:$});break}case"log":Y.blocks.push({t:"log",p:Q,e:J.head?this.synth(J.head.expr):this.missingHead(J)});break}}missingHead(J){return this.report("LIPS-C004","error",`<${J.tag}> requires a head expression: <${J.tag}( … )>`,J.loc.offset,J.loc.length),this.synth("undefined")}numInput(J){if(J.k==="literal")return{lit:j(J.value)?Number(J.value):J.value};if(J.k==="expr")return j(J.source)?{lit:Number(J.source)}:{e:this.expr(J.source,J.loc)};return{lit:void 0}}macroCall(J,K,X){let Q=this.macros.get(J.tag);if(this.macroStack.includes(Q.name))return this.report("LIPS-C009","error",`Recursive macro <${Q.name}> (${[...this.macroStack,Q.name].join(" → ")})`,J.loc.offset,J.loc.length),null;let Y={};for(let $ of J.attrs)if($.k==="literal"||$.k==="expr"||$.k==="interp"||$.k==="bool")Y[$.name]=this.compInput($);for(let $ of Q.argv)if(!($ in Y))Y[$]={lit:void 0};this.macroStack.push(Q.name);let Z=this.block(Q.children,[...X,...Q.argv]);return this.macroStack.pop(),{t:"macro",p:K,name:Q.name,vars:Y,args:Q.argv,block:Z}}compLike(J,K,X,Q){let Y={},Z=[],$=[],z=[];for(let B of J.attrs)switch(B.k){case"literal":case"bool":case"expr":case"interp":Y[B.name]=this.compInput(B);break;case"event":$.push({name:B.name,e:this.synth(B.source)});break;case"spread":Z.push(this.expr(B.source,B.loc));break;case"args":z=[...z,...B.names];break;case"fn":Y[B.name]={e:this.expr(B.source,B.loc)};break}let U=J.children.length?{args:z,block:this.block(J.children,[...X,...z])}:void 0;return Q==="comp"?{t:"comp",p:K,name:J.tag,inputs:Y,spreads:Z,events:$,contents:U}:{t:"dynamic",p:K,tag:this.expr(J.dynamicTag.expr,J.dynamicTag.loc),inputs:Y,spreads:Z,events:$,contents:U}}}function c(J,K){let X=new Map;if(!J?.trim())return X;let Q=G(J);K.push(...Q.diagnostics);for(let Y of Q.root.children){if(Y.t!=="element")continue;if(Y.tag!=="macro"){K.push({code:"LIPS-C010",severity:"warning",message:`Only <macro> definitions are allowed in the macros source — ignoring <${Y.tag}>`,loc:{line:1,col:1,offset:Y.loc.offset,length:Y.loc.length}});continue}let Z="",$=[];for(let z of Y.attrs)if(z.k==="args")$.push(...z.names);else if(z.k==="literal"&&z.name==="name")Z=z.value;if(!Z){K.push({code:"LIPS-C011",severity:"error",message:"<macro> requires a name attribute",loc:{line:1,col:1,offset:Y.loc.offset,length:Y.loc.length}});continue}X.set(Z.toLowerCase(),{name:Z,argv:$,children:Y.children})}return X}function I(J,K){let X=[],Q=c(K?.macros||"",X),Y=G(J),Z=new _(J,Q);return{ir:Z.compile(Y.root.children),diagnostics:[...X,...Y.diagnostics,...Z.diagnostics]}}function e(J){let K={macros:J.macros},{ir:X,diagnostics:Q}=I(J.default||"",K),{default:Y,macros:Z,...$}=J;return{template:{...$,ir:X},diagnostics:Q}}var d=(J)=>JSON.stringify(J);function JJ(J={}){let K=J.include||/\.lips$/,X=J.reportDiagnostics!==!1;return{name:"lips:precompile",enforce:"pre",async transform(Q,Y){if(!K.test(Y))return null;let{parseSFC:Z}=await Promise.resolve().then(() => (M(),P)),{script:$}=Z(Q),z=Q.slice($.length),{ir:U,diagnostics:B}=I(z);if(X)for(let V of B)this?.warn?.(`[lips] ${V.code} ${V.message} (${Y}:${V.loc.line}:${V.loc.col})`);let F=B.filter((V)=>V.severity==="error");if(F.length)throw Error(`[lips] ${Y}: ${F[0].message} at line ${F[0].loc.line}:${F[0].loc.col}`);return{code:`${$}
|
|
9
|
-
|
|
1
|
+
var gt=Object.defineProperty;var mt=(t)=>t;function dt(t,e){this[t]=mt.bind(null,e)}var bt=(t,e)=>{for(var r in e)gt(t,r,{get:e[r],enumerable:!0,configurable:!0,set:dt.bind(e,r)})};var xt=(t,e)=>()=>(t&&(e=t(t=0)),e);var X={};bt(X,{parseSFC:()=>St,parseTemplate:()=>M});function D(t){return t.replace(/&(?:amp|lt|gt|quot|#39|nbsp);/g,(e)=>vt[e])}class H{src;pos=0;lineStarts=null;diagnostics=[];constructor(t){this.src=t}locate(t){if(!this.lineStarts){this.lineStarts=[0];for(let s=0;s<this.src.length;s++)if(this.src[s]===`
|
|
2
|
+
`)this.lineStarts.push(s+1)}let e=0,r=this.lineStarts.length-1;while(e<r){let s=e+r+1>>1;this.lineStarts[s]<=t?e=s:r=s-1}return{line:e+1,col:t-this.lineStarts[e]+1}}report(t,e,r,s,i=1,n){let{line:a,col:o}=this.locate(s);this.diagnostics.push({code:t,severity:e,message:r,hint:n,loc:{line:a,col:o,offset:s,length:i}})}eof(){return this.pos>=this.src.length}peek(t=0){return this.src[this.pos+t]}startsWith(t){return this.src.startsWith(t,this.pos)}skipSpace(){while(!this.eof()&&/\s/.test(this.src[this.pos]))this.pos++}scanBalanced(t,e){let r=this.pos,s=0;while(!this.eof()){let i=this.src[this.pos];if(i==="'"||i==='"'||i==="`"){this.pos++;while(!this.eof()&&this.src[this.pos]!==i){if(this.src[this.pos]==="\\")this.pos++;this.pos++}this.pos++;continue}if(s===0&&i===t){let n=this.src.slice(r,this.pos);return this.pos++,{content:n,loc:{offset:r,length:n.length}}}if(i==="("||i==="["||i==="{")s++;else if(i===")"||i==="]"||i==="}"){if(s===0&&i!==t){this.report(e,"error",`Unbalanced '${i}'`,this.pos),this.pos++;continue}s--}this.pos++}return this.report(e,"error",`Unterminated — expected '${t}'`,r,this.pos-r),null}parse(){let t=[];while(!this.eof())if(t.push(...this.parseNodes([])),this.startsWith("</")){let e=this.pos;this.pos+=2;while(!this.eof()&&this.peek()!==">")this.pos++;!this.eof()&&this.pos++,this.report("LIPS-P005","error",`Stray closing tag ${this.src.slice(e,this.pos)}`,e,this.pos-e)}return{root:{t:"fragment",children:t,loc:{offset:0,length:this.src.length}},diagnostics:this.diagnostics}}parseNodes(t){let e=[];while(!this.eof()){if(this.startsWith("</"))break;let r=this.pos;if(this.peek()==="<"&&this.peek(1)!==void 0){let s=this.parseTag(t);s&&e.push(s)}else{let s=this.parseText(t);s&&e.push(s)}if(this.pos===r)this.pos++}return e}parseText(t){let e=this.pos,r=[],s="";while(!this.eof()&&this.peek()!=="<"){if(this.peek()==="{"){this.pos++;let o=this.scanBalanced("}","LIPS-P007");if(o)s&&r.push(s),s="",r.push({expr:o.content.trim(),loc:o.loc});continue}s+=this.peek(),this.pos++}s&&r.push(s);let i={offset:e,length:this.pos-e};if(r.some((o)=>typeof o!=="string"))return{t:"interp",parts:r.map((o)=>typeof o==="string"?D(o):o),loc:i};let n=r.length?r[0]:"",a=t.some((o)=>yt.has(o));if(!n||!a&&!n.trim())return null;return{t:"text",value:D(n),loc:i}}parseTag(t){let e=this.pos;if(this.startsWith("<!--")){let n=this.src.indexOf("-->",this.pos+4);if(n===-1)return this.report("LIPS-P003","error","Unterminated comment",e,this.src.length-e),this.pos=this.src.length,null;let a=this.src.slice(this.pos+4,n);return this.pos=n+3,{t:"comment",value:a,loc:{offset:e,length:this.pos-e}}}if(this.startsWith("<>")){this.pos+=2;let n=[];while(!0)if(n.push(...this.parseNodes([...t,"#fragment"])),this.closeStatus("#fragment",e,t)!=="stray")break;return{t:"fragment",children:n,loc:{offset:e,length:this.pos-e}}}if(this.startsWith("<{")){this.pos+=2;let n=this.scanBalanced("}","LIPS-P008");if(!n)return null;let a={t:"element",tag:"#dynamic",dynamicTag:{expr:n.content.trim(),loc:n.loc},attrs:[],children:[],selfClosed:!1,loc:{offset:e,length:0}};return this.finishTag(a,t,e),a}this.pos++;let r=this.pos;while(!this.eof()&&/[A-Za-z0-9_-]/.test(this.peek()))this.pos++;let s=this.src.slice(r,this.pos);if(!s||!/^[A-Za-z]/.test(s))return this.report("LIPS-P002","error","Invalid tag name",e,this.pos-e+1),{t:"text",value:"<",loc:{offset:e,length:1}};let i={t:"element",tag:s.toLowerCase(),attrs:[],children:[],selfClosed:!1,loc:{offset:e,length:0}};if(this.peek()==="(")if(Q.has(i.tag)){this.pos++;let n=this.scanBalanced(")","LIPS-P012");n&&(i.head={expr:n.content.trim(),loc:n.loc})}else this.report("LIPS-P011","error",`Head expression is not allowed on <${i.tag}>`,this.pos,1,`Only ${[...Q].map((n)=>`<${n}(…)>`).join(", ")} take a head`);return this.finishTag(i,t,e),i}finishTag(t,e,r){if(this.parseAttrs(t),t.selfClosed||kt.has(t.tag)){t.selfClosed=!0,t.loc={offset:r,length:this.pos-r};return}let s=t.tag==="#dynamic"?"#dynamic":t.tag;t.children=[];while(!0)if(t.children.push(...this.parseNodes([...e,s])),this.closeStatus(s,r,e)!=="stray")break;t.loc={offset:r,length:this.pos-r}}closeStatus(t,e,r){if(this.eof())return this.report("LIPS-P006","error",`Unclosed <${t==="#fragment"?"":t}> — reached end of template`,e,1,`Add </${t==="#fragment"||t==="#dynamic"?"":t}>`),"eof";if(!this.startsWith("</"))return"closed";let s=this.pos;if(this.pos+=2,this.peek()===">"){if(this.pos++,t!=="#fragment"&&t!=="#dynamic")this.report("LIPS-P004","warning",`Generic '</>' closes <${t}>`,s,3,`Prefer </${t}>`);return"closed"}let i=this.pos;while(!this.eof()&&/[A-Za-z0-9_-]/.test(this.peek()))this.pos++;let n=this.src.slice(i,this.pos).toLowerCase();if(this.skipSpace(),this.peek()===">"?this.pos++:this.report("LIPS-P001","error","Malformed closing tag",s,this.pos-s),n===t)return"closed";if(r.includes(n))return this.report("LIPS-P004","warning",`</${n}> auto-closes <${t}>`,s,this.pos-s,`Add the missing </${t}> before </${n}>`),this.pos=s,"ancestor";return this.report("LIPS-P005","error",`Stray closing tag </${n}> — <${t}> is open`,s,this.pos-s),"stray"}parseAttrs(t){while(!0){if(this.skipSpace(),this.eof()){this.report("LIPS-P001","error","Unexpected end of template inside tag",t.loc.offset);return}if(this.startsWith("/>")){this.pos+=2,t.selfClosed=!0;return}if(this.peek()===">"){this.pos++;return}let e=this.pos;if(this.startsWith("...")){this.pos+=3;let n=this.readUnquotedValue();t.attrs.push({k:"spread",source:n,loc:{offset:e,length:this.pos-e}});continue}if(this.peek()==="["){this.pos++;let n=this.scanBalanced("]","LIPS-P009");if(n){let a=n.content.split(",").map((o)=>o.trim()).filter(Boolean);t.attrs.push({k:"args",names:a,loc:{offset:e,length:this.pos-e}})}continue}let r=!1;if(this.peek()==="!")r=!0,this.pos++;let s=this.pos;while(!this.eof()&&/[^\s=/>()]/.test(this.peek()))this.pos++;let i=this.src.slice(s,this.pos);if(!i){this.report("LIPS-P009","error",`Invalid attribute syntax at '${this.peek()}'`,this.pos),this.pos++;continue}if(this.peek()==="("){this.pos++;let n=this.scanBalanced(")","LIPS-P010"),a=n?n.content.trim():"",o={offset:e,length:this.pos-e};i.startsWith("on-")?t.attrs.push({k:"event",name:i.slice(3),source:a,loc:o}):t.attrs.push({k:"fn",name:i,source:a,loc:o});continue}if(this.peek()==="="){this.pos++,this.parseAttrValue(t,i,e);continue}t.attrs.push({k:"bool",name:i,value:!r,loc:{offset:e,length:this.pos-e}})}}parseAttrValue(t,e,r){let s=this.peek();if(s==='"'||s==="'"){this.pos++;let n=this.pos,a=[],o="";while(!this.eof()&&this.peek()!==s){if(this.peek()==="{"){this.pos++;let p=this.scanBalanced("}","LIPS-P007");if(p)o&&a.push(o),o="",a.push({expr:p.content.trim(),loc:p.loc});continue}o+=this.peek(),this.pos++}o&&a.push(o),this.eof()?this.report("LIPS-P010","error",`Unterminated value for '${e}'`,n,this.pos-n):this.pos++;let l={offset:r,length:this.pos-r};a.some((p)=>typeof p!=="string")?t.attrs.push({k:"interp",name:e,parts:a.map((p)=>typeof p==="string"?D(p):p),loc:l}):t.attrs.push({k:"literal",name:e,value:D(a[0]??""),loc:l});return}if(s==="{"){this.pos++;let n=this.scanBalanced("}","LIPS-P007");t.attrs.push({k:"expr",name:e,source:n?n.content.trim():"",loc:{offset:r,length:this.pos-r}});return}let i=this.readUnquotedValue();i?t.attrs.push({k:"expr",name:e,source:i,loc:{offset:r,length:this.pos-r}}):this.report("LIPS-P010","error",`Missing value for attribute '${e}'`,r)}readUnquotedValue(){let t=this.pos,e=0;while(!this.eof()){let r=this.peek();if(r==="'"||r==='"'||r==="`"){this.pos++;while(!this.eof()&&this.peek()!==r){if(this.peek()==="\\")this.pos++;this.pos++}this.pos++;continue}if(e===0){if(/\s/.test(r)||r===">")break;if(r==="/"&&this.peek(1)===">")break}if(r==="("||r==="["||r==="{")e++;else if(r===")"||r==="]"||r==="}")e--;this.pos++}return this.src.slice(t,this.pos).trim()}}function M(t){return new H(t||"").parse()}function St(t){let e=Et(t||""),r=(t||"").slice(0,e).trimEnd(),s=(t||"").slice(e),i=new H(s).parse(),n=r?r.split(`
|
|
3
|
+
`).length+(/\n\s*\n$/.test(t.slice(0,e))?1:0):0;return i.diagnostics.forEach((a)=>{a.loc.line+=r?t.slice(0,e).split(`
|
|
4
|
+
`).length-1:0,a.loc.offset+=e}),{script:r,...i}}function Et(t){let e=0,r=!0;for(let s=0;s<t.length;s++){let i=t[s];if(i==="'"||i==='"'||i==="`"){let n=i;s++;while(s<t.length&&t[s]!==n){if(t[s]==="\\")s++;s++}r=!1;continue}if(i==="/"&&t[s+1]==="/"){while(s<t.length&&t[s]!==`
|
|
5
|
+
`)s++;r=!0;continue}if(i==="/"&&t[s+1]==="*"){let n=t.indexOf("*/",s+2);s=n===-1?t.length:n+1;continue}if(i===`
|
|
6
|
+
`){r=!0;continue}if(r&&e===0&&i==="<"&&/[A-Za-z{>!]/.test(t[s+1]||""))return s;if(i==="("||i==="["||i==="{")e++;else if(i===")"||i==="]"||i==="}")e=Math.max(0,e-1);if(!/\s/.test(i))r=!1}return 0}var kt,yt,Q,vt;var V=xt(()=>{kt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),yt=new Set(["pre","textarea"]),Q=new Set(["if","else-if","switch","log"]),vt={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":" "}});V();var It=["===","!==","...","=>","==","!=","<=",">=","&&","||","??","?.","++","--","+=","-=","*=","/=","%=","+","-","*","/","%","<",">","!","?",":",".",",","(",")","[","]","{","}","="];function Pt(t,e){let r=[],s=0,i=(a)=>/[A-Za-z_$]/.test(a),n=(a)=>/[A-Za-z0-9_$]/.test(a);while(s<t.length){let a=t[s];if(/\s/.test(a)){s++;continue}if(/[0-9]/.test(a)||a==="."&&/[0-9]/.test(t[s+1])){let l=s;while(s<t.length&&/[0-9]/.test(t[s]))s++;if(t[s]==="."){s++;while(s<t.length&&/[0-9]/.test(t[s]))s++}if(t[s]==="e"||t[s]==="E"){if(s++,t[s]==="+"||t[s]==="-")s++;while(s<t.length&&/[0-9]/.test(t[s]))s++}r.push({t:"num",value:t.slice(l,s),start:l,end:s});continue}if(a==="'"||a==='"'){let l=s;s++;let p="",d=!1;while(s<t.length){let v=t[s];if(v==="\\"){let E=t[s+1],k={n:`
|
|
7
|
+
`,t:"\t",r:"\r",b:"\b",f:"\f",v:"\v","0":"\x00"};if(E==="u"){let x=t.slice(s+2,s+6);p+=String.fromCharCode(parseInt(x,16)||0),s+=6}else p+=k[E]??E,s+=2;continue}if(v===a){d=!0,s++;break}p+=v,s++}if(!d)e.push({code:"LIPS-E001",message:"Unterminated string literal",loc:{offset:l,length:s-l}});r.push({t:"str",value:p,start:l,end:s});continue}if(i(a)){let l=s;while(s<t.length&&n(t[s]))s++;r.push({t:"id",value:t.slice(l,s),start:l,end:s});continue}let o=It.find((l)=>t.startsWith(l,s));if(o==="?."&&/[0-9]/.test(t[s+2]??""))o="?";if(o){r.push({t:"punct",value:o,start:s,end:s+o.length}),s+=o.length;continue}e.push({code:"LIPS-E002",message:`Unexpected character '${a}'`,loc:{offset:s,length:1}}),s++}return r.push({t:"eof",value:"",start:t.length,end:t.length}),r}class tt{tokens;diagnostics;pos=0;constructor(t,e){this.tokens=t;this.diagnostics=e}peek(t=0){return this.tokens[Math.min(this.pos+t,this.tokens.length-1)]}next(){return this.tokens[this.pos++]??this.tokens[this.tokens.length-1]}at(t){let e=this.peek();return e.t==="punct"&&e.value===t}eat(t){if(this.at(t))return this.pos++,!0;return!1}error(t,e,r=this.peek()){return this.diagnostics.push({code:t,message:e,loc:{offset:r.start,length:Math.max(1,r.end-r.start)}}),{t:"error"}}expect(t,e){if(!this.eat(t))this.error(e,`Expected '${t}'`)}parse(){let t=this.assign();if(this.peek().t!=="eof")this.error("LIPS-E003",`Unexpected token '${this.peek().value}' after expression`);return t}isArrowAhead(){let t=this.peek();if(t.t==="id"){let e=this.peek(1);return e.t==="punct"&&e.value==="=>"}if(t.t==="punct"&&t.value==="("){let e=0,r=0;while(!0){let s=this.peek(r);if(s.t==="eof")return!1;if(s.t==="punct"&&s.value==="(")e++;if(s.t==="punct"&&s.value===")"){if(e--,e===0){let i=this.peek(r+1);return i.t==="punct"&&i.value==="=>"}}r++}}return!1}assign(){if(this.isArrowAhead()){let r=[];if(this.peek().t==="id")r.push(this.next().value);else{this.expect("(","LIPS-E004");while(!this.at(")")&&this.peek().t!=="eof"){let s=this.next();if(s.t!=="id")return this.error("LIPS-E005","Invalid arrow parameter",s);if(r.push(s.value),!this.eat(","))break}this.expect(")","LIPS-E004")}return this.expect("=>","LIPS-E004"),{t:"arrow",params:r,body:this.assign()}}let t=this.conditional(),e=this.peek();if(e.t==="punct"&&["=","+=","-=","*=","/=","%="].includes(e.value)){if(t.t!=="id"&&t.t!=="member")return this.error("LIPS-E006","Invalid assignment target",e);return this.next(),{t:"assign",op:e.value,target:t,value:this.assign()}}return t}conditional(){let t=this.nullish();if(this.eat("?")){let e=this.assign();return this.expect(":","LIPS-E007"),{t:"cond",test:t,cons:e,alt:this.assign()}}return t}nullish(){let t=this.or();while(this.at("??"))this.next(),t={t:"logic",op:"??",l:t,r:this.or()};return t}or(){let t=this.and();while(this.at("||"))this.next(),t={t:"logic",op:"||",l:t,r:this.and()};return t}and(){let t=this.equality();while(this.at("&&"))this.next(),t={t:"logic",op:"&&",l:t,r:this.equality()};return t}equality(){let t=this.relational();while(["===","!==","==","!="].some((e)=>this.at(e)))t={t:"bin",op:this.next().value,l:t,r:this.relational()};return t}relational(){let t=this.additive();while(["<=",">=","<",">"].some((e)=>this.at(e)))t={t:"bin",op:this.next().value,l:t,r:this.additive()};return t}additive(){let t=this.multiplicative();while(this.at("+")||this.at("-"))t={t:"bin",op:this.next().value,l:t,r:this.multiplicative()};return t}multiplicative(){let t=this.unary();while(this.at("*")||this.at("/")||this.at("%"))t={t:"bin",op:this.next().value,l:t,r:this.unary()};return t}unary(){if(this.at("!")||this.at("-")||this.at("+"))return{t:"unary",op:this.next().value,arg:this.unary()};if(this.at("++")||this.at("--")){let t=this.next().value,e=this.unary();if(e.t!=="id"&&e.t!=="member")return this.error("LIPS-E006","Invalid update target");return{t:"update",op:t,arg:e,prefix:!0}}return this.postfix()}postfix(){let t=this.callMember();if(this.at("++")||this.at("--")){let e=this.next().value;if(t.t!=="id"&&t.t!=="member")return this.error("LIPS-E006","Invalid update target");t={t:"update",op:e,arg:t,prefix:!1}}return t}callMember(){let t=this.primary();while(!0)if(this.eat(".")){let e=this.next();if(e.t!=="id")return this.error("LIPS-E008","Expected property name",e);t={t:"member",obj:t,prop:e.value,computed:!1,optional:!1,at:e.start}}else if(this.eat("?."))if(this.at("("))t={t:"call",callee:t,args:this.argList(),optional:!0};else if(this.eat("[")){let e=this.peek().start,r=this.assign();this.expect("]","LIPS-E009"),t={t:"member",obj:t,prop:r,computed:!0,optional:!0,at:e}}else{let e=this.next();if(e.t!=="id")return this.error("LIPS-E008","Expected property name",e);t={t:"member",obj:t,prop:e.value,computed:!1,optional:!0,at:e.start}}else if(this.eat("[")){let e=this.peek().start,r=this.assign();this.expect("]","LIPS-E009"),t={t:"member",obj:t,prop:r,computed:!0,optional:!1,at:e}}else if(this.at("("))t={t:"call",callee:t,args:this.argList(),optional:!1};else break;return t}argList(){this.expect("(","LIPS-E010");let t=[];while(!this.at(")")&&this.peek().t!=="eof")if(t.push(this.assign()),!this.eat(","))break;return this.expect(")","LIPS-E010"),t}primary(){let t=this.peek();if(t.t==="num")return this.next(),{t:"lit",v:parseFloat(t.value)};if(t.t==="str")return this.next(),{t:"lit",v:t.value};if(t.t==="id")switch(this.next(),t.value){case"true":return{t:"lit",v:!0};case"false":return{t:"lit",v:!1};case"null":return{t:"lit",v:null};case"undefined":return{t:"lit",v:void 0};case"NaN":return{t:"lit",v:NaN};case"Infinity":return{t:"lit",v:1/0};default:return{t:"id",name:t.value,at:t.start}}if(this.eat("(")){let e=this.assign();return this.expect(")","LIPS-E010"),e}if(this.eat("[")){let e=[];while(!this.at("]")&&this.peek().t!=="eof"){let r=this.eat("...");if(e.push({spread:r||void 0,value:this.assign()}),!this.eat(","))break}return this.expect("]","LIPS-E009"),{t:"arr",items:e}}if(this.eat("{")){let e=[];while(!this.at("}")&&this.peek().t!=="eof"){if(this.eat("..."))e.push({spread:!0,value:this.assign()});else{let r=this.next();if(r.t!=="id"&&r.t!=="str"&&r.t!=="num")return this.error("LIPS-E011","Invalid object key",r);if(this.eat(":"))e.push({key:String(r.value),value:this.assign(),at:r.start});else if(r.t==="id")e.push({key:r.value,value:{t:"id",name:r.value,at:r.start},at:r.start});else return this.error("LIPS-E011","Invalid shorthand property",r)}if(!this.eat(","))break}return this.expect("}","LIPS-E011"),{t:"obj",props:e}}return this.next(),this.error("LIPS-E012",t.t==="eof"?"Unexpected end of expression":`Unexpected token '${t.value}'`,t)}}function _(t){let e=[],r=Pt(t,e);return{ast:new tt(r,e).parse(),diagnostics:e}}function et(t){let e=new Set,r=(s,i)=>{switch(s.t){case"id":!i.has(s.name)&&e.add(s.name);return;case"member":r(s.obj,i),typeof s.prop!=="string"&&r(s.prop,i);return;case"call":r(s.callee,i),s.args.forEach((n)=>r(n,i));return;case"unary":case"update":r(s.arg,i);return;case"bin":case"logic":r(s.l,i),r(s.r,i);return;case"cond":r(s.test,i),r(s.cons,i),r(s.alt,i);return;case"assign":r(s.target,i),r(s.value,i);return;case"arrow":r(s.body,new Set([...i,...s.params]));return;case"arr":s.items.forEach((n)=>r(n.value,i));return;case"obj":s.props.forEach((n)=>r(n.value,i));return}};return r(t,new Set),[...e]}var $t="<!--$-->",Rt=new Set(["if","else-if","else","for","switch","async","let","const","log","context","i18n"]),wt=new Set(["case","default","then","catch","loading"]),Lt=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","symbol","text","tspan","use"]),Nt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ct=(t)=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Tt=(t)=>t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),st=(t)=>t!==""&&!isNaN(Number(t)),rt=(t)=>{let e=t.trim(),r=0;for(let s=0;s<e.length;s++){let i=e[s];if(i==="'"||i==='"'||i==="`"){s++;while(s<e.length&&e[s]!==i){if(e[s]==="\\")s++;s++}continue}if(i==="("||i==="["||i==="{")r++;else if(i===")"||i==="]"||i==="}"){if(r--,r===0&&e[0]==="{"&&s===e.length-1)return rt(e.slice(1,-1))}else if(r===0){if(i==="?")return!1;if(i===":")return!0}}return!1},At=(t)=>{if(t.k==="expr")return t.source;if(t.k!=="interp")return"";let e=t.parts.filter((r)=>typeof r!=="string");return e.length===1&&t.parts.every((r)=>typeof r!=="string"||!r.trim())?e[0].expr:""};class it{src;macros;tree;exprs=[];exprIndex=new Map;lineStarts=null;macroStack=[];diagnostics=[];constructor(t,e=new Map,r=!1){this.src=t;this.macros=e;this.tree=r}locate(t){if(!this.lineStarts){this.lineStarts=[0];for(let s=0;s<this.src.length;s++)if(this.src[s]===`
|
|
8
|
+
`)this.lineStarts.push(s+1)}let e=0,r=this.lineStarts.length-1;while(e<r){let s=e+r+1>>1;this.lineStarts[s]<=t?e=s:r=s-1}return{line:e+1,col:t-this.lineStarts[e]+1}}report(t,e,r,s,i=1,n){let{line:a,col:o}=this.locate(s);this.diagnostics.push({code:t,severity:e,message:r,hint:n,loc:{line:a,col:o,offset:s,length:i}})}expr(t,e){let r=this.exprIndex.get(t);if(r!==void 0)return r;let{diagnostics:s}=_(t);for(let n of s){let a=(e?.offset??0)+n.loc.offset;this.report(n.code,"error",n.message,a,n.loc.length)}let i=this.exprs.length;return this.exprs.push(t),this.exprIndex.set(t,i),i}synth(t){let e=this.exprIndex.get(t);if(e!==void 0)return e;let r=this.exprs.length;return this.exprs.push(t),this.exprIndex.set(t,r),r}concat(t){t.filter((r)=>typeof r!=="string").forEach((r)=>{let{diagnostics:s}=_(r.expr);for(let i of s)this.report(i.code,"error",i.message,r.loc.offset+i.loc.offset,i.loc.length)});let e=t.map((r)=>typeof r==="string"?JSON.stringify(r):`((${r.expr})??"")`).join("+");return this.synth(e)}compInput(t){switch(t.k){case"literal":return{lit:t.value};case"bool":return{lit:t.value};case"expr":return{e:this.expr(t.source,t.loc)};case"interp":return{e:this.concat(t.parts)}}}compile(t){return{v:1,exprs:this.exprs,root:this.block(t,[])}}block(t,e){let r={html:"",scope:[...e],binds:[],blocks:[]},s=[],i=this.tree,n=[],a=(o,l,p,d=!1,v)=>{let E=0,k=!1,x=()=>(s.push($t),i&&p.push(0),k=!1,[...l,E++]);for(let I=0;I<o.length;I++){let u=o[I];switch(u.t){case"text":{if(d){let g={t:"text",p:x(),e:this.synth(JSON.stringify(u.value)),i18n:1};if(v)g.ik=v;r.binds.push(g);break}if(s.push(Ct(u.value)),i&&(k?p[p.length-1]+=u.value:p.push(u.value)),!k)E++;k=!0;break}case"comment":{if(i)break;let g=u.value.replace(/--/g,"- -");s.push(`<!--${/^-?>/.test(g)?" "+g:g}-->`),k=!1,E++;break}case"interp":{let g={t:"text",p:x(),e:this.concat(u.parts)};if(d)g.i18n=1;if(d&&v)g.ik=v;r.binds.push(g);break}case"fragment":{o=[...o.slice(0,I),...u.children,...o.slice(I+1)],I--;break}case"element":{if(Rt.has(u.tag)){if(this.controlBlock(u,o,I,x(),r,e),u.tag==="if"){let g=I+1;while(g<o.length){let R=o[g];if(R.t==="element"&&(R.tag==="else-if"||R.tag==="else"))g++;else break}o=[...o.slice(0,I+1),...o.slice(g)]}break}if(wt.has(u.tag)){this.report("LIPS-C002","error",`<${u.tag}> is only valid inside its parent construct`,u.loc.offset,u.loc.length);break}if(u.tag==="#dynamic"){r.blocks.push(this.compLike(u,x(),e,"dynamic"));break}if(this.macros.has(u.tag)){let g=this.macroCall(u,x(),e);g&&r.blocks.push(g);break}if(!Lt.has(u.tag)){r.blocks.push(this.compLike(u,x(),e,"comp"));break}this.emitElement(u,l,E++,s,r,a,p),k=!1;break}}}};if(a(t,[],n),r.html=s.join(""),i)r.nodes=n;return r}emitElement(t,e,r,s,i,n,a){let o=[...e,r],l=`<${t.tag}`,p=[t.tag],d={},v=(c,b)=>{Object.prototype.hasOwnProperty.call(d,c)||(d[c]=b)};this.tree&&a.push(p);let E=t.attrs.filter((c)=>("name"in c)),k=E.some((c)=>c.name==="i18n"&&(c.k==="bool"&&c.value||c.k==="literal")),x=(c)=>k&&(c==="title"||c==="placeholder"),I=(c)=>{let b=E.find((w)=>w.name===c&&w.k==="literal");return b&&"value"in b&&b.value?String(b.value):void 0},u=I("i18n"),g=(c)=>I(`i18n-${c}`);!k&&E.some((c)=>c.name.startsWith("i18n-"))&&this.report("LIPS-C014","warning",`i18n-* key on <${t.tag}> without the 'i18n' marker — the attribute will not be translated`,t.loc.offset,t.loc.length);for(let c of t.attrs){if(this.tree&&"name"in c&&c.name==="@html"){this.report("LIPS-C021","error",`@html on <${t.tag}>: the 'tree' target has no HTML parser`,c.loc.offset,c.loc.length,"Write the markup in the template, or use @text");continue}if("name"in c&&c.name==="style"){let b=At(c);if(b&&rt(b)){this.report("LIPS-C019","error",`style= on <${t.tag}> takes CSS text, not an object literal`,c.loc.offset,c.loc.length,'Write the declarations as CSS — style="border: 2px solid gray; margin: 3rem" — '+`and interpolate values into it where they vary: style="margin: {state.gap}rem". Styles that need pseudo-classes, media queries or keyframes belong in the component's stylesheet.`);continue}}if(this.quotedEvent(t.tag,c))continue;switch(c.k){case"literal":if(c.name==="@format"){i.binds.push(this.formatBind(o,c));break}if(c.name.startsWith("@")){i.binds.push({t:"prop",p:o,name:c.name.slice(1),e:this.synth(JSON.stringify(c.value))});break}if(c.name==="i18n"||c.name.startsWith("i18n-"))break;if(x(c.name)){let b={t:"attr",p:o,name:c.name,e:this.synth(JSON.stringify(c.value)),i18n:1},w=g(c.name);if(w)b.ik=w;i.binds.push(b);break}l+=` ${c.name}="${Tt(c.value)}"`,v(c.name,c.value);break;case"bool":if(c.name!=="i18n"&&c.value)l+=` ${c.name}`,v(c.name,"");break;case"expr":{if(c.name==="@format"){i.binds.push(this.formatBind(o,c));break}if(c.name.startsWith("@")){i.binds.push({t:"prop",p:o,name:c.name.slice(1),e:this.expr(c.source,c.loc)});break}let b={t:"attr",p:o,name:c.name,e:this.expr(c.source,c.loc)};if(x(c.name)){b.i18n=1;let w=g(c.name);if(w)b.ik=w}i.binds.push(b);break}case"interp":{if(c.name==="@format"){i.binds.push(this.formatBind(o,c));break}if(c.name.startsWith("@")){i.binds.push({t:"prop",p:o,name:c.name.slice(1),e:this.concat(c.parts)});break}let b={t:"attr",p:o,name:c.name,e:this.concat(c.parts)};if(x(c.name)){b.i18n=1;let w=g(c.name);if(w)b.ik=w}i.binds.push(b);break}case"event":i.binds.push({t:"event",p:o,name:c.name,e:this.synth(c.source)});break;case"spread":i.binds.push({t:"spread",p:o,e:this.expr(c.source,c.loc)});break;case"fn":this.report("LIPS-C007","warning",`Callable attribute '${c.name}(…)' has no meaning on <${t.tag}>`,c.loc.offset,c.loc.length);break;case"args":this.report("LIPS-C008","warning",`Iterator arguments are not applicable to <${t.tag}>`,c.loc.offset,c.loc.length);break}}if(Object.keys(d).length&&(p[1]=d),Nt.has(t.tag)){s.push(l+">");return}s.push(l+">");let N=u,j=t.children.filter((c)=>c.t==="text"||c.t==="interp");if(N&&(j.length>1||j.some((c)=>c.t==="interp")))this.report("LIPS-C015","error",`<${t.tag} i18n="${N}"> keys text that is not a single fixed string. Use @format="${N}, { … }" for interpolated text.`,t.loc.offset,t.loc.length),N=void 0;let f=[];if(t.children.length&&n(t.children,o,f,k,N),f.length)p[1]=d,p[2]=f;s.push(`</${t.tag}>`)}formatBind(t,e){let r=e.k==="literal"?e.value:e.k==="expr"?e.source:e.parts.map((a)=>typeof a==="string"?a:`{${a.expr}}`).join(""),s=r.indexOf(",");if(s===-1)return this.report("LIPS-C012","error",'@format expects "reference, { params }"',e.loc.offset,e.loc.length),{t:"prop",p:t,name:"format",e:this.synth("({})"),ref:r.trim()};let i=r.slice(0,s).trim(),n=r.slice(s+1).trim();return{t:"prop",p:t,name:"format",e:this.expr(n,e.loc),ref:i}}attrsOf(t){let e=new Map,r=[];for(let s of t.attrs)if(s.k==="args")r.push(...s.names);else if("name"in s)e.set(s.name,s);return{byName:e,args:r}}controlBlock(t,e,r,s,i,n){switch(t.tag){case"if":{let a=[{when:t.head?this.expr(t.head.expr,t.head.loc):this.missingHead(t),block:this.block(t.children,n)}];for(let o=r+1;o<e.length;o++){let l=e[o];if(l.t!=="element")break;if(l.tag==="else-if")a.push({when:l.head?this.expr(l.head.expr,l.head.loc):this.missingHead(l),block:this.block(l.children,n)});else if(l.tag==="else"){a.push({when:null,block:this.block(l.children,n)});break}else break}i.blocks.push({t:"if",p:s,branches:a});break}case"else-if":case"else":this.report("LIPS-C001","error",`<${t.tag}> without a preceding <if>`,t.loc.offset,t.loc.length);break;case"for":{let{byName:a,args:o}=this.attrsOf(t),l=a.get("in"),p=a.get("from"),d=a.get("to"),v=a.get("by");if(!l&&!p){this.report("LIPS-C004","error","<for> requires 'in' or 'from'/'to'",t.loc.offset,t.loc.length);break}let E={t:"for",p:s,args:o,block:this.block(t.children,[...n,...o])};if(l&&l.k==="expr")E.of=this.expr(l.source,l.loc);if(p)E.from=this.numInput(p);if(d)E.to=this.numInput(d);if(v&&(v.k==="literal"||v.k==="expr"))E.by=v.k==="literal"?{lit:v.value}:{e:this.expr(v.source,v.loc)};i.blocks.push(E);break}case"switch":{let a=t.head?this.expr(t.head.expr,t.head.loc):this.missingHead(t),o=[];for(let l of t.children){if(l.t!=="element")continue;if(l.tag==="case"){let{byName:p}=this.attrsOf(l),d=p.get("is");if(!d||d.k!=="literal"&&d.k!=="expr"){this.report("LIPS-C004","error","<case> requires an 'is' attribute",l.loc.offset,l.loc.length);continue}o.push({is:d.k==="literal"?{lit:d.value}:{e:this.expr(d.source,d.loc)},block:this.block(l.children,n)})}else if(l.tag==="default")o.push({is:null,block:this.block(l.children,n)});else this.report("LIPS-C003","error","Only <case>/<default> are valid inside <switch>",l.loc.offset,l.loc.length)}i.blocks.push({t:"switch",p:s,on:a,cases:o});break}case"async":{let a=t.attrs.find((l)=>l.k==="fn"&&l.name==="await");if(!a){this.report("LIPS-C004","error","<async> requires await(…)",t.loc.offset,t.loc.length);break}let o={t:"async",p:s,awaitE:this.expr(a.source,a.loc)};for(let l of t.children){if(l.t!=="element")continue;let{args:p}=this.attrsOf(l);if(l.tag==="then")o.then={args:p,block:this.block(l.children,[...n,...p])};else if(l.tag==="catch")o.catch={args:p,block:this.block(l.children,[...n,...p])};else if(l.tag==="loading")o.loading=this.block(l.children,n);else this.report("LIPS-C003","error","Only <then>/<catch>/<loading> are valid inside <async>",l.loc.offset,l.loc.length)}i.blocks.push(o);break}case"let":case"const":{let a={};for(let o of t.attrs){if(o.k==="spread"){this.report("LIPS-C013","error",`Spread is not supported on <${t.tag}> — scope names must be known at compile time`,o.loc.offset,o.loc.length,`Assign it to one variable: <${t.tag} obj={ ${o.source} }/> and read obj.<key>`);continue}if(o.k==="literal"||o.k==="expr"||o.k==="interp"||o.k==="bool")a[o.name]=this.compInput(o),!i.scope.includes(o.name)&&i.scope.push(o.name),!n.includes(o.name)&&n.push(o.name)}i.blocks.push({t:"let",p:s,const:t.tag==="const",vars:a});break}case"log":i.blocks.push({t:"log",p:s,e:t.head?this.synth(t.head.expr):this.missingHead(t)});break;case"context":{let a={};for(let o of t.attrs){if(o.k==="spread"){this.report("LIPS-C016","error","Spread is not supported on <context> — provided keys must be known at compile time",o.loc.offset,o.loc.length,"Provide them one by one: <context a=obj.a b=obj.b>");continue}if(o.k==="literal"||o.k==="expr"||o.k==="interp"||o.k==="bool")a[o.name]=this.compInput(o)}if(!Object.keys(a).length)this.report("LIPS-C017","warning","<context> provides nothing — it renders its children unchanged",t.loc.offset,t.loc.length);i.blocks.push({t:"provide",p:s,vars:a,block:this.block(t.children,n)});break}case"i18n":{let{byName:a}=this.attrsOf(t),o=a.get("lang");if(!o){this.report("LIPS-C018","error","<i18n> requires a 'lang' attribute: <i18n lang=state.docLang>",t.loc.offset,t.loc.length);break}i.blocks.push({t:"provide",p:s,vars:{},lang:this.compInput(o),block:this.block(t.children,n)});break}}}missingHead(t){return this.report("LIPS-C004","error",`<${t.tag}> requires a head expression: <${t.tag}( … )>`,t.loc.offset,t.loc.length),this.synth("undefined")}numInput(t){if(t.k==="literal")return{lit:st(t.value)?Number(t.value):t.value};if(t.k==="expr")return st(t.source)?{lit:Number(t.source)}:{e:this.expr(t.source,t.loc)};return{lit:void 0}}macroCall(t,e,r){let s=this.macros.get(t.tag);if(this.macroStack.includes(s.name))return this.report("LIPS-C009","error",`Recursive macro <${s.name}> (${[...this.macroStack,s.name].join(" → ")})`,t.loc.offset,t.loc.length),null;let i=[];for(let a of t.attrs)if(a.k==="literal"||a.k==="expr"||a.k==="interp"||a.k==="bool")i.push({name:a.name,ci:this.compInput(a)});else if(a.k==="spread")i.push({spread:this.expr(a.source,a.loc)});this.macroStack.push(s.name);let n=this.block(s.children,[...r,...s.argv]);return this.macroStack.pop(),{t:"macro",p:e,name:s.name,sets:i,args:s.argv,block:n}}quotedEvent(t,e){if(!("name"in e)||!e.name.startsWith("on-"))return!1;return this.report("LIPS-C020","error",`${e.name}="…" on <${t}> wires no listener`,e.loc.offset,e.loc.length,`Handlers use the instruction form: ${e.name}( … ). `+"Quoted, it is an ordinary attribute — the handler never runs and the source is emitted into the DOM."),!0}compLike(t,e,r,s){let i={},n=[],a=[],o=[];for(let p of t.attrs){if(p.k!=="event"&&this.quotedEvent(t.tag,p))continue;switch(p.k){case"literal":case"bool":case"expr":case"interp":i[p.name]=this.compInput(p);break;case"event":a.push({name:p.name,e:this.synth(p.source)});break;case"spread":n.push(this.expr(p.source,p.loc));break;case"args":o=[...o,...p.names];break;case"fn":i[p.name]={e:this.expr(p.source,p.loc)};break}}let l=t.children.length?{args:o,block:this.block(t.children,[...r,...o])}:void 0;return s==="comp"?{t:"comp",p:e,name:t.tag,inputs:i,spreads:n,events:a,contents:l}:{t:"dynamic",p:e,tag:this.expr(t.dynamicTag.expr,t.dynamicTag.loc),inputs:i,spreads:n,events:a,contents:l}}}function Ot(t,e,r){let s=new Map;if(!t?.trim())return s;let i=M(t);e.push(...i.diagnostics),r?.(i.root.children,e,t);for(let n of i.root.children){if(n.t!=="element")continue;if(n.tag!=="macro"){e.push({code:"LIPS-C010",severity:"warning",message:`Only <macro> definitions are allowed in the macros source — ignoring <${n.tag}>`,loc:{line:1,col:1,offset:n.loc.offset,length:n.loc.length}});continue}let a="",o=[];for(let l of n.attrs)if(l.k==="args")o.push(...l.names);else if(l.k==="literal"&&l.name==="name")a=l.value;if(!a){e.push({code:"LIPS-C011",severity:"error",message:"<macro> requires a name attribute",loc:{line:1,col:1,offset:n.loc.offset,length:n.loc.length}});continue}s.set(a.toLowerCase(),{name:a,argv:o,children:n.children})}return s}function z(t,e){let r=[],s=Ot(e?.macros||"",r,e?.check),i=M(t);e?.check?.(i.root.children,r,t),e?.transform?.(i.root.children,r);let n=new it(t,s,e?.target==="tree");return{ir:n.compile(i.root.children),diagnostics:[...r,...i.diagnostics,...n.diagnostics]}}var _t=null;var jt=/^[-\w]+$/,ct=/^(%|[a-zA-Z]+)/,nt=["<number>","0"];function U(t,e){let r=t[e];e++;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===r)return e+1;e++}return e}function pt(t,e){let r=t.indexOf("*/",e+2);return r<0?t.length:r+2}function Bt(t,e){let r=t.indexOf(`
|
|
9
|
+
`,e+2);return r<0?t.length:r}var Dt=(t)=>t.replace(/["\\]/g,"\\$&");function q(t,e,r){let s=1,i=-1;for(let n=0;n<e;n++)if(t[n]===`
|
|
10
|
+
`)s++,i=n;return{line:s,col:e-i,offset:e,length:r}}function F(t,e){let r=e+1,s=0,i=!1,n=!1;while(r<t.length){let o=t[r];if(o==='"'||o==="'"){r=U(t,r);continue}if(o==="{"||o===";")return null;if(o==="}")break;if(o==="("||o==="[")s++;else if(o===")"||o==="]")s--;else if(s===0){if(o==="?")i=!0;else if(o===":"&&!i)n=!0}r++}if(r>=t.length||n)return null;let a=t.slice(e+1,r).trim();return a?{end:r,expr:a}:null}var Mt=new Set(["state","input","static","context","self"]);function qt(t,e,r,s){let i=[],n=e,a=e,o=0;while(n<t.length){let l=t[n];if(l==='"'||l==="'"){n=U(t,n);continue}if(l==="/"&&t[n+1]==="*"){let p=pt(t,n);if(!r)i.push(t.slice(a,n)," "),a=p;n=p;continue}if(l==="("){o++,n++;continue}if(l===")"){o--,n++;continue}if(o===0&&(l===";"||l==="}"))return i.push(t.slice(a,n)),{end:n,parts:i};if(l==="{"){let p=F(t,n);if(!p)return t.indexOf("}",n+1)<0&&s?.(n),null;i.push(t.slice(a,n));let d=ct.exec(t.slice(p.end+1)),v=d?d[1]:"";i.push({expr:p.expr,unit:v,at:n}),n=p.end+1+v.length,a=n;continue}n++}return i.some((l)=>typeof l!=="string")&&s?.(e),null}var Ut=/^@(-\w+-)?(keyframes|font-face|property|counter-style|font-feature-values|font-palette-values|page|view-transition|position-try|color-profile|function)\b/i,ot=/^@(import|charset|namespace)\b/i,Wt=/^@(media|supports|container|layer|scope|starting-style|document)\b/i,Ht=/^([a-zA-Z_*\\]|[^\x00-\x7f])/,Vt=/^(?:[-\w*|]|[^\x00-\x7f]|\\[\s\S])+/,zt=/&[-_]/,ht=/\s/,at=/[{};]/,lt=/[-\w]/,ut=/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'/g,Ft=new RegExp(`(${ut.source})|\\s+`,"g"),Gt=/\/\*[\s\S]*?\*\//g,Jt=/^@layer\b/i,Zt=(t)=>t.replace(Ft,(e,r)=>r||" ");function Kt(t){let e=[],r=0,s=0;for(let i=0;i<t.length;i++){let n=t[i];if(n==="\\"){i++;continue}if(n==='"'||n==="'"){i=U(t,i)-1;continue}if(n==="("||n==="[")s++;else if(n===")"||n==="]")s--;else if(n===","&&!s)e.push(t.slice(r,i)),r=i+1}return e.push(t.slice(r)),e.map((i)=>{let n=i.trimStart(),a=n.length;while(a&&ht.test(n[a-1])&&n[a-2]!=="\\")a--;if(n=n.slice(0,a),!Ht.test(n))return n;return n.includes("&")?n.replace(Vt,":is($&)"):`& ${n}`}).join(",")}function Yt(t,e,r,s){let i=[],n=[],a=[],o=`--${e.nsp.replace(/[^a-zA-Z0-9_-]/g,"-")}`,l=(h,S,m,y,P)=>s.push({code:h,severity:"error",message:S,hint:P,loc:q(t,m,y)}),p=(h,S,m,y,P)=>s.push({code:h,severity:"warning",message:S,hint:P,loc:q(t,m,y)}),d=(h,S,m,y)=>e.lint?.(h,y)?.forEach((P)=>s.push({...P,loc:q(t,S,m-S)})),v=(h)=>{let S=i.indexOf(h);if(S<0)S=i.push(h)-1;return S},E=(h)=>{let{ast:S,diagnostics:m}=_(h.expr),y=h.expr.length+2;if(m.length){l("LIPS-S004",`Invalid expression: ${m[0].message}`,h.at,y);return}for(let P of et(S))if(!Mt.has(P)&&!(P in globalThis))l("LIPS-S003",`'${P}' is not readable from a stylesheet`,h.at,y,"Stylesheets see state, input, static, context and self — not <for> iterators or <let> names, "+"which are local to a template position.");h.unit&&S.t==="lit"&&typeof S.v==="string"&&p("LIPS-S005",`Unit '${h.unit}' after a string value`,h.at,y,`A unit suffix multiplies a number: drop the unit, or return ${h.unit==="%"?"50":"8"} instead of a string.`)},k="",x="",I="",u=!1,g=(h)=>{if(!h)return;if(u&&I&&!at.test(I)&&!at.test(h[0]))x+=" ";u=!1,x+=h,I=h[h.length-1]},R=(h)=>{k+=x+h,x="",I=h,u=!1},N=()=>{let h=x;return x=I="",u=!1,h},j=(h)=>":"+(Zt(h).trim()||" "),f=0,c=0,b=0,w="",O="",J="",Z=!1,C=[{ctx:e.meta?"top":"style"}],ft=()=>{let h=C[C.length-1],S=x,m;if(h.ctx==="opaque"||d(S,b,f),S[0]==="@")if(h.ctx!=="opaque"&&Ut.test(S))m={ctx:"opaque",hoist:k.length};else if(Wt.test(S))m={ctx:h.ctx,group:S,at:k.length};else m={ctx:"opaque"};else{if(h.ctx==="style"){if(r)zt.test(S.replace(ut,""))&&p("LIPS-S008",`'${S}' joins '&' to a name`,b,f-b,"Native nesting cannot: write the full selector, or use stylisPreprocessor."),x=Kt(S)}m={ctx:h.ctx==="opaque"?"opaque":"style"}}C.push(m),R("{"),m.group&&(m.body=k.length)},K=()=>{let h=C.pop();if(h.group&&!x&&k.length===h.body&&!Jt.test(h.group)){k=k.slice(0,h.at),I="",u=!1;return}if(R("}"),h.hoist===void 0)return;let S=k.slice(h.hoist),m=C.filter((T)=>T.group),y=m.map((T)=>T.group).join("{"),P="}".repeat(m.length);k=k.slice(0,h.hoist),I="",O=y&&y===J?O.slice(0,O.length-P.length)+S+P:O+m.map((T)=>T.group+"{").join("")+S+P,J=y};while(f<t.length){let h=t[f];if(h==="\\"){g(t.slice(f,f+2)),f+=2;continue}let S=h==="/"&&!t.slice(b,f).trim();if(h==="/"&&(t[f+1]==="*"||t[f+1]==="/"&&S)){let m=t[f+1]==="/",y=m?Bt(t,f):pt(t,f);if(!m&&!r)x?g(t.slice(f,y)):k+=t.slice(f,y);else lt.test(I)&<.test(t[y]||"")&&(u=!0);S&&(b=y),f=y;continue}if(h==='"'||h==="'"){let m=U(t,f);g(t.slice(f,m)),f=m;continue}if(ht.test(h)){b===f&&b++,u=!0,f++;continue}if(h==="(")c++;else if(h===")")c--;if(h===":"&&c===0){let m=t.slice(b,f).replace(Gt,"").trim();if(jt.test(m)){let y=qt(t,f+1,!r,(P)=>{Z=!0,l("LIPS-S004","Unterminated interpolation",P,t.length-P,"Close the expression with `}`.")});if(y){let P=y.parts.filter((L)=>typeof L!=="string");for(let L of P)E(L);if(u=!1,m.startsWith("--")&&P.length===1&&!P[0].unit&&y.parts.every((L)=>typeof L!=="string"||!L.trim())){n.push({prop:m,e:v(P[0].expr)}),N(),f=y.end+(t[y.end]===";"?1:0),b=f;continue}let B="";for(let L of y.parts){if(typeof L==="string"){B+=L;continue}let Y=v(L.expr),A=`${o}-${Y}`;if(!n.some((W)=>W.prop===A)){if(n.push({prop:A,e:Y}),L.unit&&!a.some((W)=>W.name===A))a.push({name:A,syntax:nt[0],inherits:!0,initial:nt[1]})}B+=L.unit?`calc(var(${A}) * 1${L.unit})`:`var(${A})`}d(m,b,y.end,B),g(j(B)),f=y.end;continue}}}if(h==="{"){if(c>0){let m=F(t,f);if(m){l("LIPS-S002","Interpolation in an at-rule condition",f,m.end-f+1,"Media and container conditions cannot read custom properties. Keep the condition static.");let y=ct.exec(t.slice(m.end+1));f=m.end+1+(y?y[1].length:0);continue}}if(!t.slice(b,f).trim()){let m=F(t,f);if(m){l("LIPS-S001","Interpolation in a selector",f,m.end-f+1,"Selectors are static in Layer 1. Bind a value inside the rule instead."),f=m.end+1,b=f;continue}}ft(),b=++f;continue}if(h==="}"){if(C.length>1)K();else p("LIPS-S007","Unmatched `}` dropped",f,1),x&&R(";");b=++f;continue}if(h===";"){if(x[0]==="@"&&d(x,b,f),C.length===1&&ot.test(x))w+=N()+";";else R(";");b=++f;continue}g(h),f++}if(C.length>1){Z||p("LIPS-S007","Unclosed `{` closed at the end",t.length,0);while(C.length>1)K()}return ot.test(x)&&(w+=N()+";"),R(""),{css:k,statements:w,hoisted:O,exprs:i,binds:n,props:a}}function G(t,e){let r=[],s=e.preprocess||_t,{css:i,statements:n,hoisted:a,exprs:o,binds:l,props:p}=Yt(t,e,!s,r),d={v:1,nsp:e.nsp,css:"",exprs:[],binds:[]},v=e.meta||!i?i:`${e.scope||`[rel="${Dt(e.nsp)}"]`}{${i}}`,E=a+v,k=e.layer?`@layer ${e.layer}{${E}}`:E,x;try{x=s?s(k):k}catch(g){return r.push({code:"LIPS-S006",severity:"error",message:`Style compilation failed: ${g.message}`,loc:q(t,0,t.length)}),{ir:d,diagnostics:r}}let I=p.map((g)=>`@property ${g.name}{syntax:"${g.syntax}";inherits:${g.inherits};initial-value:${g.initial}}`).join(""),u={v:1,nsp:e.nsp,css:n+I+x,exprs:o,binds:l};if(p.length)u.props=p;return{ir:u,diagnostics:r}}function ce(t,e={}){let r={macros:t.macros,target:e.target},{ir:s,diagnostics:i}=z(t.default||"",r),{default:n,macros:a,stylesheet:o,...l}=t;if(!o)return{template:{...l,ir:s},diagnostics:i};let p=G(o,{nsp:e.name||"lips",preprocess:e.preprocess});return{template:{...l,ir:s,style:p.ir},diagnostics:[...i,...p.diagnostics]}}var Qt=(t)=>JSON.stringify(t),Xt=(t)=>JSON.stringify(t);function pe(t={}){let e=t.include||/\.lips$/,r=t.reportDiagnostics!==!1;return{name:"lips:precompile",enforce:"pre",async transform(s,i){if(!e.test(i))return null;let{parseSFC:n}=await Promise.resolve().then(() => (V(),X)),{script:a}=n(s),o=s.slice(a.length),{ir:l,diagnostics:p}=z(o,{target:t.target});if(r)for(let u of p)this?.warn?.(`[lips] ${u.code} ${u.message} (${i}:${u.loc.line}:${u.loc.col})`);let d=p.filter((u)=>u.severity==="error");if(d.length)throw Error(`[lips] ${i}: ${d[0].message} at line ${d[0].loc.line}:${d[0].loc.col}`);let v=(i.split(/[\\/]/).pop()||"lips").replace(/\.lips$/,""),E=/\bconst\s+stylesheet\s*=\s*`([^`]*)`/.exec(a),k=/\bconst\s+stylesheet\b/.test(a),x=E&&!E[1].includes("${"),I="";if(x){let u=G(E[1],{nsp:v,preprocess:t.preprocess});if(r)for(let R of u.diagnostics)this?.warn?.(`[lips] ${R.code} ${R.message} (${i}:${R.loc.line}:${R.loc.col})`);let g=u.diagnostics.filter((R)=>R.severity==="error");if(g.length)throw Error(`[lips] ${i}: ${g[0].message} at line ${g[0].loc.line}:${g[0].loc.col}`);I=` style: ${Xt(u.ir)},
|
|
11
|
+
`}else if(k&&r)this?.warn?.(`[lips] ${i}: stylesheet could not be precompiled (interpolated template literal) — `+'it ships as source and needs "@lipsjs/lips", not "@lipsjs/lips/runtime".');return{code:`${a}
|
|
12
|
+
const __lips_ir__ = ${Qt(l)};
|
|
10
13
|
export default {
|
|
11
14
|
ir: __lips_ir__,
|
|
12
|
-
${/\bconst\s+state\b/.test(
|
|
13
|
-
${/\bconst\s+handler\b/.test(
|
|
14
|
-
${/\bconst\s+_static\b/.test(
|
|
15
|
-
${/\bconst\s+context\b/.test(
|
|
16
|
-
${
|
|
15
|
+
${I} ${/\bconst\s+state\b/.test(a)?"state,":""}
|
|
16
|
+
${/\bconst\s+handler\b/.test(a)?"handler,":""}
|
|
17
|
+
${/\bconst\s+_static\b/.test(a)?"_static,":""}
|
|
18
|
+
${/\bconst\s+context\b/.test(a)?"context,":""}
|
|
19
|
+
${k&&!x?"stylesheet,":""}
|
|
17
20
|
};
|
|
18
|
-
`,map:null}}}}export{
|
|
21
|
+
`,map:null}}}}export{pe as lipsPlugin,ce as precompile,Qt as serializeIR,Xt as serializeStyleIR};
|
|
19
22
|
|
|
20
|
-
//# debugId=
|
|
23
|
+
//# debugId=363A79A3A896DBCB64756E2164756E21
|