// @bun
var{defineProperty:L,getOwnPropertyNames:B,getOwnPropertyDescriptor:y}=Object,S=Object.prototype.hasOwnProperty;function T(j){return this[j]}var d=(j)=>{var k=(V??=new WeakMap).get(j),z;if(k)return k;if(k=L({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var J of B(j))if(!S.call(k,J))L(k,J,{get:T.bind(j,J),enumerable:!(z=y(j,J))||z.enumerable})}return V.set(j,k),k},V;var C=(j)=>j;function N(j,k){this[j]=C.bind(null,k)}var x=(j,k)=>{for(var z in k)L(j,z,{get:k[z],enumerable:!0,configurable:!0,set:N.bind(k,z)})};var R=(j,k)=>()=>(j&&(k=j(j=0)),k);var A=import.meta.require;function _(j){if(typeof j==="string")return j;if(Array.isArray(j))return j.filter(Boolean).map((k)=>_(k)).join(" ");if(j&&typeof j==="object")return Object.entries(j).filter(([,k])=>k).map(([k])=>k).join(" ");return j?String(j):""}function i(j,k){if(!/:[\w-]+=/.test(j))return j;let z=j,J=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,P=[],D;while((D=J.exec(j))!==null)P.push([D.index,D.index+D[0].length]);function K(G){return P.some(([H,W])=>G>=H&&G<W)}let O=/<([a-zA-Z][a-zA-Z0-9-]*)((?:\s+(?:[^>"']|"[^"]*"|'[^']*'))*)\s*\/?>/g,$=[];while((D=O.exec(z))!==null){if(K(D.index))continue;let G=D[0],H=D[2];if(!H||!H.includes(":"))continue;let W=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,F,q=H,Y=!1;while((F=W.exec(H))!==null){let Q=F[1],I=F[2];if(I.includes("()")&&!I.includes(".get(")||I.includes("$store")||I.includes("$ref"))continue;try{let Z=Object.keys(k),f=Object.values(k),b=I.match(/^([a-zA-Z_$][\w$]*)/);if(b&&!Z.includes(b[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes(b[1]))continue;let U=Function(...Z,`return (${I})`)(...f);if(Q==="class"){let X=_(U);if(X){let E=q.match(/\sclass="([^"]*)"/);if(E)q=q.replace(E[0],` class="${E[1]} ${X}"`);else q=q.replace(F[0],` class="${X}"`)}else q=q.replace(F[0],"");Y=!0;continue}if(g.has(Q)){if(U)q=q.replace(F[0],` ${Q}`);else q=q.replace(F[0],"");Y=!0;continue}if(U===null||U===void 0||U===!1)q=q.replace(F[0],"");else{let X=String(U).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");q=q.replace(F[0],` ${Q}="${X}"`)}Y=!0}catch{continue}}if(Y){let Q=G.endsWith("/>")?" /":"",Z=`<${D[1]}${q}${Q}>`;$.push({start:D.index,end:D.index+G.length,replacement:Z})}}for(let G=$.length-1;G>=0;G--){let{start:H,end:W,replacement:F}=$[G];z=z.slice(0,H)+F+z.slice(W)}return z}var g;var M=R(()=>{g=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"])});M();export{i as processServerBindings};
