@jxsuite/compiler 0.33.0 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/compiler.js CHANGED
@@ -1,4 +1,4 @@
1
- import{createRequire as B3}from"node:module";var Q3=Object.create;var{getPrototypeOf:G3,defineProperty:D1,getOwnPropertyNames:J3}=Object;var Y3=Object.prototype.hasOwnProperty;function q3(Z){return this[Z]}var U3,K3,o4=(Z,X,W)=>{var Q=Z!=null&&typeof Z==="object";if(Q){var J=X?U3??=new WeakMap:K3??=new WeakMap,Y=J.get(Z);if(Y)return Y}W=Z!=null?Q3(G3(Z)):{};let G=X||!Z||!Z.__esModule?D1(W,"default",{value:Z,enumerable:!0}):W;for(let V of J3(Z))if(!Y3.call(G,V))D1(G,V,{get:q3.bind(Z,V),enumerable:!0});if(Q)J.set(Z,G);return G};var r4=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var V3=(Z)=>Z;function F3(Z,X){this[Z]=V3.bind(null,X)}var U8=(Z,X)=>{for(var W in X)D1(Z,W,{get:X[W],enumerable:!0,configurable:!0,set:F3.bind(X,W)})};var p=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var E2=B3(import.meta.url);function L1(Z){let X=Z.$map;return X&&typeof X==="object"?X:void 0}function h2(Z){return V8.has(Z)}function L2(Z,X,W,Q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return S2(Z,X,W,Q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return M3(Z.$ref,X,W,Q);if(Array.isArray(Z))return Z.map((J)=>L2(J,X,W,Q));return Z}function M3(Z,X,W,Q){if(Z==="$reduce/acc")return Q?.acc;if(Z.startsWith("$reduce/"))return Q?.acc;if(Z.startsWith("event#/")){let J=Z.slice(7);return z0(W,J)}if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J,G,V=L1(X);if(Y==="item")G=Q?.item??V?.item??X["$map/item"];else if(Y==="index")G=Q?.index??V?.index??X["$map/index"];else G=V?.[Y]??X[`$map/${Y}`];return J.length>2?z0(G,J.slice(2).join("/")):G}if(Z.startsWith("#/state/")){let J=Z.slice(8),Y=J.indexOf("/");if(Y===-1)return X[J];return z0(X[J.slice(0,Y)],J.slice(Y+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return z0(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return z0(globalThis.document,Z.slice(10));return X[Z]??null}function $3(Z,X,W,Q){if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J,G,V=L1(X);if(Y==="item")G=Q?.item??V?.item??X["$map/item"];else if(Y==="index")G=Q?.index??V?.index??X["$map/index"];else G=V?.[Y]??X[`$map/${Y}`];if(J.length>2){let q=J.slice(2),U=q.pop(),H=q.length>0?z0(G,q.join("/")):G;return{key:U,obj:H}}return{key:Y==="item"?"$map/item":"$map/index",obj:L1(X)??X}}if(Z.startsWith("#/state/")){let J=Z.slice(8);if(J.indexOf("/")===-1)return{key:J,obj:X};let G=J.split("/"),V=G.pop(),q=X;for(let U of G)q=q[U];return{key:V,obj:q}}return{key:Z,obj:X}}function S2(Z,X,W,Q){let{operator:J,target:Y,value:G,initial:V}=Z;if(!H3.has(J))throw Error(`$expression: unknown operator "${J}"`);if(A1.has(J)&&!("value"in Z)){let q=L2(Y,X,W,Q);if(J==="!")return!q;if(J==="-")return-q}if(O1.has(J)){let q=L2(Y,X,W,Q),U=L2(G,X,W,Q);switch(J){case"+":return q+U;case"-":return q-U;case"*":return q*U;case"/":return q/U;case"%":return q%U;case"===":return q===U;case"!==":return q!==U;case"<":return q<U;case"<=":return q<=U;case">":return q>U;case">=":return q>=U;case"&&":return q&&U;case"||":return q||U;default:break}}if(F8.has(J)){let q=L2(G,X,W,Q),{obj:U,key:H}=$3(Y.$ref,X,W,Q);switch(J){case"=":{U[H]=q;break}case"+=":{let F=U[H];U[H]=F+q;break}case"-=":{let F=U[H];U[H]=F-q;break}case"*=":{let F=U[H];U[H]=F*q;break}case"/=":{let F=U[H];U[H]=F/q;break}default:break}return}if(B8.has(J)){let q=L2(Y,X,W,Q);switch(J){case"push":return q.push(L2(G,X,W,Q));case"unshift":return q.unshift(L2(G,X,W,Q));case"pop":return q.pop();case"shift":return q.shift();case"splice":{let U=L2(G,X,W,Q);return q.splice(...U)}default:break}}if(I1.has(J)){let q=L2(Y,X,W,Q);if(J==="reduce"){let U=L2(V,X,W,Q);for(let[H,F]of q.entries())U=S2(G,X,W,{acc:U,index:H,item:F});return U}if(J==="map")return q.map((U,H)=>S2(G,X,W,{...Q,index:H,item:U}));if(J==="filter")return q.filter((U,H)=>S2(G,X,W,{...Q,index:H,item:U}))}return}function H2(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return M2(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return H8(Z.$ref,X);if(Array.isArray(Z))return Z.map((W)=>H2(W,X)).join(", ");return JSON.stringify(Z)}function H8(Z,X){let W=X.statePrefix??"state",Q=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("event#/")){let J=Z.slice(7);return`${Q}.${J.replaceAll("/",".")}`}if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J;if(Y==="item")return J.length>2?`_item.${J.slice(2).join(".")}`:"_item";if(Y==="index")return"_index";return`_${Y}`}if(Z.startsWith("#/state/")){let J=Z.slice(8);return`${W}.${J.replaceAll("/",".")}`}if(Z.startsWith("parent#/"))return`${W}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replaceAll("/",".")}`;return`${W}.${Z}`}function K8(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return H8(Z.$ref,X);return H2(Z,X)}function M2(Z,X={}){let{operator:W,target:Q,value:J,initial:Y}=Z;if(A1.has(W)&&!("value"in Z)){let G=H2(Q,X);if(W==="!")return`!(${G})`;if(W==="-")return`-(${G})`}if(O1.has(W)){let G=H2(Q,X),V=H2(J,X);return`(${G} ${W} ${V})`}if(F8.has(W)){let G=K8(Q,X),V=H2(J,X);return`${G} ${W} ${V}`}if(B8.has(W)){let G=K8(Q,X);switch(W){case"push":return`${G}.push(${H2(J,X)})`;case"unshift":return`${G}.unshift(${H2(J,X)})`;case"pop":return`${G}.pop()`;case"shift":return`${G}.shift()`;case"splice":{let V=Array.isArray(J)?J.map((q)=>H2(q,X)).join(", "):H2(J,X);return`${G}.splice(${V})`}default:break}}if(I1.has(W)){let G=H2(Q,X),V=M2(J,X);if(W==="reduce"){let q=H2(Y,X);return`${G}.reduce((_acc, _item, _index) => ${V}, ${q})`}if(W==="map")return`${G}.map((_item, _index) => ${V})`;if(W==="filter")return`${G}.filter((_item, _index) => ${V})`}return"undefined"}function z0(Z,X){let W=Z;for(let Q of X.split(/[./]/))W=W?.[Q];return W}var V8,A1,O1,F8,B8,I1,H3;var f0=p(()=>{V8=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),A1=new Set(["!","-"]),O1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||"]),F8=new Set(["=","+=","-=","*=","/="]),B8=new Set(["push","pop","shift","unshift","splice"]),I1=new Set(["reduce","map","filter"]),H3=new Set([...V8,...A1,...O1,...I1])});function K2(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function A2(Z){return K2(Z)&&typeof Z.$ref==="string"}function k2(Z){return K2(Z)&&Z.$prototype==="Function"}function O2(Z){return K2(Z)&&K2(Z.$expression)}function L0(Z){return K2(Z)&&typeof Z.$prototype==="string"&&Z.$prototype!=="Function"}function w1(Z){return K2(Z)&&Z.timing==="server"&&typeof Z.$src==="string"&&typeof Z.$export==="string"&&!Z.$prototype}function M8(Z){return K2(Z)&&!Z.$prototype&&!Z.$expression&&"default"in Z}function m2(Z){if(!K2(Z))return!1;for(let X of Object.keys(Z))if(!$8.has(X))return!1;return!0}function G2(Z){return K2(Z)&&Z.$prototype==="Array"}function T1(Z){if(G2(Z))return!0;return Array.isArray(Z)&&Z.some((X)=>G2(X))}function D8(Z){return K2(Z)&&Z.$prototype==="Class"}function i(Z){return typeof Z==="string"&&Z.includes("${")}function u2(Z){if(!Z)return[];return Z.map((X)=>typeof X==="string"?X:X.name)}var $8;var f2=p(()=>{$8=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"])});function D3(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function J2(Z){return Z.replaceAll(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function X2(Z){return Object.entries(Z).filter(([X,W])=>!D3(X)&&(W===null||typeof W!=="object")).map(([X,W])=>`${J2(X)}: ${W}`).join("; ")}var c2;var A0=p(()=>{f0();f2();c2=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"])});function i0(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,W]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(W&&typeof W==="object"&&!Array.isArray(W)&&W.timing==="compiler")continue;if(typeof W!=="object"||W===null||Array.isArray(W))return!0;if(W.$prototype)return!0;if("default"in W)return!0;if(m2(W))continue;return!0}if(Z.$switch)return!0;if(G2(Z)||T1(Z.children))return!0;if(Array.isArray(Z.children)&&Z.children.some((X)=>i0(X)))return!0;for(let[X,W]of Object.entries(Z)){if(c2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function A8(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(G2(Z)||T1(Z.children))return!0;for(let[X,W]of Object.entries(Z)){if(c2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function G0(Z,X=null,W={},Q={}){let J=Z?.state?O8(Z.state,X):X??Object.create(null);return{media:Q,scope:J,scopeDefs:W}}function O8(Z={},X=null){let W=Object.create(X??null);for(let[Q,J]of Object.entries(Z)){if(typeof J!=="object"||J===null||Array.isArray(J)){i2(W,Q,c0(J));continue}let Y=J;if("default"in Y){i2(W,Q,c0(Y.default));continue}if(!Y.$prototype&&!("$expression"in Y)&&!m2(Y))i2(W,Q,c0(Y))}for(let[Q,J]of Object.entries(Z)){if(typeof J==="string"&&i(J)){R1(W,Q,()=>N1(J,W));continue}if(!J||typeof J!=="object")continue;if(O2(J)){let Y=J.$expression;if(h2(Y.operator))i2(W,Q,(G,V)=>S2(Y,G,V));else R1(W,Q,()=>S2(Y,W,null));continue}if(k2(J)){if(J.body){let Y=J.parameters?u2(J.parameters):J.arguments??[],G=Function("state",...Y,J.body);if(J.body.includes("return"))R1(W,Q,()=>G(W));else i2(W,Q,G)}else i2(W,Q,()=>{});continue}if(L0(J)&&(J.$prototype==="LocalStorage"||J.$prototype==="SessionStorage"))i2(W,Q,c0(J.default??null))}return W}function i2(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,value:W,writable:!0})}function R1(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,get:W})}function t(Z,X){if(I2(Z))return L3(Z.$ref,X);if(i(Z))return N1(Z,X);return Z}function I2(Z){return A2(Z)}function L3(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let W=Z.split("/"),Q=W[1],J=X.$map?.[Q]??X[`$map/${Q}`];return W.length>2?L8(J,W.slice(2).join("/")):J}if(Z.startsWith("#/state/")){let W=Z.slice(8),Q=W.indexOf("/");if(Q===-1)return X[W];return L8(X[W.slice(0,Q)],W.slice(Q+1))}return X[Z]??null}function N1(Z,X){try{let W=Z.match(/^\$\{(.+)\}$/s);if(W)return Function("state","$map",`return (${W[1]})`)(X,X?.$map);return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}catch{return null}}function L8(Z,X){if(!X)return Z;let W=Z;for(let Q of X.split("/"))W=W==null?void 0:W[Q];return W}function c0(Z){if(Z===null||typeof Z!=="object")return Z;return structuredClone(Z)}function W0(Z,X){let W="",Q=t(Z.id,X),J=t(Z.className,X),Y=t(Z.hidden,X),G=t(Z.tabIndex,X),V=t(Z.title,X),q=t(Z.lang,X),U=t(Z.dir,X);if(Q)W+=` id="${d(String(Q))}"`;if(J)W+=` class="${d(String(J))}"`;if(Y)W+=" hidden";if(G!==void 0&&G!==null)W+=` tabindex="${d(String(G))}"`;if(V)W+=` title="${d(String(V))}"`;if(q)W+=` lang="${d(String(q))}"`;if(U)W+=` dir="${d(String(U))}"`;if(Z.style&&X){let H=Object.entries(Z.style).filter(([F,B])=>!F.startsWith(":")&&!F.startsWith(".")&&!F.startsWith("&")&&!F.startsWith("[")&&!F.startsWith("@")&&B!==null&&typeof B!=="object"&&typeof B==="string"&&i(B)).map(([F,B])=>{let M=t(B,X);return M==null?null:`${J2(F)}: ${M}`}).filter(Boolean).join("; ");if(H)W+=` style="${H}"`}if(Z.attributes)for(let[H,F]of Object.entries(Z.attributes)){let B=t(F,X);if(B!==null&&B!==void 0&&(typeof B==="string"||typeof B==="number"||typeof B==="boolean"))W+=` ${H}="${d(String(B))}"`}if(Z.tagName==="img"){if(!Z.attributes?.loading)W+=' loading="lazy"';if(!Z.attributes?.decoding)W+=' decoding="async"'}if(Z.$static)W+=" data-jx-static";else if(Z.$prerendered)W+=" data-jx-prerendered";return W}function J0(Z,X={},W=null){let Q=[];if(W&&typeof W==="object"){let Y=(H,F)=>{let B=X2(F);if(B)Q.push(`${H} { ${B} }`);for(let[M,L]of Object.entries(F)){if(L===null||typeof L!=="object"||Array.isArray(L))continue;if(M.startsWith("@")){let C=M.startsWith("@--")?`@media ${X[M.slice(1)]??M.slice(1)}`:M,_=X2(L);if(_)Q.push(`${C} { ${H} { ${_} } }`);for(let[x,h]of Object.entries(L)){if(h===null||typeof h!=="object"||Array.isArray(h))continue;if(x.startsWith("@"))continue;let u=x.startsWith("&")?x.replace("&",H):x.startsWith(":")||x.startsWith(".")||x.startsWith("[")?`${H}${x}`:`${H} ${x}`,f=X2(h);if(f)Q.push(`${C} { ${u} { ${f} } }`)}continue}let E=M.startsWith("&")?M.replace("&",H):M.startsWith(":")||M.startsWith(".")||M.startsWith("[")?`${H}${M}`:`${H} ${M}`;Y(E,L)}};for(let[H,F]of Object.entries(W))if(H.startsWith(":")||H.startsWith(".")||H.startsWith("["))Y(H,F);else if(F!==null&&typeof F==="object"&&!Array.isArray(F)&&!H.startsWith("@")&&!H.startsWith("--"))Y(H,F);else if(H.startsWith("@")){let B=H.startsWith("@--")?`@media ${X[H.slice(1)]??H.slice(1)}`:H.startsWith("@(")?`@media ${H.slice(1)}`:H;Q.push(`${B} { body { ${X2(F)} } }`)}let G={},V={};for(let[H,F]of Object.entries(W)){if(H.startsWith(":")||H.startsWith(".")||H.startsWith("[")||H.startsWith("@"))continue;if(F!==null&&typeof F==="object"&&!Array.isArray(F))continue;if(H.startsWith("--"))G[H]=F;else V[H]=F}let q=X2(G);if(q)Q.push(`:root { ${q} }`);let U=X2(V);if(U)Q.push(`body { ${U} }`)}if(Q0(Z,Q,X,"",{n:0}),Q.length===0)return"";return`<style>
1
+ import{createRequire as B3}from"node:module";var Q3=Object.create;var{getPrototypeOf:G3,defineProperty:D1,getOwnPropertyNames:J3}=Object;var Y3=Object.prototype.hasOwnProperty;function q3(Z){return this[Z]}var U3,K3,t4=(Z,X,W)=>{var Q=Z!=null&&typeof Z==="object";if(Q){var J=X?U3??=new WeakMap:K3??=new WeakMap,Y=J.get(Z);if(Y)return Y}W=Z!=null?Q3(G3(Z)):{};let G=X||!Z||!Z.__esModule?D1(W,"default",{value:Z,enumerable:!0}):W;for(let V of J3(Z))if(!Y3.call(G,V))D1(G,V,{get:q3.bind(Z,V),enumerable:!0});if(Q)J.set(Z,G);return G};var e4=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var V3=(Z)=>Z;function F3(Z,X){this[Z]=V3.bind(null,X)}var U8=(Z,X)=>{for(var W in X)D1(Z,W,{get:X[W],enumerable:!0,configurable:!0,set:F3.bind(X,W)})};var p=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var E2=B3(import.meta.url);function L1(Z){let X=Z.$map;return X&&typeof X==="object"?X:void 0}function h2(Z){return V8.has(Z)}function L2(Z,X,W,Q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return S2(Z,X,W,Q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return M3(Z.$ref,X,W,Q);if(Array.isArray(Z))return Z.map((J)=>L2(J,X,W,Q));return Z}function M3(Z,X,W,Q){if(Z==="$reduce/acc")return Q?.acc;if(Z.startsWith("$reduce/"))return Q?.acc;if(Z.startsWith("event#/")){let J=Z.slice(7);return z0(W,J)}if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J,G,V=L1(X);if(Y==="item")G=Q?.item??V?.item??X["$map/item"];else if(Y==="index")G=Q?.index??V?.index??X["$map/index"];else G=V?.[Y]??X[`$map/${Y}`];return J.length>2?z0(G,J.slice(2).join("/")):G}if(Z.startsWith("#/state/")){let J=Z.slice(8),Y=J.indexOf("/");if(Y===-1)return X[J];return z0(X[J.slice(0,Y)],J.slice(Y+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return z0(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return z0(globalThis.document,Z.slice(10));return X[Z]??null}function $3(Z,X,W,Q){if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J,G,V=L1(X);if(Y==="item")G=Q?.item??V?.item??X["$map/item"];else if(Y==="index")G=Q?.index??V?.index??X["$map/index"];else G=V?.[Y]??X[`$map/${Y}`];if(J.length>2){let q=J.slice(2),U=q.pop(),H=q.length>0?z0(G,q.join("/")):G;return{key:U,obj:H}}return{key:Y==="item"?"$map/item":"$map/index",obj:L1(X)??X}}if(Z.startsWith("#/state/")){let J=Z.slice(8);if(J.indexOf("/")===-1)return{key:J,obj:X};let G=J.split("/"),V=G.pop(),q=X;for(let U of G)q=q[U];return{key:V,obj:q}}return{key:Z,obj:X}}function S2(Z,X,W,Q){let{operator:J,target:Y,value:G,initial:V}=Z;if(!H3.has(J))throw Error(`$expression: unknown operator "${J}"`);if(A1.has(J)&&!("value"in Z)){let q=L2(Y,X,W,Q);if(J==="!")return!q;if(J==="-")return-q}if(O1.has(J)){let q=L2(Y,X,W,Q),U=L2(G,X,W,Q);switch(J){case"+":return q+U;case"-":return q-U;case"*":return q*U;case"/":return q/U;case"%":return q%U;case"===":return q===U;case"!==":return q!==U;case"<":return q<U;case"<=":return q<=U;case">":return q>U;case">=":return q>=U;case"&&":return q&&U;case"||":return q||U;default:break}}if(F8.has(J)){let q=L2(G,X,W,Q),{obj:U,key:H}=$3(Y.$ref,X,W,Q);switch(J){case"=":{U[H]=q;break}case"+=":{let F=U[H];U[H]=F+q;break}case"-=":{let F=U[H];U[H]=F-q;break}case"*=":{let F=U[H];U[H]=F*q;break}case"/=":{let F=U[H];U[H]=F/q;break}default:break}return}if(B8.has(J)){let q=L2(Y,X,W,Q);switch(J){case"push":return q.push(L2(G,X,W,Q));case"unshift":return q.unshift(L2(G,X,W,Q));case"pop":return q.pop();case"shift":return q.shift();case"splice":{let U=L2(G,X,W,Q);return q.splice(...U)}default:break}}if(I1.has(J)){let q=L2(Y,X,W,Q);if(J==="reduce"){let U=L2(V,X,W,Q);for(let[H,F]of q.entries())U=S2(G,X,W,{acc:U,index:H,item:F});return U}if(J==="map")return q.map((U,H)=>S2(G,X,W,{...Q,index:H,item:U}));if(J==="filter")return q.filter((U,H)=>S2(G,X,W,{...Q,index:H,item:U}))}return}function H2(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return M2(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return H8(Z.$ref,X);if(Array.isArray(Z))return Z.map((W)=>H2(W,X)).join(", ");return JSON.stringify(Z)}function H8(Z,X){let W=X.statePrefix??"state",Q=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("event#/")){let J=Z.slice(7);return`${Q}.${J.replaceAll("/",".")}`}if(Z.startsWith("$map/")){let J=Z.split("/"),[,Y]=J;if(Y==="item")return J.length>2?`_item.${J.slice(2).join(".")}`:"_item";if(Y==="index")return"_index";return`_${Y}`}if(Z.startsWith("#/state/")){let J=Z.slice(8);return`${W}.${J.replaceAll("/",".")}`}if(Z.startsWith("parent#/"))return`${W}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replaceAll("/",".")}`;return`${W}.${Z}`}function K8(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return H8(Z.$ref,X);return H2(Z,X)}function M2(Z,X={}){let{operator:W,target:Q,value:J,initial:Y}=Z;if(A1.has(W)&&!("value"in Z)){let G=H2(Q,X);if(W==="!")return`!(${G})`;if(W==="-")return`-(${G})`}if(O1.has(W)){let G=H2(Q,X),V=H2(J,X);return`(${G} ${W} ${V})`}if(F8.has(W)){let G=K8(Q,X),V=H2(J,X);return`${G} ${W} ${V}`}if(B8.has(W)){let G=K8(Q,X);switch(W){case"push":return`${G}.push(${H2(J,X)})`;case"unshift":return`${G}.unshift(${H2(J,X)})`;case"pop":return`${G}.pop()`;case"shift":return`${G}.shift()`;case"splice":{let V=Array.isArray(J)?J.map((q)=>H2(q,X)).join(", "):H2(J,X);return`${G}.splice(${V})`}default:break}}if(I1.has(W)){let G=H2(Q,X),V=M2(J,X);if(W==="reduce"){let q=H2(Y,X);return`${G}.reduce((_acc, _item, _index) => ${V}, ${q})`}if(W==="map")return`${G}.map((_item, _index) => ${V})`;if(W==="filter")return`${G}.filter((_item, _index) => ${V})`}return"undefined"}function z0(Z,X){let W=Z;for(let Q of X.split(/[./]/))W=W?.[Q];return W}var V8,A1,O1,F8,B8,I1,H3;var f0=p(()=>{V8=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),A1=new Set(["!","-"]),O1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||"]),F8=new Set(["=","+=","-=","*=","/="]),B8=new Set(["push","pop","shift","unshift","splice"]),I1=new Set(["reduce","map","filter"]),H3=new Set([...V8,...A1,...O1,...I1])});function K2(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function A2(Z){return K2(Z)&&typeof Z.$ref==="string"}function k2(Z){return K2(Z)&&Z.$prototype==="Function"}function O2(Z){return K2(Z)&&K2(Z.$expression)}function L0(Z){return K2(Z)&&typeof Z.$prototype==="string"&&Z.$prototype!=="Function"}function w1(Z){return K2(Z)&&Z.timing==="server"&&typeof Z.$src==="string"&&typeof Z.$export==="string"&&!Z.$prototype}function M8(Z){return K2(Z)&&!Z.$prototype&&!Z.$expression&&"default"in Z}function m2(Z){if(!K2(Z))return!1;for(let X of Object.keys(Z))if(!$8.has(X))return!1;return!0}function G2(Z){return K2(Z)&&Z.$prototype==="Array"}function T1(Z){if(G2(Z))return!0;return Array.isArray(Z)&&Z.some((X)=>G2(X))}function D8(Z){return K2(Z)&&Z.$prototype==="Class"}function i(Z){return typeof Z==="string"&&Z.includes("${")}function u2(Z){if(!Z)return[];return Z.map((X)=>typeof X==="string"?X:X.name)}var $8;var f2=p(()=>{$8=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"])});function O3(Z){if(!D3||!Z.includes("v"))return Z;return Z.replace(L3,(X,W,Q)=>`${W}${A3[Q.toLowerCase()]??`cq${Q}`}`)}function I3(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function J2(Z){return Z.replaceAll(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function X2(Z){return Object.entries(Z).filter(([X,W])=>!I3(X)&&(W===null||typeof W!=="object")).map(([X,W])=>`${J2(X)}: ${O3(String(W))}`).join("; ")}var D3=!1,L3,A3,c2;var A0=p(()=>{f0();f2();L3=/(-?\d*\.?\d+)(?:s|l|d)?v(h|w|min|max|i|b)\b/gi,A3={b:"cqb",h:"cqh",i:"cqi",max:"cqmax",min:"cqmin",w:"cqw"};c2=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"])});function i0(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,W]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(W&&typeof W==="object"&&!Array.isArray(W)&&W.timing==="compiler")continue;if(typeof W!=="object"||W===null||Array.isArray(W))return!0;if(W.$prototype)return!0;if("default"in W)return!0;if(m2(W))continue;return!0}if(Z.$switch)return!0;if(G2(Z)||T1(Z.children))return!0;if(Array.isArray(Z.children)&&Z.children.some((X)=>i0(X)))return!0;for(let[X,W]of Object.entries(Z)){if(c2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function A8(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(G2(Z)||T1(Z.children))return!0;for(let[X,W]of Object.entries(Z)){if(c2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function G0(Z,X=null,W={},Q={}){let J=Z?.state?O8(Z.state,X):X??Object.create(null);return{media:Q,scope:J,scopeDefs:W}}function O8(Z={},X=null){let W=Object.create(X??null);for(let[Q,J]of Object.entries(Z)){if(typeof J!=="object"||J===null||Array.isArray(J)){i2(W,Q,c0(J));continue}let Y=J;if("default"in Y){i2(W,Q,c0(Y.default));continue}if(!Y.$prototype&&!("$expression"in Y)&&!m2(Y))i2(W,Q,c0(Y))}for(let[Q,J]of Object.entries(Z)){if(typeof J==="string"&&i(J)){R1(W,Q,()=>N1(J,W));continue}if(!J||typeof J!=="object")continue;if(O2(J)){let Y=J.$expression;if(h2(Y.operator))i2(W,Q,(G,V)=>S2(Y,G,V));else R1(W,Q,()=>S2(Y,W,null));continue}if(k2(J)){if(J.body){let Y=J.parameters?u2(J.parameters):J.arguments??[],G=Function("state",...Y,J.body);if(J.body.includes("return"))R1(W,Q,()=>G(W));else i2(W,Q,G)}else i2(W,Q,()=>{});continue}if(L0(J)&&(J.$prototype==="LocalStorage"||J.$prototype==="SessionStorage"))i2(W,Q,c0(J.default??null))}return W}function i2(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,value:W,writable:!0})}function R1(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,get:W})}function t(Z,X){if(I2(Z))return w3(Z.$ref,X);if(i(Z))return N1(Z,X);return Z}function I2(Z){return A2(Z)}function w3(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let W=Z.split("/"),Q=W[1],J=X.$map?.[Q]??X[`$map/${Q}`];return W.length>2?L8(J,W.slice(2).join("/")):J}if(Z.startsWith("#/state/")){let W=Z.slice(8),Q=W.indexOf("/");if(Q===-1)return X[W];return L8(X[W.slice(0,Q)],W.slice(Q+1))}return X[Z]??null}function N1(Z,X){try{let W=Z.match(/^\$\{(.+)\}$/s);if(W)return Function("state","$map",`return (${W[1]})`)(X,X?.$map);return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}catch{return null}}function L8(Z,X){if(!X)return Z;let W=Z;for(let Q of X.split("/"))W=W==null?void 0:W[Q];return W}function c0(Z){if(Z===null||typeof Z!=="object")return Z;return structuredClone(Z)}function W0(Z,X){let W="",Q=t(Z.id,X),J=t(Z.className,X),Y=t(Z.hidden,X),G=t(Z.tabIndex,X),V=t(Z.title,X),q=t(Z.lang,X),U=t(Z.dir,X);if(Q)W+=` id="${d(String(Q))}"`;if(J)W+=` class="${d(String(J))}"`;if(Y)W+=" hidden";if(G!==void 0&&G!==null)W+=` tabindex="${d(String(G))}"`;if(V)W+=` title="${d(String(V))}"`;if(q)W+=` lang="${d(String(q))}"`;if(U)W+=` dir="${d(String(U))}"`;if(Z.style&&X){let H=Object.entries(Z.style).filter(([F,B])=>!F.startsWith(":")&&!F.startsWith(".")&&!F.startsWith("&")&&!F.startsWith("[")&&!F.startsWith("@")&&B!==null&&typeof B!=="object"&&typeof B==="string"&&i(B)).map(([F,B])=>{let M=t(B,X);return M==null?null:`${J2(F)}: ${M}`}).filter(Boolean).join("; ");if(H)W+=` style="${H}"`}if(Z.attributes)for(let[H,F]of Object.entries(Z.attributes)){let B=t(F,X);if(B!==null&&B!==void 0&&(typeof B==="string"||typeof B==="number"||typeof B==="boolean"))W+=` ${H}="${d(String(B))}"`}if(Z.tagName==="img"){if(!Z.attributes?.loading)W+=' loading="lazy"';if(!Z.attributes?.decoding)W+=' decoding="async"'}if(Z.$static)W+=" data-jx-static";else if(Z.$prerendered)W+=" data-jx-prerendered";return W}function J0(Z,X={},W=null){let Q=[];if(W&&typeof W==="object"){let Y=(H,F)=>{let B=X2(F);if(B)Q.push(`${H} { ${B} }`);for(let[M,L]of Object.entries(F)){if(L===null||typeof L!=="object"||Array.isArray(L))continue;if(M.startsWith("@")){let C=M.startsWith("@--")?`@media ${X[M.slice(1)]??M.slice(1)}`:M,_=X2(L);if(_)Q.push(`${C} { ${H} { ${_} } }`);for(let[x,h]of Object.entries(L)){if(h===null||typeof h!=="object"||Array.isArray(h))continue;if(x.startsWith("@"))continue;let u=x.startsWith("&")?x.replace("&",H):x.startsWith(":")||x.startsWith(".")||x.startsWith("[")?`${H}${x}`:`${H} ${x}`,f=X2(h);if(f)Q.push(`${C} { ${u} { ${f} } }`)}continue}let E=M.startsWith("&")?M.replace("&",H):M.startsWith(":")||M.startsWith(".")||M.startsWith("[")?`${H}${M}`:`${H} ${M}`;Y(E,L)}};for(let[H,F]of Object.entries(W))if(H.startsWith(":")||H.startsWith(".")||H.startsWith("["))Y(H,F);else if(F!==null&&typeof F==="object"&&!Array.isArray(F)&&!H.startsWith("@")&&!H.startsWith("--"))Y(H,F);else if(H.startsWith("@")){let B=H.startsWith("@--")?`@media ${X[H.slice(1)]??H.slice(1)}`:H.startsWith("@(")?`@media ${H.slice(1)}`:H;Q.push(`${B} { body { ${X2(F)} } }`)}let G={},V={};for(let[H,F]of Object.entries(W)){if(H.startsWith(":")||H.startsWith(".")||H.startsWith("[")||H.startsWith("@"))continue;if(F!==null&&typeof F==="object"&&!Array.isArray(F))continue;if(H.startsWith("--"))G[H]=F;else V[H]=F}let q=X2(G);if(q)Q.push(`:root { ${q} }`);let U=X2(V);if(U)Q.push(`body { ${U} }`)}if(Q0(Z,Q,X,"",{n:0}),Q.length===0)return"";return`<style>
2
2
  ${Q.join(`
3
3
  `)}
4
4
  </style>`}function I8(Z,X,W,Q){let J=X2(X);if(J)W.push(`${Z} { ${J} }`);for(let[Y,G]of Object.entries(X)){if(G===null||typeof G!=="object"||Array.isArray(G))continue;if(Y.startsWith("@")){let q=Y.startsWith("@--")?`@media ${Q[Y.slice(1)]??Y.slice(1)}`:Y.startsWith("@(")?`@media ${Y.slice(1)}`:Y,U=X2(G);if(U)W.push(`${q} { ${Z} { ${U} } }`);for(let[H,F]of Object.entries(G)){if(F===null||typeof F!=="object"||Array.isArray(F))continue;if(H.startsWith("@"))continue;let B=H.startsWith("&")?H.replace("&",Z):H.startsWith(":")||H.startsWith(".")||H.startsWith("[")?`${Z}${H}`:`${Z} ${H}`,M=X2(F);if(M)W.push(`${q} { ${B} { ${M} } }`)}continue}let V=Y.startsWith("&")?Y.replace("&",Z):Y.startsWith(":")||Y.startsWith(".")||Y.startsWith("[")?`${Z}${Y}`:`${Z} ${Y}`;I8(V,G,W,Q)}}function Q0(Z,X,W,Q="",J,Y="jx"){let G=J??{n:0};if(!Z||typeof Z!=="object")return;if(Z.style&&!Z.id&&!Z.className)Z.className=`${Y}-${G.n}`,G.n+=1;let V=Z.id?`#${Z.id}`:Z.className?`.${Z.className.split(" ")[0]}`:Z.tagName??"*";if(Z.style){let q=[];for(let[U,H]of Object.entries(Z.style)){if(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")||U.startsWith("@"))continue;if(H===null||typeof H==="object")continue;if(typeof H==="string"&&i(H))continue;q.push(` ${J2(U)}: ${H};`)}if(q.length>0)X.push(`${V} {
@@ -6,25 +6,25 @@ ${q.join(`
6
6
  `)}
7
7
  }`);for(let[U,H]of Object.entries(Z.style)){if(H===null||typeof H!=="object"||Array.isArray(H))continue;if(U.startsWith("@")){let F=U.startsWith("@--")?`@media ${W[U.slice(1)]??U.slice(1)}`:U.startsWith("@(")?`@media ${U.slice(1)}`:U,B=X2(H);if(B)X.push(`${F} { ${V} { ${B} } }`);for(let[M,L]of Object.entries(H)){if(L===null||typeof L!=="object"||Array.isArray(L))continue;if(M.startsWith("@"))continue;let E=M.startsWith("&")?M.replace("&",V):M.startsWith(":")||M.startsWith(".")||M.startsWith("[")?`${V}${M}`:`${V} ${M}`;X.push(`${F} { ${E} { ${X2(L)} } }`)}}else{let F=U.startsWith("&")?U.replace("&",V):U.startsWith(":")||U.startsWith(".")||U.startsWith("[")?`${V}${U}`:`${V} ${U}`;I8(F,H,X,W)}}}if(Array.isArray(Z.children))for(let q of Z.children)Q0(q,X,W,V,G,Y);if(Z.cases&&typeof Z.cases==="object")for(let q of Object.values(Z.cases))Q0(q,X,W,V,G,Y)}function d(Z){return String(Z).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function n0(Z){return Z.split("-").map((X)=>X.charAt(0).toUpperCase()+X.slice(1)).join("")}function w8(Z){let X=new Map;return T8(Z,X),[...X.values()]}function T8(Z,X){if(!Z||typeof Z!=="object")return;if(Z.state){for(let[W,Q]of Object.entries(Z.state))if(w1(Q))X.set(Q.$export,{exportName:Q.$export,key:W,src:Q.$src})}if(Array.isArray(Z.children))for(let W of Z.children)T8(W,X)}function p0(Z,X,W=null){if(typeof Z==="string"){if(i(Z)&&X){let G=N1(Z,X);return G!=null?d(String(G)):d(Z)}return d(Z)}if(typeof Z==="number"||typeof Z==="boolean")return d(String(Z));if(Array.isArray(Z))return Z.map((G)=>p0(G,X,W)).join(`
8
8
  `);if(!Z||typeof Z!=="object")return"";if(Z.$prototype==="Array")return"";if(Z.$switch){let G=Z.tagName??"div",V=W0(Z,X),q=t(Z.$switch,X),U=q==null?void 0:Z.cases?.[String(q)],H=U!==void 0&&!I2(U)?p0(U,X,W):"";return`<${G}${V}>${H}</${G}>`}let Q=Z.tagName??"div";if(Q==="slot"&&W!=null)return W;let J=W0(Z,X);if(j1.has(Q))return`<${Q}${J}>`;let Y="";if(Z.textContent!==void 0){let G=t(Z.textContent,X);Y=G!=null?d(String(G)):""}else if(Z.innerHTML){let G=t(Z.innerHTML,X);Y=G!=null?String(G):Z.innerHTML}else if(Array.isArray(Z.children))Y=Z.children.map((G)=>p0(G,X,W)).join(`
9
- `);return`<${Q}${J}>${Y}</${Q}>`}function J6(Z,X=null,W=null){let Q=Z.state??{};if(X){Q={...Q};for(let[Y,G]of Object.entries(X))if(Y in Q){let V=Q[Y];Q[Y]=V&&typeof V==="object"&&!Array.isArray(V)&&"default"in V?{...V,default:G}:G}else Q[Y]=G}let J=O8(Q,null);if(!Array.isArray(Z.children))return"";return Z.children.map((Y)=>p0(Y,J,W)).join(`
10
- `)}function Y6(Z){return C1(Z)}function C1(Z){if(!Z||typeof Z!=="object")return!0;if(Array.isArray(Z))return Z.every((X)=>C1(X));if(Z.$prototype)return!1;if(Z.$ref)return!1;if(Z.state)for(let X of Object.values(Z.state)){if(!X||typeof X!=="object")continue;let W=X;if(W.$prototype)return!1;if(W.$ref)return!1}for(let X of Object.keys(Z))if(X.startsWith("on")&&X!=="observedAttributes")return!1;if(Array.isArray(Z.children))return Z.children.every((X)=>C1(X));if(Z.children&&typeof Z.children==="object"&&Z.children.$prototype)return!1;return!0}function q6(Z,X,W=null,Q={}){let J=[];if(X&&typeof X==="object"){let Y=[];for(let[G,V]of Object.entries(X)){if(G.startsWith(":")||G.startsWith(".")||G.startsWith("&")||G.startsWith("[")||G.startsWith("@"))continue;if(V===null||typeof V==="object")continue;if(typeof V==="string"&&i(V))continue;Y.push(` ${J2(G)}: ${V};`)}if(Y.length>0)J.push(`${Z} {
9
+ `);return`<${Q}${J}>${Y}</${Q}>`}function K6(Z,X=null,W=null){let Q=Z.state??{};if(X){Q={...Q};for(let[Y,G]of Object.entries(X))if(Y in Q){let V=Q[Y];Q[Y]=V&&typeof V==="object"&&!Array.isArray(V)&&"default"in V?{...V,default:G}:G}else Q[Y]=G}let J=O8(Q,null);if(!Array.isArray(Z.children))return"";return Z.children.map((Y)=>p0(Y,J,W)).join(`
10
+ `)}function V6(Z){return C1(Z)}function C1(Z){if(!Z||typeof Z!=="object")return!0;if(Array.isArray(Z))return Z.every((X)=>C1(X));if(Z.$prototype)return!1;if(Z.$ref)return!1;if(Z.state)for(let X of Object.values(Z.state)){if(!X||typeof X!=="object")continue;let W=X;if(W.$prototype)return!1;if(W.$ref)return!1}for(let X of Object.keys(Z))if(X.startsWith("on")&&X!=="observedAttributes")return!1;if(Array.isArray(Z.children))return Z.children.every((X)=>C1(X));if(Z.children&&typeof Z.children==="object"&&Z.children.$prototype)return!1;return!0}function F6(Z,X,W=null,Q={}){let J=[];if(X&&typeof X==="object"){let Y=[];for(let[G,V]of Object.entries(X)){if(G.startsWith(":")||G.startsWith(".")||G.startsWith("&")||G.startsWith("[")||G.startsWith("@"))continue;if(V===null||typeof V==="object")continue;if(typeof V==="string"&&i(V))continue;Y.push(` ${J2(G)}: ${V};`)}if(Y.length>0)J.push(`${Z} {
11
11
  ${Y.join(`
12
12
  `)}
13
13
  }`);for(let[G,V]of Object.entries(X))if(G.startsWith("@")){let q=G.startsWith("@--")?`@media ${Q[G.slice(1)]??G.slice(1)}`:G.startsWith("@(")?`@media ${G.slice(1)}`:G;J.push(`${q} { ${Z} { ${X2(V)} } }`)}else if(G.startsWith(":")||G.startsWith(".")||G.startsWith("&")||G.startsWith("[")){let q=G.startsWith("&")?G.replace("&",Z):`${Z}${G}`;J.push(`${q} { ${X2(V)} }`)}}if(W&&Array.isArray(W.children)){let Y={n:0};for(let G of W.children)Q0(G,J,Q,"",Y,Z)}return J.length>0?`${J.join(`
14
14
  `)}
15
- `:""}var d0="https://esm.sh/@vue/reactivity@3.5.32",l0="https://esm.sh/lit-html@3.3.0",j1;var n2=p(()=>{A0();f0();f2();A0();f0();f2();j1=new Set(["input","br","hr","img","meta","link","area","col","source"])});function b2(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var A3,I0=()=>A3;var R8=p(()=>{A3=/^win/.test(globalThis.process?globalThis.process.platform:"")});function e(Z,X){let W=new URL(b2(Z),"https://aaa.nonexistanturl.com"),Q=new URL(b2(X),W),J=X.match(/(\s*)$/)?.[1]||"";if(Q.hostname==="aaa.nonexistanturl.com"){let{pathname:G,search:V,hash:q}=Q;return G+V+decodeURIComponent(q)+J}let Y=Q.toString()+J;if(Y.includes("#")){let[G,V]=Y.split("#",2);return G+"#"+decodeURIComponent(V||"")}return Y}function o2(){if(typeof window<"u"&&window.location&&window.location.href){let Z=window.location.href;if(!Z||!Z.startsWith("http"))try{return new URL(Z),Z}catch{return"/"}return Z}if(typeof process<"u"&&process.cwd){let Z=process.cwd(),X=Z.slice(-1);if(X==="/"||X==="\\")return Z;else return Z+"/"}return"/"}function N8(Z){let X=I3.exec(Z||"");if(X)return X[1].toLowerCase();return}function j8(Z){let X=Z.lastIndexOf(".");if(X>=0)return j3(Z.substring(X).toLowerCase());return""}function j3(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function T2(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function a(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function _8(Z){let X=N8(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function o0(Z){if(!Z||typeof Z!=="string")return!0;let X=Z.trim().toLowerCase();if(!X)return!0;if(X.startsWith("javascript:")||X.startsWith("vbscript:")||X.startsWith("data:"))return!0;if(X.startsWith("file:"))return!0;if(typeof window<"u"&&window.location&&window.location.href)return!1;try{let W=new URL(X.startsWith("//")?"http:"+X:X);if(P8(W.hostname))return!0;let Q=W.port;if(Q&&k3(parseInt(Q)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;if(S3(X))return!0}return!1}function P8(Z){let X=_3(Z);if(!X)return!0;if(X==="localhost"||N3.some((J)=>X.endsWith(J)))return!0;let W=x8(X);if(W)return E8(W);let Q=P3(X);if(Q)return x3(Q);return!1}function _3(Z){let X=Z.trim().toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);while(X.endsWith("."))X=X.slice(0,-1);return X}function x8(Z){let X=Z.split(".");if(X.length!==4)return;let W=X.map((Q)=>{if(!/^\d+$/.test(Q))return Number.NaN;return Number(Q)});if(W.some((Q)=>!Number.isInteger(Q)||Q<0||Q>255))return;return W}function E8([Z,X,W,Q]){return Z===0||Z===10||Z===127||Z===100&&X>=64&&X<=127||Z===169&&X===254||Z===172&&X>=16&&X<=31||Z===192&&X===0&&W===0||Z===192&&X===168||Z===198&&(X===18||X===19)||Z>=224||Z===255&&X===255&&W===255&&Q===255}function P3(Z){if(!Z.includes(":"))return;let X=Z,W=X.lastIndexOf(":"),Q=X.slice(W+1);if(Q.includes(".")){let q=x8(Q);if(!q)return;let U=q[0]*256+q[1],H=q[2]*256+q[3];X=`${X.slice(0,W+1)}${U.toString(16)}:${H.toString(16)}`}let J=X.split("::");if(J.length>2)return;let Y=C8(J[0]),G=J.length===2?C8(J[1]):[];if(!Y||!G)return;if(J.length===1)return Y.length===8?Y:void 0;let V=8-Y.length-G.length;if(V<1)return;return[...Y,...Array(V).fill(0),...G]}function C8(Z){if(!Z)return[];let X=Z.split(":").map((W)=>{if(!/^[\da-f]{1,4}$/i.test(W))return Number.NaN;return Number.parseInt(W,16)});if(X.some((W)=>!Number.isInteger(W)||W<0||W>65535))return;return X}function x3(Z){if(Z.length!==8)return!1;let X=Z.every((V)=>V===0),W=Z.slice(0,7).every((V)=>V===0)&&Z[7]===1,Q=(Z[0]&65024)===64512,J=(Z[0]&65472)===65152,Y=(Z[0]&65280)===65280;if(X||W||Q||J||Y)return!0;let G=E3(Z);return G?E8(G):!1}function E3(Z){let X=Z.slice(0,5).every((J)=>J===0),W=X&&Z[5]===0,Q=X&&Z[5]===65535;if(!W&&!Q)return;return[Math.floor(Z[6]/256),Z[6]%256,Math.floor(Z[7]/256),Z[7]%256]}function S3(Z){return Z.split(/[\s/?#]+/).map((W)=>W.replace(/^[a-z][\d+.a-z-]*:\/\//i,"").replace(/:\d+$/,"")).filter(Boolean).some((W)=>P8(W))}function k3(Z){return[22,23,25,53,135,139,445,993,995,1433,1521,3306,3389,5432,5900,6379,8080,8443,9200,27017].includes(Z)}function r0(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=N8(Z);return X===void 0||X==="file"}function S8(Z){if(I0()){let X=o2(),W=Z.toUpperCase(),J=b2(X).toUpperCase(),Y=W.includes(J),G=W.includes(J),V=R3.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(Y||G||V)&&!X.startsWith("http"))Z=((U,H)=>{if(U.endsWith("/")||U.endsWith("\\"))return U+H;else return U+"/"+H})(X,Z);Z=b2(Z)}Z=encodeURI(Z);for(let X of C3)Z=Z.replace(X[0],X[1]);return Z}function q0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let Q=0;Q<_1.length;Q+=2)Z=Z.replace(_1[Q],_1[Q+1]);let W=Z.toLowerCase().startsWith("file://");if(W){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),I0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else W=!1,Z=I0()?Z:"/"+Z}if(I0()&&!W){if(Z=Z.replace(O3,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function s0(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(w3,"/").replace(T3,"~")})}var O3,I3,w3,T3,R3,C3,_1,N3,Y0=(Z)=>new URL(Z);var Y2=p(()=>{R8();O3=/\//g,I3=/^(\w{2,}):\/\//i,w3=/~1/g,T3=/~0/g,R3=/^[a-zA-Z]:[\\/]/,C3=[[/\?/g,"%3F"],[/#/g,"%23"]],_1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],N3=[".localhost",".local",".internal",".intranet",".corp",".home",".lan"]});function k8(){let Z={},X=this;for(let W of y3(X))if(typeof W==="string"){let Q=X[W],J=typeof Q;if(!b3.includes(J))Z[W]=Q}return Z}function y3(Z,X=[]){let W=[];while(Z&&Z!==v3)W=W.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let Q=new Set(W);for(let J of X.concat(g3))Q.delete(J);return Q}function C2(Z){return Z instanceof V2||Z instanceof U0}function x1(Z){if(Z.path===null)Z.path=[];return Z}var b3,g3,v3,V2,U0,$2,a0,w2,t0,e0,P1,K0;var D2=p(()=>{Y2();b3=["function","symbol","undefined"],g3=["constructor","prototype","__proto__"],v3=Object.getPrototypeOf({});V2=class V2 extends Error{name;message;source;path;code;constructor(Z,X){super();this.code="EUNKNOWN",this.name="JSONParserError",this.message=Z,this.source=X,this.path=null}toJSON=k8.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};U0=class U0 extends Error{files;constructor(Z){super();this.files=Z,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${q0(Z.$refs._root$Ref.path)}'`}toJSON=k8.bind(this);static getParserErrors(Z){let X=[];for(let W of Object.values(Z.$refs._$refs))if(W.errors)X.push(...W.errors);return X}get errors(){return U0.getParserErrors(this.files)}};$2=class $2 extends V2{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};a0=class a0 extends V2{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};w2=class w2 extends V2{code="ERESOLVER";name="ResolverError";ioErrorCode;constructor(Z,X){super(Z.message||`Error reading file "${X}"`,X);if("code"in Z)this.ioErrorCode=String(Z.code)}};t0=class t0 extends V2{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};e0=class e0 extends V2{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,W,Q,J){super(`Missing $ref pointer "${T2(X)}". Token "${Z}" does not exist.`,a(X));this.targetToken=Z,this.targetRef=W,this.targetFound=Q,this.parentPath=J}};P1=class P1 extends V2{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};K0=class K0 extends V2{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,a(X))}}});function z2(Z,X){let W=h3(X);return W?e(Z,W):Z}function Z1(Z){if(!Z||typeof Z!=="object"||ArrayBuffer.isView(Z))return!1;let X=Z.$schema;if(typeof X==="string"&&(X.includes("draft/2019-09/")||X.includes("draft/2020-12/")||X.includes("oas/3.1/")))return!0;let W=Z.openapi;return typeof W==="string"&&/^3\.1(?:\.|$)/.test(W)}function X1(Z,X,W,Q,J=!1){if(!J)return;let Y=new Set,G=(V,q)=>{if(!V||typeof V!=="object"||ArrayBuffer.isView(V)||Y.has(V))return;Y.add(V);let U=z2(q,V);if(U!==q)Z._addAlias(U,V,Q,J);for(let H of Object.keys(V))G(V[H],U)};G(W,X)}function h3(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var r2=p(()=>{Y2()});class s2{$ref;path;originalPath;scopeBase;value;circular;indirections;constructor(Z,X,W){this.$ref=Z,this.path=X,this.originalPath=W||X,this.scopeBase=Z.path||a(X),this.value=void 0,this.circular=!1,this.indirections=0}resolve(Z,X,W){let Q=s2.parse(this.path,this.originalPath),J=[];if(this.value=g8(Z),this.$ref.dynamicIdScope&&!v8(this.$ref))this.scopeBase=z2(this.scopeBase,this.value);for(let G=0;G<Q.length;G++){let V=this.circular,q=s.isExtended$Ref(this.value);if(z1(this,X,W))this.path=s2.join(this.path,Q.slice(G));else if(!V&&this.circular&&q)this.circular=!1;let U=Q[G];if(this.value[U]===void 0||this.value[U]===null&&G===Q.length-1){let H=!1;for(let E=Q.length-1;E>G;E--){let C=Q.slice(G,E+1).join("/");if(this.value[C]!==void 0){this.value=this.value[C],G=E,H=!0;break}}if(H)continue;if(U in this.value&&this.value[U]===null){this.value=W1;continue}this.value=null;let F=this.$ref.path||"",B=this.path.replace(F,""),M=s2.join("",J),L=W?.replace(F,"");throw new e0(U,decodeURI(this.originalPath),B,M,L)}else this.value=this.value[U];if(J.push(U),this.$ref.dynamicIdScope)this.scopeBase=z2(this.scopeBase,this.value)}let Y=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(!this.value||this.value.$ref&&e(Y,this.value.$ref)!==W)z1(this,X,W);return this}set(Z,X,W){let Q=s2.parse(this.path),J;if(Q.length===0)return this.value=X,X;if(d3(this.path,Q),this.value=g8(Z),this.$ref.dynamicIdScope&&!v8(this.$ref))this.scopeBase=z2(this.scopeBase,this.value);for(let Y=0;Y<Q.length-1;Y++){if(z1(this,W),J=Q[Y],this.value&&this.value[J]!==void 0)this.value=this.value[J];else this.value=b8(this,J,{});if(this.$ref.dynamicIdScope)this.scopeBase=z2(this.scopeBase,this.value)}return z1(this,W),J=Q[Q.length-1],b8(this,J,X),Z}static parse(Z,X){let W=T2(Z).substring(1);if(!W)return[];let Q=W.split("/");for(let J=0;J<Q.length;J++)Q[J]=Q[J].replace(f3,"/").replace(c3,"~");if(Q[0]!=="")throw new K0(W,X===void 0?Z:X);return Q.slice(1)}static join(Z,X){if(Z.indexOf("#")===-1)Z+="#";X=Array.isArray(X)?X:[X];for(let W=0;W<X.length;W++){let Q=X[W];Z+="/"+Q.replace(u3,"~0").replace(m3,"~1")}return Z}}function z1(Z,X,W){if(s.isAllowed$Ref(Z.value,X)){let Q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,J=e(Q,Z.value.$ref);if(J===Z.path&&!l3(W))Z.circular=!0;else{let Y=Z.$ref.$refs._resolve(J,Z.path,X);if(Y===null)return!1;if(Z.indirections+=Y.indirections+1,s.isExtended$Ref(Z.value))return Z.value=s.dereference(Z.value,Y.value,X),!1;else Z.$ref=Y.$ref,Z.path=Y.path,Z.value=Y.value,Z.scopeBase=Z.$ref.path;return!0}}return}function b8(Z,X,W){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(W);else Z.value[X]=W;else throw new V2(`Error assigning $ref pointer "${Z.path}".
16
- Cannot set "${X}" of a non-object.`);return W}function d3(Z,X){for(let W of X)if(p3.has(W))throw new V2(`Error assigning $ref pointer "${Z}".
17
- Unsafe JSON Pointer token "${W}" cannot be used for assignment.`)}function g8(Z){if(C2(Z))throw Z;return Z}function l3(Z){return typeof Z=="string"&&s2.parse(Z).length==0}function v8(Z){return Boolean(Z.path&&Z.path in Z.$refs._aliases)}var W1,m3,u3,f3,c3,p3,q2;var w0=p(()=>{V0();Y2();D2();r2();W1=Symbol("null"),m3=/\//g,u3=/~/g,f3=/~1/g,c3=/~0/g,p3=new Set(["__proto__","constructor","prototype"]);q2=s2});class T0{path;value;$refs;pathType;dynamicIdScope=!1;errors=[];constructor(Z){this.$refs=Z}addError(Z){if(this.errors===void 0)this.errors=[];let X=this.errors.map(({footprint:W})=>W);if("errors"in Z&&Array.isArray(Z.errors))this.errors.push(...Z.errors.map(x1).filter(({footprint:W})=>!X.includes(W)));else if(!("footprint"in Z)||!X.includes(Z.footprint))this.errors.push(x1(Z))}exists(Z,X){try{return this.resolve(Z,X),!0}catch{return!1}}get(Z,X){return this.resolve(Z,X)?.value}resolve(Z,X,W,Q){let J=new q2(this,Z,W);try{let Y=J.resolve(this.value,X,Q);if(Y.value===W1)Y.value=null;return Y}catch(Y){if(!X||!X.continueOnError||!C2(Y))throw Y;if(Y.path===null)Y.path=s0(T2(Q));if(Y instanceof K0)Y.source=decodeURI(a(Q));return this.addError(Y),null}}set(Z,X){let W=new q2(this,Z);if(this.value=W.set(this.value,X),this.value===W1)this.value=null}static is$Ref(Z){return Boolean(Z)&&typeof Z==="object"&&Z!==null&&"$ref"in Z&&typeof Z.$ref==="string"&&Z.$ref.length>0}static isExternal$Ref(Z){return T0.is$Ref(Z)&&Z.$ref[0]!=="#"}static isAllowed$Ref(Z,X){if(this.is$Ref(Z)){if(Z.$ref.substring(0,2)==="#/"||Z.$ref==="#")return!0;else if(Z.$ref[0]!=="#"&&(!X||X.resolve?.external))return!0}return}static isExtended$Ref(Z){return T0.is$Ref(Z)&&Object.keys(Z).length>1}static dereference(Z,X,W){if(X&&typeof X==="object"&&T0.isExtended$Ref(Z)){let Q={};for(let Y of Object.keys(Z))if(Y!=="$ref")Q[Y]=Z[Y];let J=W?.dereference?.mergeKeys??!0;for(let Y of Object.keys(X)){let G=Y;if(!(G in Q))Q[G]=X[G];else if(J&&typeof Q[G]==="object"&&Q[G]!==null&&typeof X[G]==="object"&&X[G]!==null)Q[G]=y8(X[G],Q[G])}return Q}else return X}}function y8(Z,X){if(typeof Z!=="object"||Z===null)return X;if(typeof X!=="object"||X===null)return X;let W=Array.isArray(Z)?[...Z]:{...Z};for(let Q of Object.keys(X))if(Array.isArray(X[Q]))W[Q]=[...X[Q]];else if(typeof X[Q]==="object"&&X[Q]!==null)W[Q]=y8(Z[Q],X[Q]);else W[Q]=X[Q];return W}var s;var V0=p(()=>{w0();D2();Y2();s=T0});class R0{circular;paths(...Z){return h8(this._$refs,Z.flat()).map((W)=>{return b2(W.decoded)})}values(...Z){let X=this._$refs;return h8(X,Z.flat()).reduce((Q,J)=>{return Q[b2(J.decoded)]=X[J.encoded].value,Q},{})}exists(Z,X){try{return this._resolve(Z,"",X),!0}catch{return!1}}get(Z,X){return this._resolve(Z,"",X).value}set(Z,X){let W=e(this._root$Ref.path,Z),Q=this._getRef(W);if(!Q)throw Error(`Error resolving $ref pointer "${Z}".
15
+ `:""}var d0="https://esm.sh/@vue/reactivity@3.5.32",l0="https://esm.sh/lit-html@3.3.0",j1;var n2=p(()=>{A0();f0();f2();A0();f0();f2();j1=new Set(["input","br","hr","img","meta","link","area","col","source"])});function b2(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var T3,I0=()=>T3;var R8=p(()=>{T3=/^win/.test(globalThis.process?globalThis.process.platform:"")});function e(Z,X){let W=new URL(b2(Z),"https://aaa.nonexistanturl.com"),Q=new URL(b2(X),W),J=X.match(/(\s*)$/)?.[1]||"";if(Q.hostname==="aaa.nonexistanturl.com"){let{pathname:G,search:V,hash:q}=Q;return G+V+decodeURIComponent(q)+J}let Y=Q.toString()+J;if(Y.includes("#")){let[G,V]=Y.split("#",2);return G+"#"+decodeURIComponent(V||"")}return Y}function o2(){if(typeof window<"u"&&window.location&&window.location.href){let Z=window.location.href;if(!Z||!Z.startsWith("http"))try{return new URL(Z),Z}catch{return"/"}return Z}if(typeof process<"u"&&process.cwd){let Z=process.cwd(),X=Z.slice(-1);if(X==="/"||X==="\\")return Z;else return Z+"/"}return"/"}function N8(Z){let X=C3.exec(Z||"");if(X)return X[1].toLowerCase();return}function j8(Z){let X=Z.lastIndexOf(".");if(X>=0)return E3(Z.substring(X).toLowerCase());return""}function E3(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function T2(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function a(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function _8(Z){let X=N8(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function o0(Z){if(!Z||typeof Z!=="string")return!0;let X=Z.trim().toLowerCase();if(!X)return!0;if(X.startsWith("javascript:")||X.startsWith("vbscript:")||X.startsWith("data:"))return!0;if(X.startsWith("file:"))return!0;if(typeof window<"u"&&window.location&&window.location.href)return!1;try{let W=new URL(X.startsWith("//")?"http:"+X:X);if(P8(W.hostname))return!0;let Q=W.port;if(Q&&y3(parseInt(Q)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;if(v3(X))return!0}return!1}function P8(Z){let X=S3(Z);if(!X)return!0;if(X==="localhost"||x3.some((J)=>X.endsWith(J)))return!0;let W=x8(X);if(W)return E8(W);let Q=k3(X);if(Q)return b3(Q);return!1}function S3(Z){let X=Z.trim().toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);while(X.endsWith("."))X=X.slice(0,-1);return X}function x8(Z){let X=Z.split(".");if(X.length!==4)return;let W=X.map((Q)=>{if(!/^\d+$/.test(Q))return Number.NaN;return Number(Q)});if(W.some((Q)=>!Number.isInteger(Q)||Q<0||Q>255))return;return W}function E8([Z,X,W,Q]){return Z===0||Z===10||Z===127||Z===100&&X>=64&&X<=127||Z===169&&X===254||Z===172&&X>=16&&X<=31||Z===192&&X===0&&W===0||Z===192&&X===168||Z===198&&(X===18||X===19)||Z>=224||Z===255&&X===255&&W===255&&Q===255}function k3(Z){if(!Z.includes(":"))return;let X=Z,W=X.lastIndexOf(":"),Q=X.slice(W+1);if(Q.includes(".")){let q=x8(Q);if(!q)return;let U=q[0]*256+q[1],H=q[2]*256+q[3];X=`${X.slice(0,W+1)}${U.toString(16)}:${H.toString(16)}`}let J=X.split("::");if(J.length>2)return;let Y=C8(J[0]),G=J.length===2?C8(J[1]):[];if(!Y||!G)return;if(J.length===1)return Y.length===8?Y:void 0;let V=8-Y.length-G.length;if(V<1)return;return[...Y,...Array(V).fill(0),...G]}function C8(Z){if(!Z)return[];let X=Z.split(":").map((W)=>{if(!/^[\da-f]{1,4}$/i.test(W))return Number.NaN;return Number.parseInt(W,16)});if(X.some((W)=>!Number.isInteger(W)||W<0||W>65535))return;return X}function b3(Z){if(Z.length!==8)return!1;let X=Z.every((V)=>V===0),W=Z.slice(0,7).every((V)=>V===0)&&Z[7]===1,Q=(Z[0]&65024)===64512,J=(Z[0]&65472)===65152,Y=(Z[0]&65280)===65280;if(X||W||Q||J||Y)return!0;let G=g3(Z);return G?E8(G):!1}function g3(Z){let X=Z.slice(0,5).every((J)=>J===0),W=X&&Z[5]===0,Q=X&&Z[5]===65535;if(!W&&!Q)return;return[Math.floor(Z[6]/256),Z[6]%256,Math.floor(Z[7]/256),Z[7]%256]}function v3(Z){return Z.split(/[\s/?#]+/).map((W)=>W.replace(/^[a-z][\d+.a-z-]*:\/\//i,"").replace(/:\d+$/,"")).filter(Boolean).some((W)=>P8(W))}function y3(Z){return[22,23,25,53,135,139,445,993,995,1433,1521,3306,3389,5432,5900,6379,8080,8443,9200,27017].includes(Z)}function r0(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=N8(Z);return X===void 0||X==="file"}function S8(Z){if(I0()){let X=o2(),W=Z.toUpperCase(),J=b2(X).toUpperCase(),Y=W.includes(J),G=W.includes(J),V=_3.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(Y||G||V)&&!X.startsWith("http"))Z=((U,H)=>{if(U.endsWith("/")||U.endsWith("\\"))return U+H;else return U+"/"+H})(X,Z);Z=b2(Z)}Z=encodeURI(Z);for(let X of P3)Z=Z.replace(X[0],X[1]);return Z}function q0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let Q=0;Q<_1.length;Q+=2)Z=Z.replace(_1[Q],_1[Q+1]);let W=Z.toLowerCase().startsWith("file://");if(W){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),I0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else W=!1,Z=I0()?Z:"/"+Z}if(I0()&&!W){if(Z=Z.replace(R3,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function s0(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(N3,"/").replace(j3,"~")})}var R3,C3,N3,j3,_3,P3,_1,x3,Y0=(Z)=>new URL(Z);var Y2=p(()=>{R8();R3=/\//g,C3=/^(\w{2,}):\/\//i,N3=/~1/g,j3=/~0/g,_3=/^[a-zA-Z]:[\\/]/,P3=[[/\?/g,"%3F"],[/#/g,"%23"]],_1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],x3=[".localhost",".local",".internal",".intranet",".corp",".home",".lan"]});function k8(){let Z={},X=this;for(let W of f3(X))if(typeof W==="string"){let Q=X[W],J=typeof Q;if(!h3.includes(J))Z[W]=Q}return Z}function f3(Z,X=[]){let W=[];while(Z&&Z!==u3)W=W.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let Q=new Set(W);for(let J of X.concat(m3))Q.delete(J);return Q}function C2(Z){return Z instanceof V2||Z instanceof U0}function x1(Z){if(Z.path===null)Z.path=[];return Z}var h3,m3,u3,V2,U0,$2,a0,w2,t0,e0,P1,K0;var D2=p(()=>{Y2();h3=["function","symbol","undefined"],m3=["constructor","prototype","__proto__"],u3=Object.getPrototypeOf({});V2=class V2 extends Error{name;message;source;path;code;constructor(Z,X){super();this.code="EUNKNOWN",this.name="JSONParserError",this.message=Z,this.source=X,this.path=null}toJSON=k8.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};U0=class U0 extends Error{files;constructor(Z){super();this.files=Z,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${q0(Z.$refs._root$Ref.path)}'`}toJSON=k8.bind(this);static getParserErrors(Z){let X=[];for(let W of Object.values(Z.$refs._$refs))if(W.errors)X.push(...W.errors);return X}get errors(){return U0.getParserErrors(this.files)}};$2=class $2 extends V2{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};a0=class a0 extends V2{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};w2=class w2 extends V2{code="ERESOLVER";name="ResolverError";ioErrorCode;constructor(Z,X){super(Z.message||`Error reading file "${X}"`,X);if("code"in Z)this.ioErrorCode=String(Z.code)}};t0=class t0 extends V2{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};e0=class e0 extends V2{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,W,Q,J){super(`Missing $ref pointer "${T2(X)}". Token "${Z}" does not exist.`,a(X));this.targetToken=Z,this.targetRef=W,this.targetFound=Q,this.parentPath=J}};P1=class P1 extends V2{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};K0=class K0 extends V2{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,a(X))}}});function z2(Z,X){let W=c3(X);return W?e(Z,W):Z}function Z1(Z){if(!Z||typeof Z!=="object"||ArrayBuffer.isView(Z))return!1;let X=Z.$schema;if(typeof X==="string"&&(X.includes("draft/2019-09/")||X.includes("draft/2020-12/")||X.includes("oas/3.1/")))return!0;let W=Z.openapi;return typeof W==="string"&&/^3\.1(?:\.|$)/.test(W)}function X1(Z,X,W,Q,J=!1){if(!J)return;let Y=new Set,G=(V,q)=>{if(!V||typeof V!=="object"||ArrayBuffer.isView(V)||Y.has(V))return;Y.add(V);let U=z2(q,V);if(U!==q)Z._addAlias(U,V,Q,J);for(let H of Object.keys(V))G(V[H],U)};G(W,X)}function c3(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var r2=p(()=>{Y2()});class s2{$ref;path;originalPath;scopeBase;value;circular;indirections;constructor(Z,X,W){this.$ref=Z,this.path=X,this.originalPath=W||X,this.scopeBase=Z.path||a(X),this.value=void 0,this.circular=!1,this.indirections=0}resolve(Z,X,W){let Q=s2.parse(this.path,this.originalPath),J=[];if(this.value=g8(Z),this.$ref.dynamicIdScope&&!v8(this.$ref))this.scopeBase=z2(this.scopeBase,this.value);for(let G=0;G<Q.length;G++){let V=this.circular,q=s.isExtended$Ref(this.value);if(z1(this,X,W))this.path=s2.join(this.path,Q.slice(G));else if(!V&&this.circular&&q)this.circular=!1;let U=Q[G];if(this.value[U]===void 0||this.value[U]===null&&G===Q.length-1){let H=!1;for(let E=Q.length-1;E>G;E--){let C=Q.slice(G,E+1).join("/");if(this.value[C]!==void 0){this.value=this.value[C],G=E,H=!0;break}}if(H)continue;if(U in this.value&&this.value[U]===null){this.value=W1;continue}this.value=null;let F=this.$ref.path||"",B=this.path.replace(F,""),M=s2.join("",J),L=W?.replace(F,"");throw new e0(U,decodeURI(this.originalPath),B,M,L)}else this.value=this.value[U];if(J.push(U),this.$ref.dynamicIdScope)this.scopeBase=z2(this.scopeBase,this.value)}let Y=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(!this.value||this.value.$ref&&e(Y,this.value.$ref)!==W)z1(this,X,W);return this}set(Z,X,W){let Q=s2.parse(this.path),J;if(Q.length===0)return this.value=X,X;if(o3(this.path,Q),this.value=g8(Z),this.$ref.dynamicIdScope&&!v8(this.$ref))this.scopeBase=z2(this.scopeBase,this.value);for(let Y=0;Y<Q.length-1;Y++){if(z1(this,W),J=Q[Y],this.value&&this.value[J]!==void 0)this.value=this.value[J];else this.value=b8(this,J,{});if(this.$ref.dynamicIdScope)this.scopeBase=z2(this.scopeBase,this.value)}return z1(this,W),J=Q[Q.length-1],b8(this,J,X),Z}static parse(Z,X){let W=T2(Z).substring(1);if(!W)return[];let Q=W.split("/");for(let J=0;J<Q.length;J++)Q[J]=Q[J].replace(l3,"/").replace(i3,"~");if(Q[0]!=="")throw new K0(W,X===void 0?Z:X);return Q.slice(1)}static join(Z,X){if(Z.indexOf("#")===-1)Z+="#";X=Array.isArray(X)?X:[X];for(let W=0;W<X.length;W++){let Q=X[W];Z+="/"+Q.replace(d3,"~0").replace(p3,"~1")}return Z}}function z1(Z,X,W){if(s.isAllowed$Ref(Z.value,X)){let Q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,J=e(Q,Z.value.$ref);if(J===Z.path&&!r3(W))Z.circular=!0;else{let Y=Z.$ref.$refs._resolve(J,Z.path,X);if(Y===null)return!1;if(Z.indirections+=Y.indirections+1,s.isExtended$Ref(Z.value))return Z.value=s.dereference(Z.value,Y.value,X),!1;else Z.$ref=Y.$ref,Z.path=Y.path,Z.value=Y.value,Z.scopeBase=Z.$ref.path;return!0}}return}function b8(Z,X,W){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(W);else Z.value[X]=W;else throw new V2(`Error assigning $ref pointer "${Z.path}".
16
+ Cannot set "${X}" of a non-object.`);return W}function o3(Z,X){for(let W of X)if(n3.has(W))throw new V2(`Error assigning $ref pointer "${Z}".
17
+ Unsafe JSON Pointer token "${W}" cannot be used for assignment.`)}function g8(Z){if(C2(Z))throw Z;return Z}function r3(Z){return typeof Z=="string"&&s2.parse(Z).length==0}function v8(Z){return Boolean(Z.path&&Z.path in Z.$refs._aliases)}var W1,p3,d3,l3,i3,n3,q2;var w0=p(()=>{V0();Y2();D2();r2();W1=Symbol("null"),p3=/\//g,d3=/~/g,l3=/~1/g,i3=/~0/g,n3=new Set(["__proto__","constructor","prototype"]);q2=s2});class T0{path;value;$refs;pathType;dynamicIdScope=!1;errors=[];constructor(Z){this.$refs=Z}addError(Z){if(this.errors===void 0)this.errors=[];let X=this.errors.map(({footprint:W})=>W);if("errors"in Z&&Array.isArray(Z.errors))this.errors.push(...Z.errors.map(x1).filter(({footprint:W})=>!X.includes(W)));else if(!("footprint"in Z)||!X.includes(Z.footprint))this.errors.push(x1(Z))}exists(Z,X){try{return this.resolve(Z,X),!0}catch{return!1}}get(Z,X){return this.resolve(Z,X)?.value}resolve(Z,X,W,Q){let J=new q2(this,Z,W);try{let Y=J.resolve(this.value,X,Q);if(Y.value===W1)Y.value=null;return Y}catch(Y){if(!X||!X.continueOnError||!C2(Y))throw Y;if(Y.path===null)Y.path=s0(T2(Q));if(Y instanceof K0)Y.source=decodeURI(a(Q));return this.addError(Y),null}}set(Z,X){let W=new q2(this,Z);if(this.value=W.set(this.value,X),this.value===W1)this.value=null}static is$Ref(Z){return Boolean(Z)&&typeof Z==="object"&&Z!==null&&"$ref"in Z&&typeof Z.$ref==="string"&&Z.$ref.length>0}static isExternal$Ref(Z){return T0.is$Ref(Z)&&Z.$ref[0]!=="#"}static isAllowed$Ref(Z,X){if(this.is$Ref(Z)){if(Z.$ref.substring(0,2)==="#/"||Z.$ref==="#")return!0;else if(Z.$ref[0]!=="#"&&(!X||X.resolve?.external))return!0}return}static isExtended$Ref(Z){return T0.is$Ref(Z)&&Object.keys(Z).length>1}static dereference(Z,X,W){if(X&&typeof X==="object"&&T0.isExtended$Ref(Z)){let Q={};for(let Y of Object.keys(Z))if(Y!=="$ref")Q[Y]=Z[Y];let J=W?.dereference?.mergeKeys??!0;for(let Y of Object.keys(X)){let G=Y;if(!(G in Q))Q[G]=X[G];else if(J&&typeof Q[G]==="object"&&Q[G]!==null&&typeof X[G]==="object"&&X[G]!==null)Q[G]=y8(X[G],Q[G])}return Q}else return X}}function y8(Z,X){if(typeof Z!=="object"||Z===null)return X;if(typeof X!=="object"||X===null)return X;let W=Array.isArray(Z)?[...Z]:{...Z};for(let Q of Object.keys(X))if(Array.isArray(X[Q]))W[Q]=[...X[Q]];else if(typeof X[Q]==="object"&&X[Q]!==null)W[Q]=y8(Z[Q],X[Q]);else W[Q]=X[Q];return W}var s;var V0=p(()=>{w0();D2();Y2();s=T0});class R0{circular;paths(...Z){return h8(this._$refs,Z.flat()).map((W)=>{return b2(W.decoded)})}values(...Z){let X=this._$refs;return h8(X,Z.flat()).reduce((Q,J)=>{return Q[b2(J.decoded)]=X[J.encoded].value,Q},{})}exists(Z,X){try{return this._resolve(Z,"",X),!0}catch{return!1}}get(Z,X){return this._resolve(Z,"",X).value}set(Z,X){let W=e(this._root$Ref.path,Z),Q=this._getRef(W);if(!Q)throw Error(`Error resolving $ref pointer "${Z}".
18
18
  "${a(W)}" not found.`);Q.set(W,X)}_get$Ref(Z){return Z=e(this._root$Ref.path,Z),this._getRef(Z)}_add(Z){let X=a(Z),W=new s(this);return W.path=X,this._$refs[X]=W,this._root$Ref=this._root$Ref||W,W}_addAlias(Z,X,W,Q=!1){let J=a(Z);if(!J||this._$refs[J]||this._aliases[J])return this._$refs[J]||this._aliases[J];let Y=new s(this);return Y.path=J,Y.pathType=W,Y.value=X,Y.dynamicIdScope=Q,this._aliases[J]=Y,Y}_resolve(Z,X,W){let Q=e(this._root$Ref.path,Z),J=this._getRef(Q);if(!J)throw Error(`Error resolving $ref pointer "${Z}".
19
- "${a(Q)}" not found.`);return J.resolve(Q,W,Z,X)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=a(Z);return this._$refs[X]||this._aliases[X]}}function h8(Z,X){let W=Object.keys(Z);if(X=Array.isArray(X[0])?X[0]:Array.prototype.slice.call(X),X.length>0&&X[0])W=W.filter((Q)=>{return X.includes(Z[Q].pathType)});return W.map((Q)=>{return{encoded:Q,decoded:Z[Q].pathType==="file"?q0(Q,!0):Q}})}var m8=p(()=>{V0();Y2()});function E1(Z){return Object.keys(Z||{}).filter((X)=>{return typeof Z[X]==="object"}).map((X)=>{return Z[X].name=X,Z[X]})}function S1(Z,X,W,Q,J){return Z.filter((Y)=>{return!!u8(Y,X,W,Q,J)})}function k1(Z){for(let X of Z)X.order=X.order||Number.MAX_SAFE_INTEGER;return Z.sort((X,W)=>{return X.order-W.order})}async function b1(Z,X,W,Q){let J,Y,G=0;return new Promise((V,q)=>{U();function U(){if(J=Z[G++],!J)return q(Y);try{let M=u8(J,X,W,H,Q);if(M&&typeof M.then==="function")M.then(F,B);else if(M!==void 0)F(M);else if(G===Z.length)throw Error("No promise has been returned or callback has been called.")}catch(M){B(M)}}function H(M,L){if(M)B(M);else F(L)}function F(M){V({plugin:J,result:M})}function B(M){Y={plugin:J,error:M},U()}})}function u8(Z,X,W,Q,J){let Y=Z[X];if(typeof Y==="function")return Y.apply(Z,[W,Q,J]);if(!Q){if(Y instanceof RegExp)return Y.test(W.url);else if(typeof Y==="string")return Y===W.extension;else if(Array.isArray(Y))return Y.indexOf(W.extension)!==-1}return Y}async function i3(Z,X,W){let Q=typeof Z==="string"?Z:Z.url,J=typeof Z==="string"?void 0:Z.baseUrl,Y=typeof Z==="string"?void 0:Z.reference,G=Q.indexOf("#"),V="";if(G>=0)V=Q.substring(G),Q=Q.substring(0,G);if(Y){let H=Y.indexOf("#");if(H>=0)Y=Y.substring(0,H)}let q=X._add(Q),U={url:Q,hash:V,extension:j8(Q),...Y!==void 0?{reference:Y}:{},...J!==void 0?{baseUrl:J}:{}};try{let H=await n3(U,W,X);q.pathType=H.plugin.name,U.data=H.result;let F=await o3(U,W,X);return q.value=F.result,q.dynamicIdScope=Z1(q.value),X1(X,q.path,q.value,q.pathType,q.dynamicIdScope),F.result}catch(H){if(C2(H))q.value=H;throw H}}async function n3(Z,X,W){let Q=E1(X.resolve);Q=S1(Q,"canRead",Z,void 0,W),k1(Q);try{return await b1(Q,"read",Z,W)}catch(J){if(!J&&X.continueOnError)throw new t0(Z.url);else if(!J||!("error"in J))throw SyntaxError(`Unable to resolve $ref pointer "${Z.url}"`,{cause:J});else if(J.error instanceof w2)throw J.error;else throw new w2(J,Z.url)}}async function o3(Z,X,W){let Q=E1(X.parse),J=S1(Q,"canParse",Z),Y=J.length>0?J:Q;k1(Y);try{let G=await b1(Y,"parse",Z,W);if(!G.plugin.allowEmpty&&r3(G.result))throw SyntaxError(`Error parsing "${Z.url}" as ${G.plugin.name}.
20
- Parsed value is empty`);else return G}catch(G){if(!G&&X.continueOnError)throw new a0(Z.url);else if(G&&G.message&&G.message.startsWith("Error parsing"))throw G;else if(!G||!("error"in G))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:G});else if(G.error instanceof $2)throw G.error;else throw new $2(G.error.message,Z.url)}}function r3(Z){return Z===void 0||typeof Z==="object"&&Object.keys(Z).length===0||typeof Z==="string"&&Z.trim().length===0||Buffer.isBuffer(Z)&&Z.length===0}var Q1;var g1=p(()=>{Y2();r2();D2();Q1=i3});var f8;var c8=p(()=>{D2();f8={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")if(X.trim().length===0)return;else try{return JSON.parse(X)}catch(W){if(this.allowBOM)try{let Q=X.indexOf("{");return X=X.slice(Q),JSON.parse(X)}catch(Q){throw new $2(Q.message,Z.url)}throw new $2(W.message,Z.url)}else return X}}});var s3,p8,a3,t3,e3,Z4,n=(Z,X)=>()=>(X||(Z((X={exports:{}}).exports,X),Z=null),X.exports),X4=(Z,X,W,Q)=>{if(X&&typeof X==="object"||typeof X==="function"){for(var J=t3(X),Y=0,G=J.length,V;Y<G;Y++)if(V=J[Y],!Z4.call(Z,V)&&V!==W)p8(Z,V,{get:((q)=>X[q]).bind(null,V),enumerable:!(Q=a3(X,V))||Q.enumerable})}return Z},z4=(Z,X,W)=>(W=Z!=null?s3(e3(Z)):{},X4(X||!Z||!Z.__esModule?p8(W,"default",{value:Z,enumerable:!0}):W,Z)),C0,N0,W4,W2,d8,l8,i8,n8,o8,r8,s8,a8,t8,e8,Z9,X9,z9,W9,Q9,G9,J9,v1,Q4,G4,Y9,h6,m6,u6,q9,f6,c6,p6,d6,l6,i6,n6,o6,r6,s6,y1;var h1=p(()=>{/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */s3=Object.create,p8=Object.defineProperty,a3=Object.getOwnPropertyDescriptor,t3=Object.getOwnPropertyNames,e3=Object.getPrototypeOf,Z4=Object.prototype.hasOwnProperty,C0=n((Z,X)=>{function W(q){return typeof q>"u"||q===null}function Q(q){return typeof q==="object"&&q!==null}function J(q){if(Array.isArray(q))return q;else if(W(q))return[];return[q]}function Y(q,U){if(U){let H=Object.keys(U);for(let F=0,B=H.length;F<B;F+=1){let M=H[F];q[M]=U[M]}}return q}function G(q,U){let H="";for(let F=0;F<U;F+=1)H+=q;return H}function V(q){return q===0&&Number.NEGATIVE_INFINITY===1/q}X.exports.isNothing=W,X.exports.isObject=Q,X.exports.toArray=J,X.exports.repeat=G,X.exports.isNegativeZero=V,X.exports.extend=Y}),N0=n((Z,X)=>{function W(J,Y){let G="",V=J.reason||"(unknown reason)";if(!J.mark)return V;if(J.mark.name)G+='in "'+J.mark.name+'" ';if(G+="("+(J.mark.line+1)+":"+(J.mark.column+1)+")",!Y&&J.mark.snippet)G+=`
19
+ "${a(Q)}" not found.`);return J.resolve(Q,W,Z,X)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=a(Z);return this._$refs[X]||this._aliases[X]}}function h8(Z,X){let W=Object.keys(Z);if(X=Array.isArray(X[0])?X[0]:Array.prototype.slice.call(X),X.length>0&&X[0])W=W.filter((Q)=>{return X.includes(Z[Q].pathType)});return W.map((Q)=>{return{encoded:Q,decoded:Z[Q].pathType==="file"?q0(Q,!0):Q}})}var m8=p(()=>{V0();Y2()});function E1(Z){return Object.keys(Z||{}).filter((X)=>{return typeof Z[X]==="object"}).map((X)=>{return Z[X].name=X,Z[X]})}function S1(Z,X,W,Q,J){return Z.filter((Y)=>{return!!u8(Y,X,W,Q,J)})}function k1(Z){for(let X of Z)X.order=X.order||Number.MAX_SAFE_INTEGER;return Z.sort((X,W)=>{return X.order-W.order})}async function b1(Z,X,W,Q){let J,Y,G=0;return new Promise((V,q)=>{U();function U(){if(J=Z[G++],!J)return q(Y);try{let M=u8(J,X,W,H,Q);if(M&&typeof M.then==="function")M.then(F,B);else if(M!==void 0)F(M);else if(G===Z.length)throw Error("No promise has been returned or callback has been called.")}catch(M){B(M)}}function H(M,L){if(M)B(M);else F(L)}function F(M){V({plugin:J,result:M})}function B(M){Y={plugin:J,error:M},U()}})}function u8(Z,X,W,Q,J){let Y=Z[X];if(typeof Y==="function")return Y.apply(Z,[W,Q,J]);if(!Q){if(Y instanceof RegExp)return Y.test(W.url);else if(typeof Y==="string")return Y===W.extension;else if(Array.isArray(Y))return Y.indexOf(W.extension)!==-1}return Y}async function s3(Z,X,W){let Q=typeof Z==="string"?Z:Z.url,J=typeof Z==="string"?void 0:Z.baseUrl,Y=typeof Z==="string"?void 0:Z.reference,G=Q.indexOf("#"),V="";if(G>=0)V=Q.substring(G),Q=Q.substring(0,G);if(Y){let H=Y.indexOf("#");if(H>=0)Y=Y.substring(0,H)}let q=X._add(Q),U={url:Q,hash:V,extension:j8(Q),...Y!==void 0?{reference:Y}:{},...J!==void 0?{baseUrl:J}:{}};try{let H=await a3(U,W,X);q.pathType=H.plugin.name,U.data=H.result;let F=await t3(U,W,X);return q.value=F.result,q.dynamicIdScope=Z1(q.value),X1(X,q.path,q.value,q.pathType,q.dynamicIdScope),F.result}catch(H){if(C2(H))q.value=H;throw H}}async function a3(Z,X,W){let Q=E1(X.resolve);Q=S1(Q,"canRead",Z,void 0,W),k1(Q);try{return await b1(Q,"read",Z,W)}catch(J){if(!J&&X.continueOnError)throw new t0(Z.url);else if(!J||!("error"in J))throw SyntaxError(`Unable to resolve $ref pointer "${Z.url}"`,{cause:J});else if(J.error instanceof w2)throw J.error;else throw new w2(J,Z.url)}}async function t3(Z,X,W){let Q=E1(X.parse),J=S1(Q,"canParse",Z),Y=J.length>0?J:Q;k1(Y);try{let G=await b1(Y,"parse",Z,W);if(!G.plugin.allowEmpty&&e3(G.result))throw SyntaxError(`Error parsing "${Z.url}" as ${G.plugin.name}.
20
+ Parsed value is empty`);else return G}catch(G){if(!G&&X.continueOnError)throw new a0(Z.url);else if(G&&G.message&&G.message.startsWith("Error parsing"))throw G;else if(!G||!("error"in G))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:G});else if(G.error instanceof $2)throw G.error;else throw new $2(G.error.message,Z.url)}}function e3(Z){return Z===void 0||typeof Z==="object"&&Object.keys(Z).length===0||typeof Z==="string"&&Z.trim().length===0||Buffer.isBuffer(Z)&&Z.length===0}var Q1;var g1=p(()=>{Y2();r2();D2();Q1=s3});var f8;var c8=p(()=>{D2();f8={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")if(X.trim().length===0)return;else try{return JSON.parse(X)}catch(W){if(this.allowBOM)try{let Q=X.indexOf("{");return X=X.slice(Q),JSON.parse(X)}catch(Q){throw new $2(Q.message,Z.url)}throw new $2(W.message,Z.url)}else return X}}});var Z4,p8,X4,z4,W4,Q4,n=(Z,X)=>()=>(X||(Z((X={exports:{}}).exports,X),Z=null),X.exports),G4=(Z,X,W,Q)=>{if(X&&typeof X==="object"||typeof X==="function"){for(var J=z4(X),Y=0,G=J.length,V;Y<G;Y++)if(V=J[Y],!Q4.call(Z,V)&&V!==W)p8(Z,V,{get:((q)=>X[q]).bind(null,V),enumerable:!(Q=X4(X,V))||Q.enumerable})}return Z},J4=(Z,X,W)=>(W=Z!=null?Z4(W4(Z)):{},G4(X||!Z||!Z.__esModule?p8(W,"default",{value:Z,enumerable:!0}):W,Z)),C0,N0,Y4,W2,d8,l8,i8,n8,o8,r8,s8,a8,t8,e8,Z9,X9,z9,W9,Q9,G9,J9,v1,q4,U4,Y9,c6,p6,d6,q9,l6,i6,n6,o6,r6,s6,a6,t6,e6,ZZ,y1;var h1=p(()=>{/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */Z4=Object.create,p8=Object.defineProperty,X4=Object.getOwnPropertyDescriptor,z4=Object.getOwnPropertyNames,W4=Object.getPrototypeOf,Q4=Object.prototype.hasOwnProperty,C0=n((Z,X)=>{function W(q){return typeof q>"u"||q===null}function Q(q){return typeof q==="object"&&q!==null}function J(q){if(Array.isArray(q))return q;else if(W(q))return[];return[q]}function Y(q,U){if(U){let H=Object.keys(U);for(let F=0,B=H.length;F<B;F+=1){let M=H[F];q[M]=U[M]}}return q}function G(q,U){let H="";for(let F=0;F<U;F+=1)H+=q;return H}function V(q){return q===0&&Number.NEGATIVE_INFINITY===1/q}X.exports.isNothing=W,X.exports.isObject=Q,X.exports.toArray=J,X.exports.repeat=G,X.exports.isNegativeZero=V,X.exports.extend=Y}),N0=n((Z,X)=>{function W(J,Y){let G="",V=J.reason||"(unknown reason)";if(!J.mark)return V;if(J.mark.name)G+='in "'+J.mark.name+'" ';if(G+="("+(J.mark.line+1)+":"+(J.mark.column+1)+")",!Y&&J.mark.snippet)G+=`
21
21
 
22
- `+J.mark.snippet;return V+" "+G}function Q(J,Y){if(Error.call(this),this.name="YAMLException",this.reason=J,this.mark=Y,this.message=W(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q,Q.prototype.toString=function(Y){return this.name+": "+W(this,Y)},X.exports=Q}),W4=n((Z,X)=>{var W=C0();function Q(G,V,q,U,H){let F="",B="",M=Math.floor(H/2)-1;if(U-V>M)F=" ... ",V=U-M+F.length;if(q-U>M)B=" ...",q=U+M-B.length;return{str:F+G.slice(V,q).replace(/\t/g,"→")+B,pos:U-V+F.length}}function J(G,V){return W.repeat(" ",V-G.length)+G}function Y(G,V){if(V=Object.create(V||null),!G.buffer)return null;if(!V.maxLength)V.maxLength=79;if(typeof V.indent!=="number")V.indent=1;if(typeof V.linesBefore!=="number")V.linesBefore=3;if(typeof V.linesAfter!=="number")V.linesAfter=2;let q=/\r?\n|\r|\0/g,U=[0],H=[],F,B=-1;while(F=q.exec(G.buffer))if(H.push(F.index),U.push(F.index+F[0].length),G.position<=F.index&&B<0)B=U.length-2;if(B<0)B=U.length-1;let M="",L=Math.min(G.line+V.linesAfter,H.length).toString().length,E=V.maxLength-(V.indent+L+3);for(let _=1;_<=V.linesBefore;_++){if(B-_<0)break;let x=Q(G.buffer,U[B-_],H[B-_],G.position-(U[B]-U[B-_]),E);M=W.repeat(" ",V.indent)+J((G.line-_+1).toString(),L)+" | "+x.str+`
22
+ `+J.mark.snippet;return V+" "+G}function Q(J,Y){if(Error.call(this),this.name="YAMLException",this.reason=J,this.mark=Y,this.message=W(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q,Q.prototype.toString=function(Y){return this.name+": "+W(this,Y)},X.exports=Q}),Y4=n((Z,X)=>{var W=C0();function Q(G,V,q,U,H){let F="",B="",M=Math.floor(H/2)-1;if(U-V>M)F=" ... ",V=U-M+F.length;if(q-U>M)B=" ...",q=U+M-B.length;return{str:F+G.slice(V,q).replace(/\t/g,"→")+B,pos:U-V+F.length}}function J(G,V){return W.repeat(" ",V-G.length)+G}function Y(G,V){if(V=Object.create(V||null),!G.buffer)return null;if(!V.maxLength)V.maxLength=79;if(typeof V.indent!=="number")V.indent=1;if(typeof V.linesBefore!=="number")V.linesBefore=3;if(typeof V.linesAfter!=="number")V.linesAfter=2;let q=/\r?\n|\r|\0/g,U=[0],H=[],F,B=-1;while(F=q.exec(G.buffer))if(H.push(F.index),U.push(F.index+F[0].length),G.position<=F.index&&B<0)B=U.length-2;if(B<0)B=U.length-1;let M="",L=Math.min(G.line+V.linesAfter,H.length).toString().length,E=V.maxLength-(V.indent+L+3);for(let _=1;_<=V.linesBefore;_++){if(B-_<0)break;let x=Q(G.buffer,U[B-_],H[B-_],G.position-(U[B]-U[B-_]),E);M=W.repeat(" ",V.indent)+J((G.line-_+1).toString(),L)+" | "+x.str+`
23
23
  `+M}let C=Q(G.buffer,U[B],H[B],G.position,E);M+=W.repeat(" ",V.indent)+J((G.line+1).toString(),L)+" | "+C.str+`
24
24
  `,M+=W.repeat("-",V.indent+L+3+C.pos)+`^
25
25
  `;for(let _=1;_<=V.linesAfter;_++){if(B+_>=H.length)break;let x=Q(G.buffer,U[B+_],H[B+_],G.position-(U[B]-U[B+_]),E);M+=W.repeat(" ",V.indent)+J((G.line+_+1).toString(),L)+" | "+x.str+`
26
26
  `}return M.replace(/\n$/,"")}X.exports=Y}),W2=n((Z,X)=>{var W=N0(),Q=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],J=["scalar","sequence","mapping"];function Y(V){let q={};if(V!==null)Object.keys(V).forEach(function(U){V[U].forEach(function(H){q[String(H)]=U})});return q}function G(V,q){if(q=q||{},Object.keys(q).forEach(function(U){if(Q.indexOf(U)===-1)throw new W('Unknown option "'+U+'" is met in definition of "'+V+'" YAML type.')}),this.options=q,this.tag=V,this.kind=q.kind||null,this.resolve=q.resolve||function(){return!0},this.construct=q.construct||function(U){return U},this.instanceOf=q.instanceOf||null,this.predicate=q.predicate||null,this.represent=q.represent||null,this.representName=q.representName||null,this.defaultStyle=q.defaultStyle||null,this.multi=q.multi||!1,this.styleAliases=Y(q.styleAliases||null),J.indexOf(this.kind)===-1)throw new W('Unknown kind "'+this.kind+'" is specified for "'+V+'" YAML type.')}X.exports=G}),d8=n((Z,X)=>{var W=N0(),Q=W2();function J(V,q){let U=[];return V[q].forEach(function(H){let F=U.length;U.forEach(function(B,M){if(B.tag===H.tag&&B.kind===H.kind&&B.multi===H.multi)F=M}),U[F]=H}),U}function Y(){let V={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function q(U){if(U.multi)V.multi[U.kind].push(U),V.multi.fallback.push(U);else V[U.kind][U.tag]=V.fallback[U.tag]=U}for(let U=0,H=arguments.length;U<H;U+=1)arguments[U].forEach(q);return V}function G(V){return this.extend(V)}G.prototype.extend=function(q){let U=[],H=[];if(q instanceof Q)H.push(q);else if(Array.isArray(q))H=H.concat(q);else if(q&&(Array.isArray(q.implicit)||Array.isArray(q.explicit))){if(q.implicit)U=U.concat(q.implicit);if(q.explicit)H=H.concat(q.explicit)}else throw new W("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");U.forEach(function(B){if(!(B instanceof Q))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(B.loadKind&&B.loadKind!=="scalar")throw new W("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(B.multi)throw new W("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),H.forEach(function(B){if(!(B instanceof Q))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let F=Object.create(G.prototype);return F.implicit=(this.implicit||[]).concat(U),F.explicit=(this.explicit||[]).concat(H),F.compiledImplicit=J(F,"implicit"),F.compiledExplicit=J(F,"explicit"),F.compiledTypeMap=Y(F.compiledImplicit,F.compiledExplicit),F},X.exports=G}),l8=n((Z,X)=>{X.exports=new(W2())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(W){return W!==null?W:""}})}),i8=n((Z,X)=>{X.exports=new(W2())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(W){return W!==null?W:[]}})}),n8=n((Z,X)=>{X.exports=new(W2())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(W){return W!==null?W:{}}})}),o8=n((Z,X)=>{X.exports=new(d8())({explicit:[l8(),i8(),n8()]})}),r8=n((Z,X)=>{var W=W2();function Q(G){if(G===null)return!0;let V=G.length;return V===1&&G==="~"||V===4&&(G==="null"||G==="Null"||G==="NULL")}function J(){return null}function Y(G){return G===null}X.exports=new W("tag:yaml.org,2002:null",{kind:"scalar",resolve:Q,construct:J,predicate:Y,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}),s8=n((Z,X)=>{var W=W2();function Q(G){if(G===null)return!1;let V=G.length;return V===4&&(G==="true"||G==="True"||G==="TRUE")||V===5&&(G==="false"||G==="False"||G==="FALSE")}function J(G){return G==="true"||G==="True"||G==="TRUE"}function Y(G){return Object.prototype.toString.call(G)==="[object Boolean]"}X.exports=new W("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Q,construct:J,predicate:Y,represent:{lowercase:function(G){return G?"true":"false"},uppercase:function(G){return G?"TRUE":"FALSE"},camelcase:function(G){return G?"True":"False"}},defaultStyle:"lowercase"})}),a8=n((Z,X)=>{var W=C0(),Q=W2();function J(F){return F>=48&&F<=57||F>=65&&F<=70||F>=97&&F<=102}function Y(F){return F>=48&&F<=55}function G(F){return F>=48&&F<=57}function V(F){if(F===null)return!1;let B=F.length,M=0,L=!1;if(!B)return!1;let E=F[M];if(E==="-"||E==="+")E=F[++M];if(E==="0"){if(M+1===B)return!0;if(E=F[++M],E==="b"){M++;for(;M<B;M++){if(E=F[M],E!=="0"&&E!=="1")return!1;L=!0}return L&&Number.isFinite(q(F))}if(E==="x"){M++;for(;M<B;M++){if(!J(F.charCodeAt(M)))return!1;L=!0}return L&&Number.isFinite(q(F))}if(E==="o"){M++;for(;M<B;M++){if(!Y(F.charCodeAt(M)))return!1;L=!0}return L&&Number.isFinite(q(F))}}for(;M<B;M++){if(!G(F.charCodeAt(M)))return!1;L=!0}if(!L)return!1;return Number.isFinite(q(F))}function q(F){let B=F,M=1,L=B[0];if(L==="-"||L==="+"){if(L==="-")M=-1;B=B.slice(1),L=B[0]}if(B==="0")return 0;if(L==="0"){if(B[1]==="b")return M*parseInt(B.slice(2),2);if(B[1]==="x")return M*parseInt(B.slice(2),16);if(B[1]==="o")return M*parseInt(B.slice(2),8)}return M*parseInt(B,10)}function U(F){return q(F)}function H(F){return Object.prototype.toString.call(F)==="[object Number]"&&F%1===0&&!W.isNegativeZero(F)}X.exports=new Q("tag:yaml.org,2002:int",{kind:"scalar",resolve:V,construct:U,predicate:H,represent:{binary:function(F){return F>=0?"0b"+F.toString(2):"-0b"+F.toString(2).slice(1)},octal:function(F){return F>=0?"0o"+F.toString(8):"-0o"+F.toString(8).slice(1)},decimal:function(F){return F.toString(10)},hexadecimal:function(F){return F>=0?"0x"+F.toString(16).toUpperCase():"-0x"+F.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}),t8=n((Z,X)=>{var W=C0(),Q=W2(),J=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Y=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function G(F){if(F===null)return!1;if(!J.test(F))return!1;if(Number.isFinite(parseFloat(F,10)))return!0;return Y.test(F)}function V(F){let B=F.toLowerCase(),M=B[0]==="-"?-1:1;if("+-".indexOf(B[0])>=0)B=B.slice(1);if(B===".inf")return M===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(B===".nan")return NaN;return M*parseFloat(B,10)}var q=/^[-+]?[0-9]+e/;function U(F,B){if(isNaN(F))switch(B){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===F)switch(B){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===F)switch(B){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(W.isNegativeZero(F))return"-0.0";let M=F.toString(10);return q.test(M)?M.replace("e",".e"):M}function H(F){return Object.prototype.toString.call(F)==="[object Number]"&&(F%1!==0||W.isNegativeZero(F))}X.exports=new Q("tag:yaml.org,2002:float",{kind:"scalar",resolve:G,construct:V,predicate:H,represent:U,defaultStyle:"lowercase"})}),e8=n((Z,X)=>{X.exports=o8().extend({implicit:[r8(),s8(),a8(),t8()]})}),Z9=n((Z,X)=>{X.exports=e8()}),X9=n((Z,X)=>{var W=W2(),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),J=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Y(q){if(q===null)return!1;if(Q.exec(q)!==null)return!0;if(J.exec(q)!==null)return!0;return!1}function G(q){let U=0,H=null,F=Q.exec(q);if(F===null)F=J.exec(q);if(F===null)throw Error("Date resolve error");let B=+F[1],M=+F[2]-1,L=+F[3];if(!F[4])return new Date(Date.UTC(B,M,L));let E=+F[4],C=+F[5],_=+F[6];if(F[7]){U=F[7].slice(0,3);while(U.length<3)U+="0";U=+U}if(F[9]){let h=+F[10],u=+(F[11]||0);if(H=(h*60+u)*60000,F[9]==="-")H=-H}let x=new Date(Date.UTC(B,M,L,E,C,_,U));if(H)x.setTime(x.getTime()-H);return x}function V(q){return q.toISOString()}X.exports=new W("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Y,construct:G,instanceOf:Date,represent:V})}),z9=n((Z,X)=>{var W=W2();function Q(J){return J==="<<"||J===null}X.exports=new W("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Q})}),W9=n((Z,X)=>{var W=W2(),Q=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
27
- \r`;function J(q){if(q===null)return!1;let U=0,H=q.length,F=Q;for(let B=0;B<H;B++){let M=F.indexOf(q.charAt(B));if(M>64)continue;if(M<0)return!1;U+=6}return U%8===0}function Y(q){let U=q.replace(/[\r\n=]/g,""),H=U.length,F=Q,B=0,M=[];for(let E=0;E<H;E++){if(E%4===0&&E)M.push(B>>16&255),M.push(B>>8&255),M.push(B&255);B=B<<6|F.indexOf(U.charAt(E))}let L=H%4*6;if(L===0)M.push(B>>16&255),M.push(B>>8&255),M.push(B&255);else if(L===18)M.push(B>>10&255),M.push(B>>2&255);else if(L===12)M.push(B>>4&255);return new Uint8Array(M)}function G(q){let U="",H=0,F=q.length,B=Q;for(let L=0;L<F;L++){if(L%3===0&&L)U+=B[H>>18&63],U+=B[H>>12&63],U+=B[H>>6&63],U+=B[H&63];H=(H<<8)+q[L]}let M=F%3;if(M===0)U+=B[H>>18&63],U+=B[H>>12&63],U+=B[H>>6&63],U+=B[H&63];else if(M===2)U+=B[H>>10&63],U+=B[H>>4&63],U+=B[H<<2&63],U+=B[64];else if(M===1)U+=B[H>>2&63],U+=B[H<<4&63],U+=B[64],U+=B[64];return U}function V(q){return Object.prototype.toString.call(q)==="[object Uint8Array]"}X.exports=new W("tag:yaml.org,2002:binary",{kind:"scalar",resolve:J,construct:Y,predicate:V,represent:G})}),Q9=n((Z,X)=>{var W=W2(),Q=Object.prototype.hasOwnProperty,J=Object.prototype.toString;function Y(V){if(V===null)return!0;let q=[],U=V;for(let H=0,F=U.length;H<F;H+=1){let B=U[H],M=!1;if(J.call(B)!=="[object Object]")return!1;let L;for(L in B)if(Q.call(B,L))if(!M)M=!0;else return!1;if(!M)return!1;if(q.indexOf(L)===-1)q.push(L);else return!1}return!0}function G(V){return V!==null?V:[]}X.exports=new W("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Y,construct:G})}),G9=n((Z,X)=>{var W=W2(),Q=Object.prototype.toString;function J(G){if(G===null)return!0;let V=G,q=Array(V.length);for(let U=0,H=V.length;U<H;U+=1){let F=V[U];if(Q.call(F)!=="[object Object]")return!1;let B=Object.keys(F);if(B.length!==1)return!1;q[U]=[B[0],F[B[0]]]}return!0}function Y(G){if(G===null)return[];let V=G,q=Array(V.length);for(let U=0,H=V.length;U<H;U+=1){let F=V[U],B=Object.keys(F);q[U]=[B[0],F[B[0]]]}return q}X.exports=new W("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:J,construct:Y})}),J9=n((Z,X)=>{var W=W2(),Q=Object.prototype.hasOwnProperty;function J(G){if(G===null)return!0;let V=G;for(let q in V)if(Q.call(V,q)){if(V[q]!==null)return!1}return!0}function Y(G){return G!==null?G:{}}X.exports=new W("tag:yaml.org,2002:set",{kind:"mapping",resolve:J,construct:Y})}),v1=n((Z,X)=>{X.exports=Z9().extend({implicit:[X9(),z9()],explicit:[W9(),Q9(),G9(),J9()]})}),Q4=n((Z,X)=>{var W=C0(),Q=N0(),J=W4(),Y=v1(),G=Object.prototype.hasOwnProperty,V=1,q=2,U=3,H=4,F=1,B=2,M=3,L=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E=/[\x85\u2028\u2029]/,C=/[,\[\]{}]/,_=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function h(z){return Object.prototype.toString.call(z)}function u(z){return z===10||z===13}function f(z){return z===9||z===32}function y(z){return z===9||z===32||z===10||z===13}function b(z){return z===44||z===91||z===93||z===123||z===125}function l(z){if(z>=48&&z<=57)return z-48;let $=z|32;if($>=97&&$<=102)return $-97+10;return-1}function Q2(z){if(z===120)return 2;if(z===117)return 4;if(z===85)return 8;return 0}function B2(z){if(z>=48&&z<=57)return z-48;return-1}function d2(z){switch(z){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
27
+ \r`;function J(q){if(q===null)return!1;let U=0,H=q.length,F=Q;for(let B=0;B<H;B++){let M=F.indexOf(q.charAt(B));if(M>64)continue;if(M<0)return!1;U+=6}return U%8===0}function Y(q){let U=q.replace(/[\r\n=]/g,""),H=U.length,F=Q,B=0,M=[];for(let E=0;E<H;E++){if(E%4===0&&E)M.push(B>>16&255),M.push(B>>8&255),M.push(B&255);B=B<<6|F.indexOf(U.charAt(E))}let L=H%4*6;if(L===0)M.push(B>>16&255),M.push(B>>8&255),M.push(B&255);else if(L===18)M.push(B>>10&255),M.push(B>>2&255);else if(L===12)M.push(B>>4&255);return new Uint8Array(M)}function G(q){let U="",H=0,F=q.length,B=Q;for(let L=0;L<F;L++){if(L%3===0&&L)U+=B[H>>18&63],U+=B[H>>12&63],U+=B[H>>6&63],U+=B[H&63];H=(H<<8)+q[L]}let M=F%3;if(M===0)U+=B[H>>18&63],U+=B[H>>12&63],U+=B[H>>6&63],U+=B[H&63];else if(M===2)U+=B[H>>10&63],U+=B[H>>4&63],U+=B[H<<2&63],U+=B[64];else if(M===1)U+=B[H>>2&63],U+=B[H<<4&63],U+=B[64],U+=B[64];return U}function V(q){return Object.prototype.toString.call(q)==="[object Uint8Array]"}X.exports=new W("tag:yaml.org,2002:binary",{kind:"scalar",resolve:J,construct:Y,predicate:V,represent:G})}),Q9=n((Z,X)=>{var W=W2(),Q=Object.prototype.hasOwnProperty,J=Object.prototype.toString;function Y(V){if(V===null)return!0;let q=[],U=V;for(let H=0,F=U.length;H<F;H+=1){let B=U[H],M=!1;if(J.call(B)!=="[object Object]")return!1;let L;for(L in B)if(Q.call(B,L))if(!M)M=!0;else return!1;if(!M)return!1;if(q.indexOf(L)===-1)q.push(L);else return!1}return!0}function G(V){return V!==null?V:[]}X.exports=new W("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Y,construct:G})}),G9=n((Z,X)=>{var W=W2(),Q=Object.prototype.toString;function J(G){if(G===null)return!0;let V=G,q=Array(V.length);for(let U=0,H=V.length;U<H;U+=1){let F=V[U];if(Q.call(F)!=="[object Object]")return!1;let B=Object.keys(F);if(B.length!==1)return!1;q[U]=[B[0],F[B[0]]]}return!0}function Y(G){if(G===null)return[];let V=G,q=Array(V.length);for(let U=0,H=V.length;U<H;U+=1){let F=V[U],B=Object.keys(F);q[U]=[B[0],F[B[0]]]}return q}X.exports=new W("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:J,construct:Y})}),J9=n((Z,X)=>{var W=W2(),Q=Object.prototype.hasOwnProperty;function J(G){if(G===null)return!0;let V=G;for(let q in V)if(Q.call(V,q)){if(V[q]!==null)return!1}return!0}function Y(G){return G!==null?G:{}}X.exports=new W("tag:yaml.org,2002:set",{kind:"mapping",resolve:J,construct:Y})}),v1=n((Z,X)=>{X.exports=Z9().extend({implicit:[X9(),z9()],explicit:[W9(),Q9(),G9(),J9()]})}),q4=n((Z,X)=>{var W=C0(),Q=N0(),J=Y4(),Y=v1(),G=Object.prototype.hasOwnProperty,V=1,q=2,U=3,H=4,F=1,B=2,M=3,L=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E=/[\x85\u2028\u2029]/,C=/[,\[\]{}]/,_=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function h(z){return Object.prototype.toString.call(z)}function u(z){return z===10||z===13}function f(z){return z===9||z===32}function y(z){return z===9||z===32||z===10||z===13}function b(z){return z===44||z===91||z===93||z===123||z===125}function l(z){if(z>=48&&z<=57)return z-48;let $=z|32;if($>=97&&$<=102)return $-97+10;return-1}function Q2(z){if(z===120)return 2;if(z===117)return 4;if(z===85)return 8;return 0}function B2(z){if(z>=48&&z<=57)return z-48;return-1}function d2(z){switch(z){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
28
28
  `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function K1(z){if(z<=65535)return String.fromCharCode(z);return String.fromCharCode((z-65536>>10)+55296,(z-65536&1023)+56320)}function F0(z,$,O){if($==="__proto__")Object.defineProperty(z,$,{configurable:!0,enumerable:!0,writable:!0,value:O});else z[$]=O}var P0=Array(256),B0=Array(256);for(let z=0;z<256;z++)P0[z]=d2(z)?1:0,B0[z]=d2(z);function Z2(z,$){this.input=z,this.filename=$.filename||null,this.schema=$.schema||Y,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth==="number"?$.maxDepth:100,this.maxMergeSeqLength=typeof $.maxMergeSeqLength==="number"?$.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=z.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function x0(z,$){let O={name:z.filename,buffer:z.input.slice(0,-1),position:z.position,line:z.line,column:z.position-z.lineStart};return O.snippet=J(O),new Q($,O)}function g(z,$){throw x0(z,$)}function t2(z,$){if(z.onWarning)z.onWarning.call(null,x0(z,$))}function N2(z,$,O){let T=z.anchorMapTransactions;if(T.length!==0){let A=T[T.length-1];if(!G.call(A,$))A[$]={existed:G.call(z.anchorMap,$),value:z.anchorMap[$]}}z.anchorMap[$]=O}function V1(z){z.anchorMapTransactions.push(Object.create(null))}function l2(z){let $=z.anchorMapTransactions.pop(),O=z.anchorMapTransactions;if(O.length===0)return;let T=O[O.length-1],A=Object.keys($);for(let P=0,K=A.length;P<K;P+=1){let D=A[P];if(!G.call(T,D))T[D]=$[D]}}function F1(z){let $=z.anchorMapTransactions.pop(),O=Object.keys($);for(let T=O.length-1;T>=0;T-=1){let A=$[O[T]];if(A.existed)z.anchorMap[O[T]]=A.value;else delete z.anchorMap[O[T]]}}function H0(z){return{position:z.position,line:z.line,lineStart:z.lineStart,lineIndent:z.lineIndent,firstTabInLine:z.firstTabInLine,tag:z.tag,anchor:z.anchor,kind:z.kind,result:z.result}}function e2(z,$){z.position=$.position,z.line=$.line,z.lineStart=$.lineStart,z.lineIndent=$.lineIndent,z.firstTabInLine=$.firstTabInLine,z.tag=$.tag,z.anchor=$.anchor,z.kind=$.kind,z.result=$.result}var E0={YAML:function($,O,T){if($.version!==null)g($,"duplication of %YAML directive");if(T.length!==1)g($,"YAML directive accepts exactly one argument");let A=/^([0-9]+)\.([0-9]+)$/.exec(T[0]);if(A===null)g($,"ill-formed argument of the YAML directive");let P=parseInt(A[1],10),K=parseInt(A[2],10);if(P!==1)g($,"unacceptable YAML version of the document");if($.version=T[0],$.checkLineBreaks=K<2,K!==1&&K!==2)t2($,"unsupported YAML version of the document")},TAG:function($,O,T){let A;if(T.length!==2)g($,"TAG directive accepts exactly two arguments");let P=T[0];if(A=T[1],!_.test(P))g($,"ill-formed tag handle (first argument) of the TAG directive");if(G.call($.tagMap,P))g($,'there is a previously declared suffix for "'+P+'" tag handle');if(!x.test(A))g($,"ill-formed tag prefix (second argument) of the TAG directive");try{A=decodeURIComponent(A)}catch(K){g($,"tag prefix is malformed: "+A)}$.tagMap[P]=A}};function U2(z,$,O,T){if($<O){let A=z.input.slice($,O);if(T)for(let P=0,K=A.length;P<K;P+=1){let D=A.charCodeAt(P);if(!(D===9||D>=32&&D<=1114111))g(z,"expected valid JSON character")}else if(L.test(A))g(z,"the stream contains non-printable characters");z.result+=A}}function y2(z,$,O,T){if(!W.isObject(O))g(z,"cannot merge mappings; the provided source object is unacceptable");let A=Object.keys(O);for(let P=0,K=A.length;P<K;P+=1){let D=A[P];if(!G.call($,D))F0($,D,O[D]),T[D]=!0}}function j2(z,$,O,T,A,P,K,D,j){if(Array.isArray(A)){A=Array.prototype.slice.call(A);for(let I=0,w=A.length;I<w;I+=1){if(Array.isArray(A[I]))g(z,"nested arrays are not supported inside keys");if(typeof A==="object"&&h(A[I])==="[object Object]")A[I]="[object Object]"}}if(typeof A==="object"&&h(A)==="[object Object]")A="[object Object]";if(A=String(A),$===null)$={};if(T==="tag:yaml.org,2002:merge")if(Array.isArray(P)){if(P.length>z.maxMergeSeqLength)g(z,"merge sequence length exceeded maxMergeSeqLength ("+z.maxMergeSeqLength+")");let I=new Set;for(let w=0,N=P.length;w<N;w+=1){let R=P[w];if(I.has(R))continue;I.add(R),y2(z,$,R,O)}}else y2(z,$,P,O);else{if(!z.json&&!G.call(O,A)&&G.call($,A))z.line=K||z.line,z.lineStart=D||z.lineStart,z.position=j||z.position,g(z,"duplicated mapping key");F0($,A,P),delete O[A]}return $}function Z0(z){let $=z.input.charCodeAt(z.position);if($===10)z.position++;else if($===13){if(z.position++,z.input.charCodeAt(z.position)===10)z.position++}else g(z,"a line break is expected");z.line+=1,z.lineStart=z.position,z.firstTabInLine=-1}function r(z,$,O){let T=0,A=z.input.charCodeAt(z.position);while(A!==0){while(f(A)){if(A===9&&z.firstTabInLine===-1)z.firstTabInLine=z.position;A=z.input.charCodeAt(++z.position)}if($&&A===35)do A=z.input.charCodeAt(++z.position);while(A!==10&&A!==13&&A!==0);if(u(A)){Z0(z),A=z.input.charCodeAt(z.position),T++,z.lineIndent=0;while(A===32)z.lineIndent++,A=z.input.charCodeAt(++z.position)}else break}if(O!==-1&&T!==0&&z.lineIndent<O)t2(z,"deficient indentation");return T}function X0(z){let $=z.position,O=z.input.charCodeAt($);if((O===45||O===46)&&O===z.input.charCodeAt($+1)&&O===z.input.charCodeAt($+2)){if($+=3,O=z.input.charCodeAt($),O===0||y(O))return!0}return!1}function _2(z,$){if($===1)z.result+=" ";else if($>1)z.result+=W.repeat(`
29
29
  `,$-1)}function S0(z,$,O){let T,A,P,K,D,j,I=z.kind,w=z.result,N=z.input.charCodeAt(z.position);if(y(N)||b(N)||N===35||N===38||N===42||N===33||N===124||N===62||N===39||N===34||N===37||N===64||N===96)return!1;if(N===63||N===45){let R=z.input.charCodeAt(z.position+1);if(y(R)||O&&b(R))return!1}z.kind="scalar",z.result="",T=A=z.position,P=!1;while(N!==0){if(N===58){let R=z.input.charCodeAt(z.position+1);if(y(R)||O&&b(R))break}else if(N===35){if(y(z.input.charCodeAt(z.position-1)))break}else if(z.position===z.lineStart&&X0(z)||O&&b(N))break;else if(u(N))if(K=z.line,D=z.lineStart,j=z.lineIndent,r(z,!1,-1),z.lineIndent>=$){P=!0,N=z.input.charCodeAt(z.position);continue}else{z.position=A,z.line=K,z.lineStart=D,z.lineIndent=j;break}if(P)U2(z,T,A,!1),_2(z,z.line-K),T=A=z.position,P=!1;if(!f(N))A=z.position+1;N=z.input.charCodeAt(++z.position)}if(U2(z,T,A,!1),z.result)return!0;return z.kind=I,z.result=w,!1}function k0(z,$){let O,T,A=z.input.charCodeAt(z.position);if(A!==39)return!1;z.kind="scalar",z.result="",z.position++,O=T=z.position;while((A=z.input.charCodeAt(z.position))!==0)if(A===39)if(U2(z,O,z.position,!0),A=z.input.charCodeAt(++z.position),A===39)O=z.position,z.position++,T=z.position;else return!0;else if(u(A))U2(z,O,T,!0),_2(z,r(z,!1,$)),O=T=z.position;else if(z.position===z.lineStart&&X0(z))g(z,"unexpected end of the document within a single quoted scalar");else if(z.position++,!f(A))T=z.position;g(z,"unexpected end of the stream within a single quoted scalar")}function M0(z,$){let O,T,A,P=z.input.charCodeAt(z.position);if(P!==34)return!1;z.kind="scalar",z.result="",z.position++,O=T=z.position;while((P=z.input.charCodeAt(z.position))!==0)if(P===34)return U2(z,O,z.position,!0),z.position++,!0;else if(P===92){if(U2(z,O,z.position,!0),P=z.input.charCodeAt(++z.position),u(P))r(z,!1,$);else if(P<256&&P0[P])z.result+=B0[P],z.position++;else if((A=Q2(P))>0){let K=A,D=0;for(;K>0;K--)if(P=z.input.charCodeAt(++z.position),(A=l(P))>=0)D=(D<<4)+A;else g(z,"expected hexadecimal character");z.result+=K1(D),z.position++}else g(z,"unknown escape sequence");O=T=z.position}else if(u(P))U2(z,O,T,!0),_2(z,r(z,!1,$)),O=T=z.position;else if(z.position===z.lineStart&&X0(z))g(z,"unexpected end of the document within a double quoted scalar");else if(z.position++,!f(P))T=z.position;g(z,"unexpected end of the stream within a double quoted scalar")}function b0(z,$){let O=!0,T,A,P,K=z.tag,D,j=z.anchor,I,w,N,R,k=Object.create(null),S,v,m,c=z.input.charCodeAt(z.position);if(c===91)I=93,R=!1,D=[];else if(c===123)I=125,R=!0,D={};else return!1;if(z.anchor!==null)N2(z,z.anchor,D);c=z.input.charCodeAt(++z.position);while(c!==0){if(r(z,!0,$),c=z.input.charCodeAt(z.position),c===I)return z.position++,z.tag=K,z.anchor=j,z.kind=R?"mapping":"sequence",z.result=D,!0;else if(!O)g(z,"missed comma between flow collection entries");else if(c===44)g(z,"expected the node content, but found ','");if(v=S=m=null,w=N=!1,c===63){if(y(z.input.charCodeAt(z.position+1)))w=N=!0,z.position++,r(z,!0,$)}if(T=z.line,A=z.lineStart,P=z.position,x2(z,$,V,!1,!0),v=z.tag,S=z.result,r(z,!0,$),c=z.input.charCodeAt(z.position),(N||z.line===T)&&c===58)w=!0,c=z.input.charCodeAt(++z.position),r(z,!0,$),x2(z,$,V,!1,!0),m=z.result;if(R)j2(z,D,k,v,S,m,T,A,P);else if(w)D.push(j2(z,null,k,v,S,m,T,A,P));else D.push(S);if(r(z,!0,$),c=z.input.charCodeAt(z.position),c===44)O=!0,c=z.input.charCodeAt(++z.position);else O=!1}g(z,"unexpected end of the stream within a flow collection")}function g0(z,$){let O,T=F,A=!1,P=!1,K=$,D=0,j=!1,I,w=z.input.charCodeAt(z.position);if(w===124)O=!1;else if(w===62)O=!0;else return!1;z.kind="scalar",z.result="";while(w!==0)if(w=z.input.charCodeAt(++z.position),w===43||w===45)if(F===T)T=w===43?M:B;else g(z,"repeat of a chomping mode identifier");else if((I=B2(w))>=0)if(I===0)g(z,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!P)K=$+I-1,P=!0;else g(z,"repeat of an indentation width identifier");else break;if(f(w)){do w=z.input.charCodeAt(++z.position);while(f(w));if(w===35)do w=z.input.charCodeAt(++z.position);while(!u(w)&&w!==0)}while(w!==0){Z0(z),z.lineIndent=0,w=z.input.charCodeAt(z.position);while((!P||z.lineIndent<K)&&w===32)z.lineIndent++,w=z.input.charCodeAt(++z.position);if(!P&&z.lineIndent>K)K=z.lineIndent;if(u(w)){D++;continue}if(!P&&K===0)g(z,"missing indentation for block scalar");if(z.lineIndent<K){if(T===M)z.result+=W.repeat(`
30
30
  `,A?1+D:D);else if(T===F){if(A)z.result+=`
@@ -33,7 +33,7 @@ Parsed value is empty`);else return G}catch(G){if(!G&&X.continueOnError)throw ne
33
33
  `,D+1);else if(D===0){if(A)z.result+=" "}else z.result+=W.repeat(`
34
34
  `,D);else z.result+=W.repeat(`
35
35
  `,A?1+D:D);A=!0,P=!0,D=0;let N=z.position;while(!u(w)&&w!==0)w=z.input.charCodeAt(++z.position);U2(z,N,z.position,!1)}return!0}function P2(z,$){let{tag:O,anchor:T}=z,A=[],P=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)N2(z,z.anchor,A);let K=z.input.charCodeAt(z.position);while(K!==0){if(z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");if(K!==45)break;if(!y(z.input.charCodeAt(z.position+1)))break;if(P=!0,z.position++,r(z,!0,-1)){if(z.lineIndent<=$){A.push(null),K=z.input.charCodeAt(z.position);continue}}let D=z.line;if(x2(z,$,U,!1,!0),A.push(z.result),r(z,!0,-1),K=z.input.charCodeAt(z.position),(z.line===D||z.lineIndent>$)&&K!==0)g(z,"bad indentation of a sequence entry");else if(z.lineIndent<$)break}if(P)return z.tag=O,z.anchor=T,z.kind="sequence",z.result=A,!0;return!1}function v0(z,$,O){let T,A,P,K,D=z.tag,j=z.anchor,I={},w=Object.create(null),N=null,R=null,k=null,S=!1,v=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)N2(z,z.anchor,I);let m=z.input.charCodeAt(z.position);while(m!==0){if(!S&&z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");let c=z.input.charCodeAt(z.position+1),o=z.line;if((m===63||m===58)&&y(c)){if(m===63){if(S)j2(z,I,w,N,R,null,A,P,K),N=R=k=null;v=!0,S=!0,T=!0}else if(S)S=!1,T=!0;else g(z,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");z.position+=1,m=c}else{if(A=z.line,P=z.lineStart,K=z.position,!x2(z,O,q,!1,!0))break;if(z.line===o){m=z.input.charCodeAt(z.position);while(f(m))m=z.input.charCodeAt(++z.position);if(m===58){if(m=z.input.charCodeAt(++z.position),!y(m))g(z,"a whitespace character is expected after the key-value separator within a block mapping");if(S)j2(z,I,w,N,R,null,A,P,K),N=R=k=null;v=!0,S=!1,T=!1,N=z.tag,R=z.result}else if(v)g(z,"can not read an implicit mapping pair; a colon is missed");else return z.tag=D,z.anchor=j,!0}else if(v)g(z,"can not read a block mapping entry; a multiline key may not be an implicit key");else return z.tag=D,z.anchor=j,!0}if(z.line===o||z.lineIndent>$){if(S)A=z.line,P=z.lineStart,K=z.position;if(x2(z,$,H,!0,T))if(S)R=z.result;else k=z.result;if(!S)j2(z,I,w,N,R,k,A,P,K),N=R=k=null;r(z,!0,-1),m=z.input.charCodeAt(z.position)}if((z.line===o||z.lineIndent>$)&&m!==0)g(z,"bad indentation of a mapping entry");else if(z.lineIndent<$)break}if(S)j2(z,I,w,N,R,null,A,P,K);if(v)z.tag=D,z.anchor=j,z.kind="mapping",z.result=I;return v}function B1(z){let $=!1,O=!1,T,A,P=z.input.charCodeAt(z.position);if(P!==33)return!1;if(z.tag!==null)g(z,"duplication of a tag property");if(P=z.input.charCodeAt(++z.position),P===60)$=!0,P=z.input.charCodeAt(++z.position);else if(P===33)O=!0,T="!!",P=z.input.charCodeAt(++z.position);else T="!";let K=z.position;if($){do P=z.input.charCodeAt(++z.position);while(P!==0&&P!==62);if(z.position<z.length)A=z.input.slice(K,z.position),P=z.input.charCodeAt(++z.position);else g(z,"unexpected end of the stream within a verbatim tag")}else{while(P!==0&&!y(P)){if(P===33)if(!O){if(T=z.input.slice(K-1,z.position+1),!_.test(T))g(z,"named tag handle cannot contain such characters");O=!0,K=z.position+1}else g(z,"tag suffix cannot contain exclamation marks");P=z.input.charCodeAt(++z.position)}if(A=z.input.slice(K,z.position),C.test(A))g(z,"tag suffix cannot contain flow indicator characters")}if(A&&!x.test(A))g(z,"tag name cannot contain such characters: "+A);try{A=decodeURIComponent(A)}catch(D){g(z,"tag name is malformed: "+A)}if($)z.tag=A;else if(G.call(z.tagMap,T))z.tag=z.tagMap[T]+A;else if(T==="!")z.tag="!"+A;else if(T==="!!")z.tag="tag:yaml.org,2002:"+A;else g(z,'undeclared tag handle "'+T+'"');return!0}function y0(z){let $=z.input.charCodeAt(z.position);if($!==38)return!1;if(z.anchor!==null)g(z,"duplication of an anchor property");$=z.input.charCodeAt(++z.position);let O=z.position;while($!==0&&!y($)&&!b($))$=z.input.charCodeAt(++z.position);if(z.position===O)g(z,"name of an anchor node must contain at least one character");return z.anchor=z.input.slice(O,z.position),!0}function h0(z){let $=z.input.charCodeAt(z.position);if($!==42)return!1;$=z.input.charCodeAt(++z.position);let O=z.position;while($!==0&&!y($)&&!b($))$=z.input.charCodeAt(++z.position);if(z.position===O)g(z,"name of an alias node must contain at least one character");let T=z.input.slice(O,z.position);if(!G.call(z.anchorMap,T))g(z,'unidentified alias "'+T+'"');return z.result=z.anchorMap[T],r(z,!0,-1),!0}function H1(z,$,O,T){let A=H0(z);if(V1(z),e2(z,$),z.tag=null,z.anchor=null,z.kind=null,z.result=null,v0(z,O,T)&&z.kind==="mapping")return l2(z),!0;return F1(z),e2(z,A),!1}function x2(z,$,O,T,A){let P,K,D=1,j=!1,I=!1,w=null,N,R,k;if(z.depth>=z.maxDepth)g(z,"nesting exceeded maxDepth ("+z.maxDepth+")");if(z.depth+=1,z.listener!==null)z.listener("open",z);z.tag=null,z.anchor=null,z.kind=null,z.result=null;let S=P=K=H===O||U===O;if(T){if(r(z,!0,-1)){if(j=!0,z.lineIndent>$)D=1;else if(z.lineIndent===$)D=0;else if(z.lineIndent<$)D=-1}}if(D===1)while(!0){let v=z.input.charCodeAt(z.position),m=H0(z);if(j&&(v===33&&z.tag!==null||v===38&&z.anchor!==null))break;if(!B1(z)&&!y0(z))break;if(w===null)w=m;if(r(z,!0,-1)){if(j=!0,K=S,z.lineIndent>$)D=1;else if(z.lineIndent===$)D=0;else if(z.lineIndent<$)D=-1}else K=!1}if(K)K=j||A;if(D===1||H===O){if(V===O||q===O)R=$;else R=$+1;if(k=z.position-z.lineStart,D===1)if(K&&(P2(z,k)||v0(z,k,R))||b0(z,R))I=!0;else{let v=z.input.charCodeAt(z.position);if(w!==null&&S&&!K&&v!==124&&v!==62&&H1(z,w,w.position-w.lineStart,R))I=!0;else if(P&&g0(z,R)||k0(z,R)||M0(z,R))I=!0;else if(h0(z)){if(I=!0,z.tag!==null||z.anchor!==null)g(z,"alias node should not have any properties")}else if(S0(z,R,V===O)){if(I=!0,z.tag===null)z.tag="?"}if(z.anchor!==null)N2(z,z.anchor,z.result)}else if(D===0)I=K&&P2(z,k)}if(z.tag===null){if(z.anchor!==null)N2(z,z.anchor,z.result)}else if(z.tag==="?"){if(z.result!==null&&z.kind!=="scalar")g(z,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+z.kind+'"');for(let v=0,m=z.implicitTypes.length;v<m;v+=1)if(N=z.implicitTypes[v],N.resolve(z.result)){if(z.result=N.construct(z.result),z.tag=N.tag,z.anchor!==null)N2(z,z.anchor,z.result);break}}else if(z.tag!=="!"){if(G.call(z.typeMap[z.kind||"fallback"],z.tag))N=z.typeMap[z.kind||"fallback"][z.tag];else{N=null;let v=z.typeMap.multi[z.kind||"fallback"];for(let m=0,c=v.length;m<c;m+=1)if(z.tag.slice(0,v[m].tag.length)===v[m].tag){N=v[m];break}}if(!N)g(z,"unknown tag !<"+z.tag+">");if(z.result!==null&&N.kind!==z.kind)g(z,"unacceptable node kind for !<"+z.tag+'> tag; it should be "'+N.kind+'", not "'+z.kind+'"');if(!N.resolve(z.result,z.tag))g(z,"cannot resolve a node with !<"+z.tag+"> explicit tag");else if(z.result=N.construct(z.result,z.tag),z.anchor!==null)N2(z,z.anchor,z.result)}if(z.listener!==null)z.listener("close",z);return z.depth-=1,z.tag!==null||z.anchor!==null||I}function M1(z){let $=z.position,O=!1,T;z.version=null,z.checkLineBreaks=z.legacy,z.tagMap=Object.create(null),z.anchorMap=Object.create(null);while((T=z.input.charCodeAt(z.position))!==0){if(r(z,!0,-1),T=z.input.charCodeAt(z.position),z.lineIndent>0||T!==37)break;O=!0,T=z.input.charCodeAt(++z.position);let A=z.position;while(T!==0&&!y(T))T=z.input.charCodeAt(++z.position);let P=z.input.slice(A,z.position),K=[];if(P.length<1)g(z,"directive name must not be less than one character in length");while(T!==0){while(f(T))T=z.input.charCodeAt(++z.position);if(T===35){do T=z.input.charCodeAt(++z.position);while(T!==0&&!u(T));break}if(u(T))break;A=z.position;while(T!==0&&!y(T))T=z.input.charCodeAt(++z.position);K.push(z.input.slice(A,z.position))}if(T!==0)Z0(z);if(G.call(E0,P))E0[P](z,P,K);else t2(z,'unknown document directive "'+P+'"')}if(r(z,!0,-1),z.lineIndent===0&&z.input.charCodeAt(z.position)===45&&z.input.charCodeAt(z.position+1)===45&&z.input.charCodeAt(z.position+2)===45)z.position+=3,r(z,!0,-1);else if(O)g(z,"directives end mark is expected");if(x2(z,z.lineIndent-1,H,!1,!0),r(z,!0,-1),z.checkLineBreaks&&E.test(z.input.slice($,z.position)))t2(z,"non-ASCII line breaks are interpreted as content");if(z.documents.push(z.result),z.position===z.lineStart&&X0(z)){if(z.input.charCodeAt(z.position)===46)z.position+=3,r(z,!0,-1);return}if(z.position<z.length-1)g(z,"end of the stream or a document separator is expected")}function m0(z,$){if(z=String(z),$=$||{},z.length!==0){if(z.charCodeAt(z.length-1)!==10&&z.charCodeAt(z.length-1)!==13)z+=`
36
- `;if(z.charCodeAt(0)===65279)z=z.slice(1)}let O=new Z2(z,$),T=z.indexOf("\x00");if(T!==-1)O.position=T,g(O,"null byte is not allowed in input");O.input+="\x00";while(O.input.charCodeAt(O.position)===32)O.lineIndent+=1,O.position+=1;while(O.position<O.length-1)M1(O);return O.documents}function u0(z,$,O){if($!==null&&typeof $==="object"&&typeof O>"u")O=$,$=null;let T=m0(z,O);if(typeof $!=="function")return T;for(let A=0,P=T.length;A<P;A+=1)$(T[A])}function $1(z,$){let O=m0(z,$);if(O.length===0)return;else if(O.length===1)return O[0];throw new Q("expected a single document in the stream, but found more")}X.exports.loadAll=u0,X.exports.load=$1}),G4=n((Z,X)=>{var W=C0(),Q=N0(),J=v1(),Y=Object.prototype.toString,G=Object.prototype.hasOwnProperty,V=65279,q=9,U=10,H=13,F=32,B=33,M=34,L=35,E=37,C=38,_=39,x=42,h=44,u=45,f=58,y=61,b=62,l=63,Q2=64,B2=91,d2=93,K1=96,F0=123,P0=124,B0=125,Z2={};Z2[0]="\\0",Z2[7]="\\a",Z2[8]="\\b",Z2[9]="\\t",Z2[10]="\\n",Z2[11]="\\v",Z2[12]="\\f",Z2[13]="\\r",Z2[27]="\\e",Z2[34]="\\\"",Z2[92]="\\\\",Z2[133]="\\N",Z2[160]="\\_",Z2[8232]="\\L",Z2[8233]="\\P";var x0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],g=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function t2(K,D){if(D===null)return{};let j={},I=Object.keys(D);for(let w=0,N=I.length;w<N;w+=1){let R=I[w],k=String(D[R]);if(R.slice(0,2)==="!!")R="tag:yaml.org,2002:"+R.slice(2);let S=K.compiledTypeMap.fallback[R];if(S&&G.call(S.styleAliases,k))k=S.styleAliases[k];j[R]=k}return j}function N2(K){let D,j,I=K.toString(16).toUpperCase();if(K<=255)D="x",j=2;else if(K<=65535)D="u",j=4;else if(K<=4294967295)D="U",j=8;else throw new Q("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+D+W.repeat("0",j-I.length)+I}var V1=1,l2=2;function F1(K){this.schema=K.schema||J,this.indent=Math.max(1,K.indent||2),this.noArrayIndent=K.noArrayIndent||!1,this.skipInvalid=K.skipInvalid||!1,this.flowLevel=W.isNothing(K.flowLevel)?-1:K.flowLevel,this.styleMap=t2(this.schema,K.styles||null),this.sortKeys=K.sortKeys||!1,this.lineWidth=K.lineWidth||80,this.noRefs=K.noRefs||!1,this.noCompatMode=K.noCompatMode||!1,this.condenseFlow=K.condenseFlow||!1,this.quotingType=K.quotingType==='"'?l2:V1,this.forceQuotes=K.forceQuotes||!1,this.replacer=typeof K.replacer==="function"?K.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function H0(K,D){let j=W.repeat(" ",D),I=0,w="",N=K.length;while(I<N){let R,k=K.indexOf(`
36
+ `;if(z.charCodeAt(0)===65279)z=z.slice(1)}let O=new Z2(z,$),T=z.indexOf("\x00");if(T!==-1)O.position=T,g(O,"null byte is not allowed in input");O.input+="\x00";while(O.input.charCodeAt(O.position)===32)O.lineIndent+=1,O.position+=1;while(O.position<O.length-1)M1(O);return O.documents}function u0(z,$,O){if($!==null&&typeof $==="object"&&typeof O>"u")O=$,$=null;let T=m0(z,O);if(typeof $!=="function")return T;for(let A=0,P=T.length;A<P;A+=1)$(T[A])}function $1(z,$){let O=m0(z,$);if(O.length===0)return;else if(O.length===1)return O[0];throw new Q("expected a single document in the stream, but found more")}X.exports.loadAll=u0,X.exports.load=$1}),U4=n((Z,X)=>{var W=C0(),Q=N0(),J=v1(),Y=Object.prototype.toString,G=Object.prototype.hasOwnProperty,V=65279,q=9,U=10,H=13,F=32,B=33,M=34,L=35,E=37,C=38,_=39,x=42,h=44,u=45,f=58,y=61,b=62,l=63,Q2=64,B2=91,d2=93,K1=96,F0=123,P0=124,B0=125,Z2={};Z2[0]="\\0",Z2[7]="\\a",Z2[8]="\\b",Z2[9]="\\t",Z2[10]="\\n",Z2[11]="\\v",Z2[12]="\\f",Z2[13]="\\r",Z2[27]="\\e",Z2[34]="\\\"",Z2[92]="\\\\",Z2[133]="\\N",Z2[160]="\\_",Z2[8232]="\\L",Z2[8233]="\\P";var x0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],g=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function t2(K,D){if(D===null)return{};let j={},I=Object.keys(D);for(let w=0,N=I.length;w<N;w+=1){let R=I[w],k=String(D[R]);if(R.slice(0,2)==="!!")R="tag:yaml.org,2002:"+R.slice(2);let S=K.compiledTypeMap.fallback[R];if(S&&G.call(S.styleAliases,k))k=S.styleAliases[k];j[R]=k}return j}function N2(K){let D,j,I=K.toString(16).toUpperCase();if(K<=255)D="x",j=2;else if(K<=65535)D="u",j=4;else if(K<=4294967295)D="U",j=8;else throw new Q("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+D+W.repeat("0",j-I.length)+I}var V1=1,l2=2;function F1(K){this.schema=K.schema||J,this.indent=Math.max(1,K.indent||2),this.noArrayIndent=K.noArrayIndent||!1,this.skipInvalid=K.skipInvalid||!1,this.flowLevel=W.isNothing(K.flowLevel)?-1:K.flowLevel,this.styleMap=t2(this.schema,K.styles||null),this.sortKeys=K.sortKeys||!1,this.lineWidth=K.lineWidth||80,this.noRefs=K.noRefs||!1,this.noCompatMode=K.noCompatMode||!1,this.condenseFlow=K.condenseFlow||!1,this.quotingType=K.quotingType==='"'?l2:V1,this.forceQuotes=K.forceQuotes||!1,this.replacer=typeof K.replacer==="function"?K.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function H0(K,D){let j=W.repeat(" ",D),I=0,w="",N=K.length;while(I<N){let R,k=K.indexOf(`
37
37
  `,I);if(k===-1)R=K.slice(I),I=N;else R=K.slice(I,k+1),I=k+1;if(R.length&&R!==`
38
38
  `)w+=j;w+=R}return w}function e2(K,D){return`
39
39
  `+W.repeat(" ",K.indent*D)}function E0(K,D){for(let j=0,I=K.implicitTypes.length;j<I;j+=1)if(K.implicitTypes[j].resolve(D))return!0;return!1}function U2(K){return K===F||K===q}function y2(K){return K>=32&&K<=126||K>=161&&K<=55295&&K!==8232&&K!==8233||K>=57344&&K<=65533&&K!==V||K>=65536&&K<=1114111}function j2(K){return y2(K)&&K!==V&&K!==H&&K!==U}function Z0(K,D,j){let I=j2(K),w=I&&!U2(K);return(j?I:I&&K!==h&&K!==B2&&K!==d2&&K!==F0&&K!==B0)&&K!==L&&!(D===f&&!w)||j2(D)&&!U2(D)&&K===L||D===f&&w}function r(K){return y2(K)&&K!==V&&!U2(K)&&K!==u&&K!==l&&K!==f&&K!==h&&K!==B2&&K!==d2&&K!==F0&&K!==B0&&K!==L&&K!==C&&K!==x&&K!==B&&K!==P0&&K!==y&&K!==b&&K!==_&&K!==M&&K!==E&&K!==Q2&&K!==K1}function X0(K){return!U2(K)&&K!==f}function _2(K,D){let j=K.charCodeAt(D),I;if(j>=55296&&j<=56319&&D+1<K.length){if(I=K.charCodeAt(D+1),I>=56320&&I<=57343)return(j-55296)*1024+I-56320+65536}return j}function S0(K){return/^\n* /.test(K)}var k0=1,M0=2,b0=3,g0=4,P2=5;function v0(K,D,j,I,w,N,R,k){let S,v=0,m=null,c=!1,o=!1,q8=I!==-1,$0=-1,D0=r(_2(K,0))&&X0(_2(K,K.length-1));if(D||R)for(S=0;S<K.length;v>=65536?S+=2:S++){if(v=_2(K,S),!y2(v))return P2;D0=D0&&Z0(v,m,k),m=v}else{for(S=0;S<K.length;v>=65536?S+=2:S++){if(v=_2(K,S),v===U){if(c=!0,q8)o=o||S-$0-1>I&&K[$0+1]!==" ",$0=S}else if(!y2(v))return P2;D0=D0&&Z0(v,m,k),m=v}o=o||q8&&S-$0-1>I&&K[$0+1]!==" "}if(!c&&!o){if(D0&&!R&&!w(K))return k0;return N===l2?P2:M0}if(j>9&&S0(K))return P2;if(!R)return o?g0:b0;return N===l2?P2:M0}function B1(K,D,j,I,w){K.dump=function(){if(D.length===0)return K.quotingType===l2?'""':"''";if(!K.noCompatMode){if(x0.indexOf(D)!==-1||g.test(D))return K.quotingType===l2?'"'+D+'"':"'"+D+"'"}let N=K.indent*Math.max(1,j),R=K.lineWidth===-1?-1:Math.max(Math.min(K.lineWidth,40),K.lineWidth-N),k=I||K.flowLevel>-1&&j>=K.flowLevel;function S(v){return E0(K,v)}switch(v0(D,k,K.indent,R,S,K.quotingType,K.forceQuotes&&!I,w)){case k0:return D;case M0:return"'"+D.replace(/'/g,"''")+"'";case b0:return"|"+y0(D,K.indent)+h0(H0(D,N));case g0:return">"+y0(D,K.indent)+h0(H0(H1(D,R),N));case P2:return'"'+M1(D,R)+'"';default:throw new Q("impossible error: invalid scalar style")}}()}function y0(K,D){let j=S0(K)?String(D):"",I=K[K.length-1]===`
@@ -48,10 +48,10 @@ Parsed value is empty`);else return G}catch(G){if(!G&&X.continueOnError)throw ne
48
48
  `+K.slice(w,N),w=N+1;R=k}if(S+=`
49
49
  `,K.length-w>D&&R>w)S+=K.slice(w,R)+`
50
50
  `+K.slice(R+1);else S+=K.slice(w);return S.slice(1)}function M1(K){let D="",j=0;for(let I=0;I<K.length;j>=65536?I+=2:I++){j=_2(K,I);let w=Z2[j];if(!w&&y2(j)){if(D+=K[I],j>=65536)D+=K[I+1]}else D+=w||N2(j)}return D}function m0(K,D,j){let I="",w=K.tag;for(let N=0,R=j.length;N<R;N+=1){let k=j[N];if(K.replacer)k=K.replacer.call(j,String(N),k);if(O(K,D,k,!1,!1)||typeof k>"u"&&O(K,D,null,!1,!1)){if(I!=="")I+=","+(!K.condenseFlow?" ":"");I+=K.dump}}K.tag=w,K.dump="["+I+"]"}function u0(K,D,j,I){let w="",N=K.tag;for(let R=0,k=j.length;R<k;R+=1){let S=j[R];if(K.replacer)S=K.replacer.call(j,String(R),S);if(O(K,D+1,S,!0,!0,!1,!0)||typeof S>"u"&&O(K,D+1,null,!0,!0,!1,!0)){if(!I||w!=="")w+=e2(K,D);if(K.dump&&U===K.dump.charCodeAt(0))w+="-";else w+="- ";w+=K.dump}}K.tag=N,K.dump=w||"[]"}function $1(K,D,j){let I="",w=K.tag,N=Object.keys(j);for(let R=0,k=N.length;R<k;R+=1){let S="";if(I!=="")S+=", ";if(K.condenseFlow)S+='"';let v=N[R],m=j[v];if(K.replacer)m=K.replacer.call(j,v,m);if(!O(K,D,v,!1,!1))continue;if(K.dump.length>1024)S+="? ";if(S+=K.dump+(K.condenseFlow?'"':"")+":"+(K.condenseFlow?"":" "),!O(K,D,m,!1,!1))continue;S+=K.dump,I+=S}K.tag=w,K.dump="{"+I+"}"}function z(K,D,j,I){let w="",N=K.tag,R=Object.keys(j);if(K.sortKeys===!0)R.sort();else if(typeof K.sortKeys==="function")R.sort(K.sortKeys);else if(K.sortKeys)throw new Q("sortKeys must be a boolean or a function");for(let k=0,S=R.length;k<S;k+=1){let v="";if(!I||w!=="")v+=e2(K,D);let m=R[k],c=j[m];if(K.replacer)c=K.replacer.call(j,m,c);if(!O(K,D+1,m,!0,!0,!0))continue;let o=K.tag!==null&&K.tag!=="?"||K.dump&&K.dump.length>1024;if(o)if(K.dump&&U===K.dump.charCodeAt(0))v+="?";else v+="? ";if(v+=K.dump,o)v+=e2(K,D);if(!O(K,D+1,c,!0,o))continue;if(K.dump&&U===K.dump.charCodeAt(0))v+=":";else v+=": ";v+=K.dump,w+=v}K.tag=N,K.dump=w||"{}"}function $(K,D,j){let I=j?K.explicitTypes:K.implicitTypes;for(let w=0,N=I.length;w<N;w+=1){let R=I[w];if((R.instanceOf||R.predicate)&&(!R.instanceOf||typeof D==="object"&&D instanceof R.instanceOf)&&(!R.predicate||R.predicate(D))){if(j)if(R.multi&&R.representName)K.tag=R.representName(D);else K.tag=R.tag;else K.tag="?";if(R.represent){let k=K.styleMap[R.tag]||R.defaultStyle,S;if(Y.call(R.represent)==="[object Function]")S=R.represent(D,k);else if(G.call(R.represent,k))S=R.represent[k](D,k);else throw new Q("!<"+R.tag+'> tag resolver accepts not "'+k+'" style');K.dump=S}return!0}}return!1}function O(K,D,j,I,w,N,R){if(K.tag=null,K.dump=j,!$(K,j,!1))$(K,j,!0);let k=Y.call(K.dump),S=I;if(I)I=K.flowLevel<0||K.flowLevel>D;let v=k==="[object Object]"||k==="[object Array]",m,c;if(v)m=K.duplicates.indexOf(j),c=m!==-1;if(K.tag!==null&&K.tag!=="?"||c||K.indent!==2&&D>0)w=!1;if(c&&K.usedDuplicates[m])K.dump="*ref_"+m;else{if(v&&c&&!K.usedDuplicates[m])K.usedDuplicates[m]=!0;if(k==="[object Object]"){if(I&&Object.keys(K.dump).length!==0){if(z(K,D,K.dump,w),c)K.dump="&ref_"+m+K.dump}else if($1(K,D,K.dump),c)K.dump="&ref_"+m+" "+K.dump}else if(k==="[object Array]"){if(I&&K.dump.length!==0){if(K.noArrayIndent&&!R&&D>0)u0(K,D-1,K.dump,w);else u0(K,D,K.dump,w);if(c)K.dump="&ref_"+m+K.dump}else if(m0(K,D,K.dump),c)K.dump="&ref_"+m+" "+K.dump}else if(k==="[object String]"){if(K.tag!=="?")B1(K,K.dump,D,N,S)}else if(k==="[object Undefined]")return!1;else{if(K.skipInvalid)return!1;throw new Q("unacceptable kind of an object to dump "+k)}if(K.tag!==null&&K.tag!=="?"){let o=encodeURI(K.tag[0]==="!"?K.tag.slice(1):K.tag).replace(/!/g,"%21");if(K.tag[0]==="!")o="!"+o;else if(o.slice(0,18)==="tag:yaml.org,2002:")o="!!"+o.slice(18);else o="!<"+o+">";K.dump=o+" "+K.dump}}return!0}function T(K,D){let j=[],I=[];A(K,j,I);let w=I.length;for(let N=0;N<w;N+=1)D.duplicates.push(j[I[N]]);D.usedDuplicates=Array(w)}function A(K,D,j){if(K!==null&&typeof K==="object"){let I=D.indexOf(K);if(I!==-1){if(j.indexOf(I)===-1)j.push(I)}else if(D.push(K),Array.isArray(K))for(let w=0,N=K.length;w<N;w+=1)A(K[w],D,j);else{let w=Object.keys(K);for(let N=0,R=w.length;N<R;N+=1)A(K[w[N]],D,j)}}}function P(K,D){D=D||{};let j=new F1(D);if(!j.noRefs)T(K,j);let I=K;if(j.replacer)I=j.replacer.call({"":I},"",I);if(O(j,0,I,!0,!0))return j.dump+`
51
- `;return""}X.exports.dump=P}),Y9=z4(n((Z,X)=>{var W=Q4(),Q=G4();function J(Y,G){return function(){throw Error("Function yaml."+Y+" is removed in js-yaml 4. Use yaml."+G+" instead, which is now safe by default.")}}X.exports.Type=W2(),X.exports.Schema=d8(),X.exports.FAILSAFE_SCHEMA=o8(),X.exports.JSON_SCHEMA=e8(),X.exports.CORE_SCHEMA=Z9(),X.exports.DEFAULT_SCHEMA=v1(),X.exports.load=W.load,X.exports.loadAll=W.loadAll,X.exports.dump=Q.dump,X.exports.YAMLException=N0(),X.exports.types={binary:W9(),float:t8(),map:n8(),null:r8(),pairs:G9(),set:J9(),timestamp:X9(),bool:s8(),int:a8(),merge:z9(),omap:Q9(),seq:i8(),str:l8()},X.exports.safeLoad=J("safeLoad","load"),X.exports.safeLoadAll=J("safeLoadAll","loadAll"),X.exports.safeDump=J("safeDump","dump")})(),1),{Type:h6,Schema:m6,FAILSAFE_SCHEMA:u6,JSON_SCHEMA:q9,CORE_SCHEMA:f6,DEFAULT_SCHEMA:c6,load:p6,loadAll:d6,dump:l6,YAMLException:i6,types:n6,safeLoad:o6,safeLoadAll:r6,safeDump:s6}=Y9.default,y1=Y9.default});var U9;var K9=p(()=>{D2();h1();h1();U9={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")try{return y1.load(X,{schema:q9})}catch{try{return y1.load(X)}catch(W){throw new $2(W?.message||"Parser Error",Z.url)}}else return X}}});var J4,V9;var F9=p(()=>{D2();J4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i,V9={order:300,allowEmpty:!0,encoding:"utf8",canParse(Z){return(typeof Z.data==="string"||Buffer.isBuffer(Z.data))&&J4.test(Z.url)},parse(Z){if(typeof Z.data==="string")return Z.data;else if(Buffer.isBuffer(Z.data))return Z.data.toString(this.encoding);else throw new $2("data is not text",Z.url)}}});var Y4,B9;var H9=p(()=>{Y4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i,B9={order:400,allowEmpty:!0,canParse(Z){return Buffer.isBuffer(Z.data)&&Y4.test(Z.url)},parse(Z){if(Buffer.isBuffer(Z.data))return Z.data;else return Buffer.from(Z.data)}}});var m1;var u1=p(()=>{Y2();D2();m1={order:100,canRead(Z){return r0(Z.url)},async read(Z){let X,W=await import("fs");try{X=q0(Z.url)}catch(Q){let J=Q;throw J.message=`Malformed URI: ${Z.url}: ${J.message}`,new w2(J,Z.url)}if(X.endsWith("/")||X.endsWith("\\"))X=X.slice(0,-1);try{return await W.promises.readFile(X)}catch(Q){let J=Q;throw J.message=`Error opening file ${X}: ${J.message}`,new w2(J,X)}}}});async function M9(Z,X,W){Z=Y0(Z);let Q=W||[];Q.push(Z.href);try{if(X.safeUrlResolver&&o0(Z.href))throw Error(`Unsafe URL blocked by safeUrlResolver: ${Z.href}`);let J=await q4(Z,X);if(J.status>=400){let Y=Error(`HTTP ERROR ${J.status}`);throw Y.status=J.status,Y}else if(J.status>=300)if(!Number.isNaN(X.redirects)&&Q.length>X.redirects){let Y=Error(`Error downloading ${Q[0]}.
51
+ `;return""}X.exports.dump=P}),Y9=J4(n((Z,X)=>{var W=q4(),Q=U4();function J(Y,G){return function(){throw Error("Function yaml."+Y+" is removed in js-yaml 4. Use yaml."+G+" instead, which is now safe by default.")}}X.exports.Type=W2(),X.exports.Schema=d8(),X.exports.FAILSAFE_SCHEMA=o8(),X.exports.JSON_SCHEMA=e8(),X.exports.CORE_SCHEMA=Z9(),X.exports.DEFAULT_SCHEMA=v1(),X.exports.load=W.load,X.exports.loadAll=W.loadAll,X.exports.dump=Q.dump,X.exports.YAMLException=N0(),X.exports.types={binary:W9(),float:t8(),map:n8(),null:r8(),pairs:G9(),set:J9(),timestamp:X9(),bool:s8(),int:a8(),merge:z9(),omap:Q9(),seq:i8(),str:l8()},X.exports.safeLoad=J("safeLoad","load"),X.exports.safeLoadAll=J("safeLoadAll","loadAll"),X.exports.safeDump=J("safeDump","dump")})(),1),{Type:c6,Schema:p6,FAILSAFE_SCHEMA:d6,JSON_SCHEMA:q9,CORE_SCHEMA:l6,DEFAULT_SCHEMA:i6,load:n6,loadAll:o6,dump:r6,YAMLException:s6,types:a6,safeLoad:t6,safeLoadAll:e6,safeDump:ZZ}=Y9.default,y1=Y9.default});var U9;var K9=p(()=>{D2();h1();h1();U9={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")try{return y1.load(X,{schema:q9})}catch{try{return y1.load(X)}catch(W){throw new $2(W?.message||"Parser Error",Z.url)}}else return X}}});var K4,V9;var F9=p(()=>{D2();K4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i,V9={order:300,allowEmpty:!0,encoding:"utf8",canParse(Z){return(typeof Z.data==="string"||Buffer.isBuffer(Z.data))&&K4.test(Z.url)},parse(Z){if(typeof Z.data==="string")return Z.data;else if(Buffer.isBuffer(Z.data))return Z.data.toString(this.encoding);else throw new $2("data is not text",Z.url)}}});var V4,B9;var H9=p(()=>{V4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i,B9={order:400,allowEmpty:!0,canParse(Z){return Buffer.isBuffer(Z.data)&&V4.test(Z.url)},parse(Z){if(Buffer.isBuffer(Z.data))return Z.data;else return Buffer.from(Z.data)}}});var m1;var u1=p(()=>{Y2();D2();m1={order:100,canRead(Z){return r0(Z.url)},async read(Z){let X,W=await import("fs");try{X=q0(Z.url)}catch(Q){let J=Q;throw J.message=`Malformed URI: ${Z.url}: ${J.message}`,new w2(J,Z.url)}if(X.endsWith("/")||X.endsWith("\\"))X=X.slice(0,-1);try{return await W.promises.readFile(X)}catch(Q){let J=Q;throw J.message=`Error opening file ${X}: ${J.message}`,new w2(J,X)}}}});async function M9(Z,X,W){Z=Y0(Z);let Q=W||[];Q.push(Z.href);try{if(X.safeUrlResolver&&o0(Z.href))throw Error(`Unsafe URL blocked by safeUrlResolver: ${Z.href}`);let J=await F4(Z,X);if(J.status>=400){let Y=Error(`HTTP ERROR ${J.status}`);throw Y.status=J.status,Y}else if(J.status>=300)if(!Number.isNaN(X.redirects)&&Q.length>X.redirects){let Y=Error(`Error downloading ${Q[0]}.
52
52
  Too many redirects:
53
53
  ${Q.join(`
54
- `)}`);throw Y.status=J.status,new w2(Y)}else{let Y=U4(J,"location");if(!Y){let V=Error(`HTTP ${J.status} redirect with no location header`);throw V.status=J.status,V}let G=e(Z.href,Y);return M9(G,X,Q)}else{if(J.body){let Y=await J.arrayBuffer();return Buffer.from(Y)}return Buffer.alloc(0)}}catch(J){let Y=J;throw Y.message=`Error downloading ${Z.href}: ${Y.message}`,new w2(Y,Z.href)}}async function q4(Z,X){let W,Q;if(X.timeout&&typeof AbortController<"u")W=new AbortController,Q=setTimeout(()=>W.abort(),X.timeout);let J=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",redirect:"manual",signal:W?W.signal:null});if(Q)clearTimeout(Q);return J}function U4(Z,X){return Z.headers.get(X)}var f1;var c1=p(()=>{Y2();D2();f1={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return _8(Z.url)&&(!this.safeUrlResolver||!o0(Z.url))},read(Z){let X=Y0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=Y0(location.href).protocol;return M9(X,this)}}});function A9(Z,X){if($9(X)){let W=Object.keys(X).filter((Q)=>!["__proto__","constructor","prototype"].includes(Q));for(let Q=0;Q<W.length;Q++){let J=W[Q],Y=X[J],G=Z[J];if($9(Y))Z[J]=A9(G||{},Y);else if(Y!==void 0)Z[J]=Y}}return Z}function $9(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var D9=()=>{return{parse:{json:{...f8},yaml:{...U9},text:{...V9},binary:{...B9}},resolve:{file:{...m1},http:{...f1},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},L9=(Z)=>{let X=D9();if(Z)A9(X,Z);return X};var p1=p(()=>{c8();K9();F9();H9();u1();c1()});function K4(Z){let X,W,Q,J,Y=Array.prototype.slice.call(Z);if(typeof Y[Y.length-1]==="function")J=Y.pop();if(typeof Y[0]==="string")if(X=Y[0],typeof Y[2]==="object")W=Y[1],Q=Y[2];else W=void 0,Q=Y[1];else X="",W=Y[0],Q=Y[1];try{Q=L9(Q)}catch(G){console.error(`JSON Schema Ref Parser: Error normalizing options: ${G}`)}if(!Q.mutateInputSchema&&typeof W==="object")W=JSON.parse(JSON.stringify(W));return{path:X,schema:W,options:Q,callback:J}}var j0;var O9=p(()=>{p1();j0=K4});function V4(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let W=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=d1(Z.schema,Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(Q)}catch(W){return Promise.reject(W)}}function d1(Z,X,W,Q,J,Y,G,V){G||=new Set;let q=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!G.has(Z)){G.add(Z);let U=W;if(s.isExternal$Ref(Z))q.push(F4(Z,X,U,Q,J,Y));let H=Object.keys(Z);for(let F of H){let B=q2.join(X,F),M=Z[F],L=Q&&M&&typeof M==="object"&&!ArrayBuffer.isView(M)?z2(U,M):U;q=q.concat(d1(M,B,L,Q,J,Y,G,V))}}return q}async function F4(Z,X,W,Q,J,Y){let V=Y.dereference?.externalReferenceResolution==="root"?o2():Q?W:X,q=e(V,Z.$ref),U=a(q),H=J._get$Ref(U);if(H)return Promise.resolve(H.value);try{let F=Z.$ref,B={url:q,baseUrl:V};if(typeof F==="string")B.reference=F;let M=await Q1(B,J,Y),L=J._get$Ref(U),E=d1(M,U+"#",U,L?.dynamicIdScope??!1,J,Y,new Set,!0);return Promise.all(E)}catch(F){if(!Y?.continueOnError||!C2(F))throw F;if(J._$refs[U])F.source=decodeURI(a(X)),F.path=s0(T2(X));return[]}}var I9;var w9=p(()=>{V0();w0();g1();Y2();D2();r2();I9=V4});function B4(Z,X){let W=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=[];l1(Z,"schema",Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,"#",0,Q,Z.$refs,X);let J=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(H4(Q,X,J),(X.bundle||{}).optimizeInternalRefs!==!1)D4(Q,Z.schema)}function l1(Z,X,W,Q,J,Y,G,V,q,U){let H=X===null?Z:Z[X],F=U.bundle||{},B=F.excludedPathMatcher||(()=>!1);if(H&&typeof H==="object"&&!ArrayBuffer.isView(H)&&!B(Y)){let M=Q;if(s.isAllowed$Ref(H))T9(Z,X,W,M,J,Y,G,V,q,U);else{let L=Object.keys(H).sort((E,C)=>{if(E==="definitions"||E==="$defs")return-1;else if(C==="definitions"||C==="$defs")return 1;else return E.length-C.length});for(let E of L){let C=q2.join(W,E),_=q2.join(Y,E),x=H[E],h=J&&x&&typeof x==="object"&&!ArrayBuffer.isView(x)?z2(M,x):M;if(s.isAllowed$Ref(x))T9(H,E,C,h,J,_,G,V,q,U);else l1(H,E,C,h,J,_,G,V,q,U);if(x&&typeof x==="object"&&!Array.isArray(x)){if("$ref"in x)F?.onBundle?.(x.$ref,H[E],H,E)}}}}}function T9(Z,X,W,Q,J,Y,G,V,q,U){let H=X===null?Z:Z[X],F=e(J?Q:W,H.$ref),B=q._resolve(F,Y,U);if(B===null)return;let L=q2.parse(Y).length,E=a(B.path),C=T2(B.path),_=E!==q._root$Ref.path&&!q._aliases[E],x=Boolean(q._aliases[E])&&B.$ref.value!==q._root$Ref.value,h=s.isExtended$Ref(H);G+=B.indirections;let u=M4(V,Z,X);if(u)if(L<u.depth||G<u.indirections)$4(V,u);else return;if(V.push({$ref:H,parent:Z,key:X,pathFromRoot:Y,depth:L,file:E,hash:C,value:B.value,circular:B.circular,extended:h,external:_,nestedResource:x,indirections:G}),!u||_)l1(B.value,null,B.path,B.$ref.path,B.$ref.dynamicIdScope,Y,G+1,V,q,U)}function H4(Z,X,W){Z.sort((G,V)=>{if(G.file!==V.file)return G.file<V.file?-1:1;else if(G.hash!==V.hash)return G.hash<V.hash?-1:1;else if(G.circular!==V.circular)return G.circular?-1:1;else if(G.extended!==V.extended)return G.extended?1:-1;else if(G.indirections!==V.indirections)return G.indirections-V.indirections;else if(G.depth!==V.depth)return G.depth-V.depth;else{let q=Math.max(G.pathFromRoot.lastIndexOf("/definitions"),G.pathFromRoot.lastIndexOf("/$defs")),U=Math.max(V.pathFromRoot.lastIndexOf("/definitions"),V.pathFromRoot.lastIndexOf("/$defs"));if(q!==U)return U-q;else return G.pathFromRoot.length-V.pathFromRoot.length}});let Q,J,Y;for(let G of Z){let V=X.bundle||{};if(!G.external){if(V.optimizeInternalRefs!==!1&&!G.nestedResource)G.$ref.$ref=G.hash}else if(G.file===Q&&G.hash===J)if(W&&R9(Z,G))G.$ref.$ref=W+Y;else G.$ref.$ref=Y;else if(G.file===Q&&G.hash.indexOf(J+"/")===0){let q=q2.join(Y,q2.parse(G.hash.replace(J,"#")));if(W&&R9(Z,G))G.$ref.$ref=W+q;else G.$ref.$ref=q}else if(Q=G.file,J=G.hash,Y=G.pathFromRoot,G.$ref=G.parent[G.key]=s.dereference(G.$ref,G.value,X),G.circular)G.$ref.$ref=G.pathFromRoot}}function M4(Z,X,W){for(let Q of Z)if(Q&&Q.parent===X&&Q.key===W)return Q;return}function $4(Z,X){let W=Z.indexOf(X);Z.splice(W,1)}function D4(Z,X){for(let W of Z){if(!W.$ref||typeof W.$ref!=="object"||!("$ref"in W.$ref))continue;let Q=W.$ref.$ref;if(typeof Q!=="string"||!Q.startsWith("#/"))continue;let J=L4(X,Q);if(J!==Q)W.$ref.$ref=J}}function L4(Z,X){if(!X.startsWith("#/"))return X;let W=X.slice(2).split("/"),Q=Z,J=[];for(let G of W){if(Q===null||Q===void 0||typeof Q!=="object")return X;if("$ref"in Q&&typeof Q.$ref==="string"&&Q.$ref.startsWith("#/")){let U=Q.$ref.slice(2).split("/");if(J.length=0,J.push(...U),Q=A4(Z,Q.$ref),Q===null||Q===void 0||typeof Q!=="object")return X}let V=G.replace(/~1/g,"/").replace(/~0/g,"~"),q=Array.isArray(Q)?parseInt(V):V;Q=Q[q],J.push(G)}return"#/"+J.join("/")}function A4(Z,X){if(!X.startsWith("#/"))return;let W=X.slice(2).split("/"),Q=Z;for(let J of W){if(Q===null||Q===void 0||typeof Q!=="object")return;let Y=J.replace(/~1/g,"/").replace(/~0/g,"~"),G=Array.isArray(Q)?parseInt(Y):Y;Q=Q[G]}return Q}function R9(Z,X){for(let W of Z){if(W.pathFromRoot==="#"||W.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(W.pathFromRoot+"/")){if(W.value&&typeof W.value==="object"&&"$id"in W.value)return!0}}return!1}var C9;var N9=p(()=>{V0();w0();Y2();r2();C9=B4});function O4(Z,X){let W=Date.now(),Q=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,J=i1(Z.schema,Z.$refs._root$Ref.path,Q,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,W,0);Z.$refs.circular=J.circular,Z.schema=J.value}function i1(Z,X,W,Q,J,Y,G,V,q,U,H,F){let B,M={value:Z,circular:!1};_9(H,U);let L=U.dereference||{},E=L.maxDepth??500;if(F>E)throw RangeError(`Maximum dereference depth (${E}) exceeded at ${J}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let C=L.excludedPathMatcher||(()=>!1);if(L?.circular==="ignore"||!G.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!C(J)){Y.add(Z),G.add(Z);let _=W;if(s.isAllowed$Ref(Z,U))B=j9(Z,X,_,Q,J,Y,G,V,q,U,H,F),M.circular=B.circular,M.value=B.value;else for(let x of Object.keys(Z)){_9(H,U);let h=q2.join(X,x),u=q2.join(J,x);if(C(u))continue;let f=Z[x],y=Q&&f&&typeof f==="object"&&!ArrayBuffer.isView(f)?z2(_,f):_,b;if(s.isAllowed$Ref(f,U)){if(B=j9(f,h,y,Q,u,Y,G,V,q,U,H,F),b=B.circular,Z[x]!==B.value){let l=new Map;if(L?.preservedProperties){if(typeof Z[x]==="object"&&!Array.isArray(Z[x]))L?.preservedProperties.forEach((B2)=>{if(B2 in Z[x])l.set(B2,Z[x][B2])})}let Q2=B.value;if(L?.cloneReferences&&!b&&Q2&&typeof Q2==="object")Q2=structuredClone(Q2);if(Z[x]=Q2,L?.preservedProperties){if(l.size&&typeof Z[x]==="object"&&!Array.isArray(Z[x]))l.forEach((B2,d2)=>{Z[x][d2]=B2})}L?.onDereference?.(f.$ref,Z[x],Z,x)}}else if(!Y.has(f)){if(B=i1(f,h,y,Q,u,Y,G,V,q,U,H,F+1),b=B.circular,Z[x]!==B.value)Z[x]=B.value}else b=G1(h,q,U);M.circular=M.circular||b}Y.delete(Z)}}return M}function j9(Z,X,W,Q,J,Y,G,V,q,U,H,F){let L=s.isExternal$Ref(Z)&&U?.dereference?.externalReferenceResolution==="root"?o2():Q?W:X,E=e(L,Z.$ref),C=V.get(E);if(C){if(!C.circular){let y=Object.keys(Z);if(y.length>1){let b={};for(let l of y)if(l!=="$ref"&&!(l in C.value))b[l]=Z[l];return{circular:C.circular,value:Object.assign({},C.value,b)}}return C}if(typeof C.value==="object"&&"$ref"in C.value&&"$ref"in Z){if(C.value.$ref===Z.$ref)return G1(X,q,U),C}else return G1(X,q,U),C}let _=q._resolve(E,X,U);if(_===null)return{circular:!1,value:null};let x=_.circular,h=x||Y.has(_.value);if(h)G1(X,q,U);let u=s.dereference(Z,_.value,U);if(!h){let y=i1(u,_.path,_.$ref.path,_.$ref.dynamicIdScope,J,Y,G,V,q,U,H,F+1);h=y.circular,u=y.value}if(h&&!x&&U.dereference?.circular==="ignore")u=Z;if(x)u.$ref=J;let f={circular:h,value:u};if(Object.keys(Z).length===1)V.set(E,f);return f}function _9(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new P1(X.timeoutMs)}}function G1(Z,X,W){if(X.circular=!0,W?.dereference?.onCircular?.(Z),!W.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var P9;var x9=p(()=>{V0();w0();Y2();r2();D2();P9=O4});function I4(){if(typeof process==="object"&&typeof process.nextTick==="function")return process.nextTick;else if(typeof setImmediate==="function")return setImmediate;else return function(X){setTimeout(X,0)}}var n1;var E9=p(()=>{n1=I4()});function F2(Z,X){if(Z){X.then(function(W){n1(function(){Z(null,W)})},function(W){n1(function(){Z(W)})});return}else return X}var S9=p(()=>{E9()});class g2{schema=null;$refs=new R0;async parse(){let Z=j0(arguments),X;if(!Z.path&&!Z.schema){let Q=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return F2(Z.callback,Promise.reject(Q))}this.schema=null,this.$refs=new R0;let W="http";if(r0(Z.path))Z.path=S8(Z.path),W="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let Q=Y0(Z.schema.$id),J=Q.port??(Q.protocol==="https:"?443:80);Z.path=`${Q.protocol}//${Q.hostname}:${J}`}if(Z.path=e(o2(),Z.path),Z.schema&&typeof Z.schema==="object"){let Q=this.$refs._add(Z.path);Q.value=Z.schema,Q.pathType=W,Q.dynamicIdScope=Z1(Q.value),X1(this.$refs,Q.path,Q.value,Q.pathType,Q.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=Q1(Z.path,this.$refs,Z.options);try{let Q=await X;if(Q!==null&&typeof Q==="object"&&!Buffer.isBuffer(Q))return this.schema=Q,F2(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,F2(Z.callback,Promise.resolve(this.schema));else throw SyntaxError(`"${this.$refs._root$Ref.path||Q}" is not a valid JSON Schema`)}catch(Q){if(!Z.options.continueOnError||!C2(Q))return F2(Z.callback,Promise.reject(Q));if(this.$refs._$refs[a(Z.path)])this.$refs._$refs[a(Z.path)].addError(Q);return F2(Z.callback,Promise.resolve(null))}}static parse(){let Z=new g2;return Z.parse.apply(Z,arguments)}async resolve(){let Z=j0(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await I9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.$refs))}catch(X){return F2(Z.callback,Promise.reject(X))}}static resolve(){let Z=new g2;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new g2;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=j0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),C9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.schema))}catch(X){return F2(Z.callback,Promise.reject(X))}}static dereference(){let Z=new g2;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=j0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),P9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.schema))}catch(X){return F2(Z.callback,Promise.reject(X))}}}function o1(Z){if(U0.getParserErrors(Z).length>0)throw new U0(Z)}var rZ,sZ,aZ,k9;var b9=p(()=>{m8();g1();O9();w9();N9();x9();Y2();u1();c1();D2();S9();r2();p1();Y2();rZ=g2.parse,sZ=g2.resolve,aZ=g2.bundle,k9=g2.dereference});async function r1(Z,X={}){let{baseUrl:W="/_jx/server"}=X,Q=await k9(Z),J=w8(Q);if(J.length===0)return null;let Y=J.map(({exportName:V,src:q})=>`import { ${V} } from '${q}'`).join(`
54
+ `)}`);throw Y.status=J.status,new w2(Y)}else{let Y=B4(J,"location");if(!Y){let V=Error(`HTTP ${J.status} redirect with no location header`);throw V.status=J.status,V}let G=e(Z.href,Y);return M9(G,X,Q)}else{if(J.body){let Y=await J.arrayBuffer();return Buffer.from(Y)}return Buffer.alloc(0)}}catch(J){let Y=J;throw Y.message=`Error downloading ${Z.href}: ${Y.message}`,new w2(Y,Z.href)}}async function F4(Z,X){let W,Q;if(X.timeout&&typeof AbortController<"u")W=new AbortController,Q=setTimeout(()=>W.abort(),X.timeout);let J=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",redirect:"manual",signal:W?W.signal:null});if(Q)clearTimeout(Q);return J}function B4(Z,X){return Z.headers.get(X)}var f1;var c1=p(()=>{Y2();D2();f1={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return _8(Z.url)&&(!this.safeUrlResolver||!o0(Z.url))},read(Z){let X=Y0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=Y0(location.href).protocol;return M9(X,this)}}});function A9(Z,X){if($9(X)){let W=Object.keys(X).filter((Q)=>!["__proto__","constructor","prototype"].includes(Q));for(let Q=0;Q<W.length;Q++){let J=W[Q],Y=X[J],G=Z[J];if($9(Y))Z[J]=A9(G||{},Y);else if(Y!==void 0)Z[J]=Y}}return Z}function $9(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var D9=()=>{return{parse:{json:{...f8},yaml:{...U9},text:{...V9},binary:{...B9}},resolve:{file:{...m1},http:{...f1},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},L9=(Z)=>{let X=D9();if(Z)A9(X,Z);return X};var p1=p(()=>{c8();K9();F9();H9();u1();c1()});function H4(Z){let X,W,Q,J,Y=Array.prototype.slice.call(Z);if(typeof Y[Y.length-1]==="function")J=Y.pop();if(typeof Y[0]==="string")if(X=Y[0],typeof Y[2]==="object")W=Y[1],Q=Y[2];else W=void 0,Q=Y[1];else X="",W=Y[0],Q=Y[1];try{Q=L9(Q)}catch(G){console.error(`JSON Schema Ref Parser: Error normalizing options: ${G}`)}if(!Q.mutateInputSchema&&typeof W==="object")W=JSON.parse(JSON.stringify(W));return{path:X,schema:W,options:Q,callback:J}}var j0;var O9=p(()=>{p1();j0=H4});function M4(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let W=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=d1(Z.schema,Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(Q)}catch(W){return Promise.reject(W)}}function d1(Z,X,W,Q,J,Y,G,V){G||=new Set;let q=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!G.has(Z)){G.add(Z);let U=W;if(s.isExternal$Ref(Z))q.push($4(Z,X,U,Q,J,Y));let H=Object.keys(Z);for(let F of H){let B=q2.join(X,F),M=Z[F],L=Q&&M&&typeof M==="object"&&!ArrayBuffer.isView(M)?z2(U,M):U;q=q.concat(d1(M,B,L,Q,J,Y,G,V))}}return q}async function $4(Z,X,W,Q,J,Y){let V=Y.dereference?.externalReferenceResolution==="root"?o2():Q?W:X,q=e(V,Z.$ref),U=a(q),H=J._get$Ref(U);if(H)return Promise.resolve(H.value);try{let F=Z.$ref,B={url:q,baseUrl:V};if(typeof F==="string")B.reference=F;let M=await Q1(B,J,Y),L=J._get$Ref(U),E=d1(M,U+"#",U,L?.dynamicIdScope??!1,J,Y,new Set,!0);return Promise.all(E)}catch(F){if(!Y?.continueOnError||!C2(F))throw F;if(J._$refs[U])F.source=decodeURI(a(X)),F.path=s0(T2(X));return[]}}var I9;var w9=p(()=>{V0();w0();g1();Y2();D2();r2();I9=M4});function D4(Z,X){let W=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=[];l1(Z,"schema",Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,"#",0,Q,Z.$refs,X);let J=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(L4(Q,X,J),(X.bundle||{}).optimizeInternalRefs!==!1)I4(Q,Z.schema)}function l1(Z,X,W,Q,J,Y,G,V,q,U){let H=X===null?Z:Z[X],F=U.bundle||{},B=F.excludedPathMatcher||(()=>!1);if(H&&typeof H==="object"&&!ArrayBuffer.isView(H)&&!B(Y)){let M=Q;if(s.isAllowed$Ref(H))T9(Z,X,W,M,J,Y,G,V,q,U);else{let L=Object.keys(H).sort((E,C)=>{if(E==="definitions"||E==="$defs")return-1;else if(C==="definitions"||C==="$defs")return 1;else return E.length-C.length});for(let E of L){let C=q2.join(W,E),_=q2.join(Y,E),x=H[E],h=J&&x&&typeof x==="object"&&!ArrayBuffer.isView(x)?z2(M,x):M;if(s.isAllowed$Ref(x))T9(H,E,C,h,J,_,G,V,q,U);else l1(H,E,C,h,J,_,G,V,q,U);if(x&&typeof x==="object"&&!Array.isArray(x)){if("$ref"in x)F?.onBundle?.(x.$ref,H[E],H,E)}}}}}function T9(Z,X,W,Q,J,Y,G,V,q,U){let H=X===null?Z:Z[X],F=e(J?Q:W,H.$ref),B=q._resolve(F,Y,U);if(B===null)return;let L=q2.parse(Y).length,E=a(B.path),C=T2(B.path),_=E!==q._root$Ref.path&&!q._aliases[E],x=Boolean(q._aliases[E])&&B.$ref.value!==q._root$Ref.value,h=s.isExtended$Ref(H);G+=B.indirections;let u=A4(V,Z,X);if(u)if(L<u.depth||G<u.indirections)O4(V,u);else return;if(V.push({$ref:H,parent:Z,key:X,pathFromRoot:Y,depth:L,file:E,hash:C,value:B.value,circular:B.circular,extended:h,external:_,nestedResource:x,indirections:G}),!u||_)l1(B.value,null,B.path,B.$ref.path,B.$ref.dynamicIdScope,Y,G+1,V,q,U)}function L4(Z,X,W){Z.sort((G,V)=>{if(G.file!==V.file)return G.file<V.file?-1:1;else if(G.hash!==V.hash)return G.hash<V.hash?-1:1;else if(G.circular!==V.circular)return G.circular?-1:1;else if(G.extended!==V.extended)return G.extended?1:-1;else if(G.indirections!==V.indirections)return G.indirections-V.indirections;else if(G.depth!==V.depth)return G.depth-V.depth;else{let q=Math.max(G.pathFromRoot.lastIndexOf("/definitions"),G.pathFromRoot.lastIndexOf("/$defs")),U=Math.max(V.pathFromRoot.lastIndexOf("/definitions"),V.pathFromRoot.lastIndexOf("/$defs"));if(q!==U)return U-q;else return G.pathFromRoot.length-V.pathFromRoot.length}});let Q,J,Y;for(let G of Z){let V=X.bundle||{};if(!G.external){if(V.optimizeInternalRefs!==!1&&!G.nestedResource)G.$ref.$ref=G.hash}else if(G.file===Q&&G.hash===J)if(W&&R9(Z,G))G.$ref.$ref=W+Y;else G.$ref.$ref=Y;else if(G.file===Q&&G.hash.indexOf(J+"/")===0){let q=q2.join(Y,q2.parse(G.hash.replace(J,"#")));if(W&&R9(Z,G))G.$ref.$ref=W+q;else G.$ref.$ref=q}else if(Q=G.file,J=G.hash,Y=G.pathFromRoot,G.$ref=G.parent[G.key]=s.dereference(G.$ref,G.value,X),G.circular)G.$ref.$ref=G.pathFromRoot}}function A4(Z,X,W){for(let Q of Z)if(Q&&Q.parent===X&&Q.key===W)return Q;return}function O4(Z,X){let W=Z.indexOf(X);Z.splice(W,1)}function I4(Z,X){for(let W of Z){if(!W.$ref||typeof W.$ref!=="object"||!("$ref"in W.$ref))continue;let Q=W.$ref.$ref;if(typeof Q!=="string"||!Q.startsWith("#/"))continue;let J=w4(X,Q);if(J!==Q)W.$ref.$ref=J}}function w4(Z,X){if(!X.startsWith("#/"))return X;let W=X.slice(2).split("/"),Q=Z,J=[];for(let G of W){if(Q===null||Q===void 0||typeof Q!=="object")return X;if("$ref"in Q&&typeof Q.$ref==="string"&&Q.$ref.startsWith("#/")){let U=Q.$ref.slice(2).split("/");if(J.length=0,J.push(...U),Q=T4(Z,Q.$ref),Q===null||Q===void 0||typeof Q!=="object")return X}let V=G.replace(/~1/g,"/").replace(/~0/g,"~"),q=Array.isArray(Q)?parseInt(V):V;Q=Q[q],J.push(G)}return"#/"+J.join("/")}function T4(Z,X){if(!X.startsWith("#/"))return;let W=X.slice(2).split("/"),Q=Z;for(let J of W){if(Q===null||Q===void 0||typeof Q!=="object")return;let Y=J.replace(/~1/g,"/").replace(/~0/g,"~"),G=Array.isArray(Q)?parseInt(Y):Y;Q=Q[G]}return Q}function R9(Z,X){for(let W of Z){if(W.pathFromRoot==="#"||W.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(W.pathFromRoot+"/")){if(W.value&&typeof W.value==="object"&&"$id"in W.value)return!0}}return!1}var C9;var N9=p(()=>{V0();w0();Y2();r2();C9=D4});function R4(Z,X){let W=Date.now(),Q=Z.$refs._root$Ref.dynamicIdScope?z2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,J=i1(Z.schema,Z.$refs._root$Ref.path,Q,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,W,0);Z.$refs.circular=J.circular,Z.schema=J.value}function i1(Z,X,W,Q,J,Y,G,V,q,U,H,F){let B,M={value:Z,circular:!1};_9(H,U);let L=U.dereference||{},E=L.maxDepth??500;if(F>E)throw RangeError(`Maximum dereference depth (${E}) exceeded at ${J}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let C=L.excludedPathMatcher||(()=>!1);if(L?.circular==="ignore"||!G.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!C(J)){Y.add(Z),G.add(Z);let _=W;if(s.isAllowed$Ref(Z,U))B=j9(Z,X,_,Q,J,Y,G,V,q,U,H,F),M.circular=B.circular,M.value=B.value;else for(let x of Object.keys(Z)){_9(H,U);let h=q2.join(X,x),u=q2.join(J,x);if(C(u))continue;let f=Z[x],y=Q&&f&&typeof f==="object"&&!ArrayBuffer.isView(f)?z2(_,f):_,b;if(s.isAllowed$Ref(f,U)){if(B=j9(f,h,y,Q,u,Y,G,V,q,U,H,F),b=B.circular,Z[x]!==B.value){let l=new Map;if(L?.preservedProperties){if(typeof Z[x]==="object"&&!Array.isArray(Z[x]))L?.preservedProperties.forEach((B2)=>{if(B2 in Z[x])l.set(B2,Z[x][B2])})}let Q2=B.value;if(L?.cloneReferences&&!b&&Q2&&typeof Q2==="object")Q2=structuredClone(Q2);if(Z[x]=Q2,L?.preservedProperties){if(l.size&&typeof Z[x]==="object"&&!Array.isArray(Z[x]))l.forEach((B2,d2)=>{Z[x][d2]=B2})}L?.onDereference?.(f.$ref,Z[x],Z,x)}}else if(!Y.has(f)){if(B=i1(f,h,y,Q,u,Y,G,V,q,U,H,F+1),b=B.circular,Z[x]!==B.value)Z[x]=B.value}else b=G1(h,q,U);M.circular=M.circular||b}Y.delete(Z)}}return M}function j9(Z,X,W,Q,J,Y,G,V,q,U,H,F){let L=s.isExternal$Ref(Z)&&U?.dereference?.externalReferenceResolution==="root"?o2():Q?W:X,E=e(L,Z.$ref),C=V.get(E);if(C){if(!C.circular){let y=Object.keys(Z);if(y.length>1){let b={};for(let l of y)if(l!=="$ref"&&!(l in C.value))b[l]=Z[l];return{circular:C.circular,value:Object.assign({},C.value,b)}}return C}if(typeof C.value==="object"&&"$ref"in C.value&&"$ref"in Z){if(C.value.$ref===Z.$ref)return G1(X,q,U),C}else return G1(X,q,U),C}let _=q._resolve(E,X,U);if(_===null)return{circular:!1,value:null};let x=_.circular,h=x||Y.has(_.value);if(h)G1(X,q,U);let u=s.dereference(Z,_.value,U);if(!h){let y=i1(u,_.path,_.$ref.path,_.$ref.dynamicIdScope,J,Y,G,V,q,U,H,F+1);h=y.circular,u=y.value}if(h&&!x&&U.dereference?.circular==="ignore")u=Z;if(x)u.$ref=J;let f={circular:h,value:u};if(Object.keys(Z).length===1)V.set(E,f);return f}function _9(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new P1(X.timeoutMs)}}function G1(Z,X,W){if(X.circular=!0,W?.dereference?.onCircular?.(Z),!W.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var P9;var x9=p(()=>{V0();w0();Y2();r2();D2();P9=R4});function C4(){if(typeof process==="object"&&typeof process.nextTick==="function")return process.nextTick;else if(typeof setImmediate==="function")return setImmediate;else return function(X){setTimeout(X,0)}}var n1;var E9=p(()=>{n1=C4()});function F2(Z,X){if(Z){X.then(function(W){n1(function(){Z(null,W)})},function(W){n1(function(){Z(W)})});return}else return X}var S9=p(()=>{E9()});class g2{schema=null;$refs=new R0;async parse(){let Z=j0(arguments),X;if(!Z.path&&!Z.schema){let Q=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return F2(Z.callback,Promise.reject(Q))}this.schema=null,this.$refs=new R0;let W="http";if(r0(Z.path))Z.path=S8(Z.path),W="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let Q=Y0(Z.schema.$id),J=Q.port??(Q.protocol==="https:"?443:80);Z.path=`${Q.protocol}//${Q.hostname}:${J}`}if(Z.path=e(o2(),Z.path),Z.schema&&typeof Z.schema==="object"){let Q=this.$refs._add(Z.path);Q.value=Z.schema,Q.pathType=W,Q.dynamicIdScope=Z1(Q.value),X1(this.$refs,Q.path,Q.value,Q.pathType,Q.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=Q1(Z.path,this.$refs,Z.options);try{let Q=await X;if(Q!==null&&typeof Q==="object"&&!Buffer.isBuffer(Q))return this.schema=Q,F2(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,F2(Z.callback,Promise.resolve(this.schema));else throw SyntaxError(`"${this.$refs._root$Ref.path||Q}" is not a valid JSON Schema`)}catch(Q){if(!Z.options.continueOnError||!C2(Q))return F2(Z.callback,Promise.reject(Q));if(this.$refs._$refs[a(Z.path)])this.$refs._$refs[a(Z.path)].addError(Q);return F2(Z.callback,Promise.resolve(null))}}static parse(){let Z=new g2;return Z.parse.apply(Z,arguments)}async resolve(){let Z=j0(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await I9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.$refs))}catch(X){return F2(Z.callback,Promise.reject(X))}}static resolve(){let Z=new g2;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new g2;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=j0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),C9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.schema))}catch(X){return F2(Z.callback,Promise.reject(X))}}static dereference(){let Z=new g2;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=j0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),P9(this,Z.options),o1(this),F2(Z.callback,Promise.resolve(this.schema))}catch(X){return F2(Z.callback,Promise.reject(X))}}}function o1(Z){if(U0.getParserErrors(Z).length>0)throw new U0(Z)}var eZ,Z7,X7,k9;var b9=p(()=>{m8();g1();O9();w9();N9();x9();Y2();u1();c1();D2();S9();r2();p1();Y2();eZ=g2.parse,Z7=g2.resolve,X7=g2.bundle,k9=g2.dereference});async function r1(Z,X={}){let{baseUrl:W="/_jx/server"}=X,Q=await k9(Z),J=w8(Q);if(J.length===0)return null;let Y=J.map(({exportName:V,src:q})=>`import { ${V} } from '${q}'`).join(`
55
55
  `),G=J.map(({exportName:V})=>g9(V,W)).join(`
56
56
  `);return`// Generated by @jxsuite/compiler — do not edit manually
57
57
  // Deploy as a Cloudflare Worker, Node server, or Bun process.
@@ -64,7 +64,7 @@ const app = new Hono()
64
64
  ${G}
65
65
 
66
66
  export default app
67
- `}function w4(Z,X={}){let{baseUrl:W="/_jx/server",adapter:Q=null}=X;if(Z.length===0&&!Q)return null;let J=Z.map(({exportName:V,src:q})=>`import { ${V} } from '${q}'`).join(`
67
+ `}function N4(Z,X={}){let{baseUrl:W="/_jx/server",adapter:Q=null}=X;if(Z.length===0&&!Q)return null;let J=Z.map(({exportName:V,src:q})=>`import { ${V} } from '${q}'`).join(`
68
68
  `),Y=Z.map(({exportName:V})=>g9(V,W)).join(`
69
69
  `);return`// Generated by @jxsuite/compiler — do not edit manually
70
70
  import { Hono } from 'hono'
@@ -85,7 +85,7 @@ app.post('${X}/${Z}', async (c) => {
85
85
  } catch (e) {
86
86
  return c.json({ ok: false, error: e?.message ?? 'Server error' }, 500)
87
87
  }
88
- })`}var s1=p(()=>{b9();n2()});function T4(Z){return Z instanceof Error?Z.message:String(Z)}function a1(Z,X,W){let Q;try{Q=JSON.parse(Z)}catch(J){throw Error(`Failed to parse ${W} at ${X}: ${T4(J)}`,{cause:J})}if(!K2(Q))throw Error(`Invalid ${W} at ${X}: expected a JSON object`);return Q}function J1(Z,X){return a1(Z,X,"Jx document")}function W7(Z,X){return a1(Z,X,"project config")}function Q7(Z,X){return a1(Z,X,"class definition")}var t1=p(()=>{f2()});class h9{name;classPath;classDef;extensions;mediaType;documentKinds;exportTarget;remote;studio;capabilities;#Z;#X=null;constructor(Z,X,W,Q){this.name=Z,this.classPath=X,this.classDef=W,this.#Z=Q;let J=W.format;this.extensions=(J.extensions??[]).map((Y)=>Y.toLowerCase()),this.mediaType=J.mediaType??null,this.documentKinds=J.documentKinds??[],this.exportTarget=J.exportTarget===!0,this.remote=J.remote===!0,this.studio=W.$studio??null,this.capabilities=C4(W)}implementation(){if(!this.#X){let Z=this.classDef.$implementation;if(!Z)return Promise.reject(Error(`Format class "${this.name}" has no $implementation to import`));this.#X=this.#Z.importModule(this.#Z.resolvePath(this.classPath,Z))}return this.#X}async call(Z,...X){let W=this.capabilities[Z];if(!W)throw Error(`Format class "${this.name}" does not declare a "${Z}" capability`);let Q=await this.implementation(),J=this.classDef.title??this.name,Y=Q[J]??Q.default?.[J]??Q.default,G=Y?.[W.identifier];if(typeof G!=="function")throw TypeError(`Format class "${this.name}": implementation export "${J}" has no static "${W.identifier}" method`);return await G.call(Y,...X)}}class m9{#Z;constructor(Z){this.#Z=Z;for(let X of y9){let W=new Map;for(let Q of Z){if(!Q.capabilities[X])continue;for(let J of Q.extensions){let Y=W.get(J);if(Y)throw Error(`Format conflict: "${Y.name}" and "${Q.name}" both claim "${J}" with the "${X}" capability`);W.set(J,Q)}}}}get entries(){return this.#Z}byExtension(Z,X){let W=v9(Z);return this.#Z.find((Q)=>Q.extensions.includes(W)&&(!X||Q.capabilities[X]))}byName(Z){return this.#Z.find((X)=>X.name===Z)}withCapability(Z){return this.#Z.filter((X)=>X.capabilities[Z])}documentExtensions(Z){let X=new Set;for(let W of this.#Z){if(Z&&!W.documentKinds.includes(Z))continue;for(let Q of W.extensions)X.add(Q)}return X.delete(".json"),[...X]}has(Z){let X=v9(Z);return this.#Z.some((W)=>W.extensions.includes(X))}}async function u9(Z,X,W){let Q=[];for(let[J,Y]of Object.entries(Z??{})){if(typeof Y!=="string"||!Y.endsWith(".class.json"))continue;let G,V;try{G=W?X.resolvePath(W,Y):Y,V=await X.loadJson(G)}catch{continue}if(!V||typeof V!=="object")continue;if(!V.format||!Array.isArray(V.format.extensions))continue;Q.push(new h9(J,G,V,X))}return new m9(Q)}function C4(Z){let X={},W=Z.$defs?.methods??{};for(let[Q,J]of Object.entries(W)){let Y=J.role;if(!Y||!y9.includes(Y))continue;X[Y]={identifier:J.identifier??Q,timing:J.timing??R4}}return X}function v9(Z){let X=Z.toLowerCase();return X.startsWith(".")?X:`.${X}`}var y9,R4;var f9=p(()=>{y9=["parse","serialize","discover","load"],R4=["compiler","server"]});var Z8={};U8(Z8,{unknownFormatError:()=>E4,importImplementation:()=>p9,createNodeFormatIO:()=>d9,buildProjectFormatRegistry:()=>x4});import{readFileSync as N4}from"node:fs";import{dirname as j4,isAbsolute as _4,resolve as e1,sep as Y1}from"node:path";import{pathToFileURL as P4}from"node:url";import{createRequire as c9}from"node:module";async function p9(Z){let X=[Z],W=`${Y1}src${Y1}`,Q=`${Y1}dist${Y1}`;if(Z.includes(W))X.push(Z.replace(W,Q));if(Z.endsWith(".js"))X.push(`${Z.slice(0,-3)}.ts`);let J;for(let Y of X)try{return await import(P4(Y).href)}catch(G){J=G}throw J instanceof Error?J:Error(String(J))}function d9(Z){return{importModule:(X)=>p9(X),loadJson:async(X)=>JSON.parse(N4(X,"utf8")),resolvePath:(X,W)=>{if(W.startsWith("./")||W.startsWith("../"))return e1(j4(X),W);if(_4(W))return W;let Q=c9(e1(Z,"package.json"));try{return Q.resolve(W)}catch{return c9(import.meta.url).resolve(W)}}}}async function x4(Z,X){return u9(X?.imports,d9(Z),e1(Z,"project.json"))}function E4(Z,X){return Error(`No format class imported for "${X}" (${Z}). Add a format class to project.json imports, e.g. "Markdown": "@jxsuite/parser/Markdown.class.json".`)}var X8=p(()=>{f9()});async function i9(Z,X={}){let{resolveElementPath:W,$media:Q,formats:J}=X,Y=[],G=new Set;async function V(q,U){let H,F;if(typeof q==="string"){let{readFileSync:h}=await import("node:fs"),{resolve:u}=await import("node:path");if(F=U?u(U,q):u(q),G.has(F))return;if(G.add(F),F.endsWith(".json"))H=J1(h(F,"utf8"),F);else{let{extname:f}=await import("node:path"),y=f(F).toLowerCase(),b=J?.byExtension?.(y,"parse");if(!b){let{unknownFormatError:l}=await Promise.resolve().then(() => (X8(),Z8));throw l(F,y)}H=await b.call("parse",h(F,"utf8"))}}else{if(H=q,F=null,H.tagName&&G.has(H.tagName))return;if(H.tagName)G.add(H.tagName)}let{tagName:B}=H;if(!B||!B.includes("-"))throw Error(`compileElement: tagName "${B}" must contain a hyphen`);let{dirname:M}=await import("node:path"),L=F?M(F):null,E=[];if(Array.isArray(H.$elements))for(let h of H.$elements){let u=A2(h)?h.$ref:h;if(typeof u!=="string")continue;if(L)await V(u,L);let f=W?W(u,L):u.replace(/\.json$/,".js");E.push(f)}let C=n0(B);if(Q)H.$media={...Q,...H.$media};let _=_0(H,C,E),x=F?F.replace(/\.json$/,".js"):`${B}.js`;Y.push({content:_,path:x,tagName:B})}return await V(Z,X.basePath??null),{files:Y}}async function S4(Z,X={}){let{title:W="Jx App",reactivitySrc:Q="https://esm.sh/@vue/reactivity@3.5.13",litHtmlSrc:J="https://esm.sh/lit-html@3.3.0"}=X,Y=await i9(Z,X),G=Y.files.at(-1);if(!G)throw Error("compileElementPage: no element modules were produced");let{basename:V}=await import("node:path"),q=V(G.path),U=`<!DOCTYPE html>
88
+ })`}var s1=p(()=>{b9();n2()});function j4(Z){return Z instanceof Error?Z.message:String(Z)}function a1(Z,X,W){let Q;try{Q=JSON.parse(Z)}catch(J){throw Error(`Failed to parse ${W} at ${X}: ${j4(J)}`,{cause:J})}if(!K2(Q))throw Error(`Invalid ${W} at ${X}: expected a JSON object`);return Q}function J1(Z,X){return a1(Z,X,"Jx document")}function Y7(Z,X){return a1(Z,X,"project config")}function q7(Z,X){return a1(Z,X,"class definition")}var t1=p(()=>{f2()});class h9{name;classPath;classDef;extensions;mediaType;documentKinds;exportTarget;remote;studio;capabilities;#Z;#X=null;constructor(Z,X,W,Q){this.name=Z,this.classPath=X,this.classDef=W,this.#Z=Q;let J=W.format;this.extensions=(J.extensions??[]).map((Y)=>Y.toLowerCase()),this.mediaType=J.mediaType??null,this.documentKinds=J.documentKinds??[],this.exportTarget=J.exportTarget===!0,this.remote=J.remote===!0,this.studio=W.$studio??null,this.capabilities=P4(W)}implementation(){if(!this.#X){let Z=this.classDef.$implementation;if(!Z)return Promise.reject(Error(`Format class "${this.name}" has no $implementation to import`));this.#X=this.#Z.importModule(this.#Z.resolvePath(this.classPath,Z))}return this.#X}async call(Z,...X){let W=this.capabilities[Z];if(!W)throw Error(`Format class "${this.name}" does not declare a "${Z}" capability`);let Q=await this.implementation(),J=this.classDef.title??this.name,Y=Q[J]??Q.default?.[J]??Q.default,G=Y?.[W.identifier];if(typeof G!=="function")throw TypeError(`Format class "${this.name}": implementation export "${J}" has no static "${W.identifier}" method`);return await G.call(Y,...X)}}class m9{#Z;constructor(Z){this.#Z=Z;for(let X of y9){let W=new Map;for(let Q of Z){if(!Q.capabilities[X])continue;for(let J of Q.extensions){let Y=W.get(J);if(Y)throw Error(`Format conflict: "${Y.name}" and "${Q.name}" both claim "${J}" with the "${X}" capability`);W.set(J,Q)}}}}get entries(){return this.#Z}byExtension(Z,X){let W=v9(Z);return this.#Z.find((Q)=>Q.extensions.includes(W)&&(!X||Q.capabilities[X]))}byName(Z){return this.#Z.find((X)=>X.name===Z)}withCapability(Z){return this.#Z.filter((X)=>X.capabilities[Z])}documentExtensions(Z){let X=new Set;for(let W of this.#Z){if(Z&&!W.documentKinds.includes(Z))continue;for(let Q of W.extensions)X.add(Q)}return X.delete(".json"),[...X]}has(Z){let X=v9(Z);return this.#Z.some((W)=>W.extensions.includes(X))}}async function u9(Z,X,W){let Q=[];for(let[J,Y]of Object.entries(Z??{})){if(typeof Y!=="string"||!Y.endsWith(".class.json"))continue;let G,V;try{G=W?X.resolvePath(W,Y):Y,V=await X.loadJson(G)}catch{continue}if(!V||typeof V!=="object")continue;if(!V.format||!Array.isArray(V.format.extensions))continue;Q.push(new h9(J,G,V,X))}return new m9(Q)}function P4(Z){let X={},W=Z.$defs?.methods??{};for(let[Q,J]of Object.entries(W)){let Y=J.role;if(!Y||!y9.includes(Y))continue;X[Y]={identifier:J.identifier??Q,timing:J.timing??_4}}return X}function v9(Z){let X=Z.toLowerCase();return X.startsWith(".")?X:`.${X}`}var y9,_4;var f9=p(()=>{y9=["parse","serialize","discover","load"],_4=["compiler","server"]});var Z8={};U8(Z8,{unknownFormatError:()=>g4,importImplementation:()=>p9,createNodeFormatIO:()=>d9,buildProjectFormatRegistry:()=>b4});import{readFileSync as x4}from"node:fs";import{dirname as E4,isAbsolute as S4,resolve as e1,sep as Y1}from"node:path";import{pathToFileURL as k4}from"node:url";import{createRequire as c9}from"node:module";async function p9(Z){let X=[Z],W=`${Y1}src${Y1}`,Q=`${Y1}dist${Y1}`;if(Z.includes(W))X.push(Z.replace(W,Q));if(Z.endsWith(".js"))X.push(`${Z.slice(0,-3)}.ts`);let J;for(let Y of X)try{return await import(k4(Y).href)}catch(G){J=G}throw J instanceof Error?J:Error(String(J))}function d9(Z){return{importModule:(X)=>p9(X),loadJson:async(X)=>JSON.parse(x4(X,"utf8")),resolvePath:(X,W)=>{if(W.startsWith("./")||W.startsWith("../"))return e1(E4(X),W);if(S4(W))return W;let Q=c9(e1(Z,"package.json"));try{return Q.resolve(W)}catch{return c9(import.meta.url).resolve(W)}}}}async function b4(Z,X){return u9(X?.imports,d9(Z),e1(Z,"project.json"))}function g4(Z,X){return Error(`No format class imported for "${X}" (${Z}). Add a format class to project.json imports, e.g. "Markdown": "@jxsuite/parser/Markdown.class.json".`)}var X8=p(()=>{f9()});async function i9(Z,X={}){let{resolveElementPath:W,$media:Q,formats:J}=X,Y=[],G=new Set;async function V(q,U){let H,F;if(typeof q==="string"){let{readFileSync:h}=await import("node:fs"),{resolve:u}=await import("node:path");if(F=U?u(U,q):u(q),G.has(F))return;if(G.add(F),F.endsWith(".json"))H=J1(h(F,"utf8"),F);else{let{extname:f}=await import("node:path"),y=f(F).toLowerCase(),b=J?.byExtension?.(y,"parse");if(!b){let{unknownFormatError:l}=await Promise.resolve().then(() => (X8(),Z8));throw l(F,y)}H=await b.call("parse",h(F,"utf8"))}}else{if(H=q,F=null,H.tagName&&G.has(H.tagName))return;if(H.tagName)G.add(H.tagName)}let{tagName:B}=H;if(!B||!B.includes("-"))throw Error(`compileElement: tagName "${B}" must contain a hyphen`);let{dirname:M}=await import("node:path"),L=F?M(F):null,E=[];if(Array.isArray(H.$elements))for(let h of H.$elements){let u=A2(h)?h.$ref:h;if(typeof u!=="string")continue;if(L)await V(u,L);let f=W?W(u,L):u.replace(/\.json$/,".js");E.push(f)}let C=n0(B);if(Q)H.$media={...Q,...H.$media};let _=_0(H,C,E),x=F?F.replace(/\.json$/,".js"):`${B}.js`;Y.push({content:_,path:x,tagName:B})}return await V(Z,X.basePath??null),{files:Y}}async function v4(Z,X={}){let{title:W="Jx App",reactivitySrc:Q="https://esm.sh/@vue/reactivity@3.5.13",litHtmlSrc:J="https://esm.sh/lit-html@3.3.0"}=X,Y=await i9(Z,X),G=Y.files.at(-1);if(!G)throw Error("compileElementPage: no element modules were produced");let{basename:V}=await import("node:path"),q=V(G.path),U=`<!DOCTYPE html>
89
89
  <html lang="en">
90
90
  <head>
91
91
  <meta charset="utf-8">
@@ -104,9 +104,9 @@ app.post('${X}/${Z}', async (c) => {
104
104
  <${G.tagName}></${G.tagName}>
105
105
  <script type="module" src="./${q}"></script>
106
106
  </body>
107
- </html>`;return{files:Y.files,html:U}}function k4(Z){if(Z===null||typeof Z!=="object"||Array.isArray(Z))return JSON.stringify(Z);if("default"in Z)return JSON.stringify(Z.default);if(m2(Z))return;if(Z.$prototype==="LocalStorage"||Z.$prototype==="SessionStorage")return JSON.stringify(Z.default??null);if(Z.$prototype==="Request")return"null";return JSON.stringify(Z)}function _0(Z,X,W){let Q=["// Generated by @jxsuite/compiler — do not edit manually"];if(Z.$id)Q.push(`// Source: ${Z.$id}`);for(let F of W)Q.push(`import '${F}';`);let J=new Map,Y=Z.state??{};for(let[F,B]of Object.entries(Y)){let M=B;if(M&&typeof M==="object"&&!Array.isArray(M)&&M.$prototype==="Function"&&M.$src){let L=M.$src;if(!J.has(L))J.set(L,[]);J.get(L).push(F)}}for(let[F,B]of J)Q.push(`import { ${B.join(", ")} } from '${F}';`);Q.push("import { reactive, computed, effect } from '@vue/reactivity';","import { render, html } from 'lit-html';","",`class ${X} extends HTMLElement {`," #dispose = null;",""," constructor() {"," super();");let G=[],V=[],q=[];for(let[F,B]of Object.entries(Y)){let M=B;if(O2(M)){let L=M.$expression;if(h2(L.operator))q.push([F,M]);else V.push([F,M])}else if(k2(M))if(typeof M.body==="string"&&M.body.includes("return"))V.push([F,M]);else q.push([F,M]);else{let L=k4(M);if(L!==void 0)G.push([F,L])}}Q.push(" this.state = reactive({");for(let[F,B]of G)Q.push(` ${F}: ${B},`);Q.push(" });");for(let[F,B]of q)if(Q.push(""),O2(B)){let M=M2(B.$expression,{eventParam:"e",statePrefix:"s"});Q.push(` this.state.${F} = (s, e) => { ${M}; };`)}else{let L=(B.parameters?u2(B.parameters):B.arguments??["state"]).join(", ");if(B.$src)Q.push(` this.state.${F} = (${L}) => ${F}(${L});`);else Q.push(` this.state.${F} = (${L}) => {`,` ${B.body??""}`," };")}for(let[F,B]of V)if(Q.push(""),O2(B)){let M=M2(B.$expression,{eventParam:"e",statePrefix:"this.state"});Q.push(` this.state.${F} = computed(() => ${M});`)}else if(B.$src)Q.push(` this.state.${F} = computed(() => ${F}(this.state));`);else{Q.push(` this.state.${F} = computed(() => {`);let M=(B.body??"").replaceAll("state.","this.state.");Q.push(` ${M}`," });")}Q.push(" }","");let U=[];if(Array.isArray(Z.children)){let F={n:0};for(let B of Z.children)Q0(B,U,Z.$media??{},"",F,Z.tagName)}if(Q.push(" template() {"," const s = this.state;"," return html`",W8(Z.children,Z.style," ")," `;"," }",""," connectedCallback() {"," const _pa = this.getAttribute('data-jx-props');"," if (_pa) {"," try {"," const _p = JSON.parse(_pa);"," for (const [k, v] of Object.entries(_p)) {"," if (k in this.state) this.state[k] = v;"," }"," } catch {}"," this.removeAttribute('data-jx-props');"," }"," for (const key of Object.keys(this.state)) {"," if (this.hasOwnProperty(key) && this[key] !== undefined) {"," this.state[key] = this[key];"," }"," }"),Z.style&&typeof Z.style==="object"){let F=[];for(let[B,M]of Object.entries(Z.style)){if(B.startsWith(":")||B.startsWith(".")||B.startsWith("&")||B.startsWith("[")||B.startsWith("@"))continue;if(M===null||typeof M==="object")continue;let L=J2(B);if(typeof M==="string"&&M.includes("${"))F.push([L,M])}if(F.length>0){Q.push(" effect(() => {");for(let[B,M]of F){let L=M.replaceAll(/\$\{([^}]+)\}/g,(E,C)=>`\${${C.replaceAll("state.","this.state.")}}`);Q.push(` this.style['${B}'] = \`${L}\`;`)}Q.push(" });")}}let H=r9(Z.children);if(H)Q.push(" const _slotted = Array.from(this.childNodes).filter(n => n.nodeType === 1 || (n.nodeType === 3 && n.textContent.trim()));");if(Q.push(" if (this.hasAttribute('data-jx-prerendered')) {"," this.removeAttribute('data-jx-prerendered');"," }"," this.innerHTML = '';"," this.#dispose = effect(() => render(this.template(), this));"),H)Q.push(" const _slot = this.querySelector('slot');"," if (_slot && _slotted.length > 0) {"," for (const n of _slotted) _slot.before(n);"," _slot.remove();"," }");return Q.push(" }",""," disconnectedCallback() {"," if (this.#dispose) { this.#dispose(); this.#dispose = null; }"," }","}","",`customElements.define('${Z.tagName}', ${X});`,""),Q.join(`
107
+ </html>`;return{files:Y.files,html:U}}function y4(Z){if(Z===null||typeof Z!=="object"||Array.isArray(Z))return JSON.stringify(Z);if("default"in Z)return JSON.stringify(Z.default);if(m2(Z))return;if(Z.$prototype==="LocalStorage"||Z.$prototype==="SessionStorage")return JSON.stringify(Z.default??null);if(Z.$prototype==="Request")return"null";return JSON.stringify(Z)}function _0(Z,X,W){let Q=["// Generated by @jxsuite/compiler — do not edit manually"];if(Z.$id)Q.push(`// Source: ${Z.$id}`);for(let F of W)Q.push(`import '${F}';`);let J=new Map,Y=Z.state??{};for(let[F,B]of Object.entries(Y)){let M=B;if(M&&typeof M==="object"&&!Array.isArray(M)&&M.$prototype==="Function"&&M.$src){let L=M.$src;if(!J.has(L))J.set(L,[]);J.get(L).push(F)}}for(let[F,B]of J)Q.push(`import { ${B.join(", ")} } from '${F}';`);Q.push("import { reactive, computed, effect } from '@vue/reactivity';","import { render, html } from 'lit-html';","",`class ${X} extends HTMLElement {`," #dispose = null;",""," constructor() {"," super();");let G=[],V=[],q=[];for(let[F,B]of Object.entries(Y)){let M=B;if(O2(M)){let L=M.$expression;if(h2(L.operator))q.push([F,M]);else V.push([F,M])}else if(k2(M))if(typeof M.body==="string"&&M.body.includes("return"))V.push([F,M]);else q.push([F,M]);else{let L=y4(M);if(L!==void 0)G.push([F,L])}}Q.push(" this.state = reactive({");for(let[F,B]of G)Q.push(` ${F}: ${B},`);Q.push(" });");for(let[F,B]of q)if(Q.push(""),O2(B)){let M=M2(B.$expression,{eventParam:"e",statePrefix:"s"});Q.push(` this.state.${F} = (s, e) => { ${M}; };`)}else{let L=(B.parameters?u2(B.parameters):B.arguments??["state"]).join(", ");if(B.$src)Q.push(` this.state.${F} = (${L}) => ${F}(${L});`);else Q.push(` this.state.${F} = (${L}) => {`,` ${B.body??""}`," };")}for(let[F,B]of V)if(Q.push(""),O2(B)){let M=M2(B.$expression,{eventParam:"e",statePrefix:"this.state"});Q.push(` this.state.${F} = computed(() => ${M});`)}else if(B.$src)Q.push(` this.state.${F} = computed(() => ${F}(this.state));`);else{Q.push(` this.state.${F} = computed(() => {`);let M=(B.body??"").replaceAll("state.","this.state.");Q.push(` ${M}`," });")}Q.push(" }","");let U=[];if(Array.isArray(Z.children)){let F={n:0};for(let B of Z.children)Q0(B,U,Z.$media??{},"",F,Z.tagName)}if(Q.push(" template() {"," const s = this.state;"," return html`",W8(Z.children,Z.style," ")," `;"," }",""," connectedCallback() {"," const _pa = this.getAttribute('data-jx-props');"," if (_pa) {"," try {"," const _p = JSON.parse(_pa);"," for (const [k, v] of Object.entries(_p)) {"," if (k in this.state) this.state[k] = v;"," }"," } catch {}"," this.removeAttribute('data-jx-props');"," }"," for (const key of Object.keys(this.state)) {"," if (this.hasOwnProperty(key) && this[key] !== undefined) {"," this.state[key] = this[key];"," }"," }"),Z.style&&typeof Z.style==="object"){let F=[];for(let[B,M]of Object.entries(Z.style)){if(B.startsWith(":")||B.startsWith(".")||B.startsWith("&")||B.startsWith("[")||B.startsWith("@"))continue;if(M===null||typeof M==="object")continue;let L=J2(B);if(typeof M==="string"&&M.includes("${"))F.push([L,M])}if(F.length>0){Q.push(" effect(() => {");for(let[B,M]of F){let L=M.replaceAll(/\$\{([^}]+)\}/g,(E,C)=>`\${${C.replaceAll("state.","this.state.")}}`);Q.push(` this.style['${B}'] = \`${L}\`;`)}Q.push(" });")}}let H=r9(Z.children);if(H)Q.push(" const _slotted = Array.from(this.childNodes).filter(n => n.nodeType === 1 || (n.nodeType === 3 && n.textContent.trim()));");if(Q.push(" if (this.hasAttribute('data-jx-prerendered')) {"," this.removeAttribute('data-jx-prerendered');"," }"," this.innerHTML = '';"," this.#dispose = effect(() => render(this.template(), this));"),H)Q.push(" const _slot = this.querySelector('slot');"," if (_slot && _slotted.length > 0) {"," for (const n of _slotted) _slot.before(n);"," _slot.remove();"," }");return Q.push(" }",""," disconnectedCallback() {"," if (this.#dispose) { this.#dispose(); this.#dispose = null; }"," }","}","",`customElements.define('${Z.tagName}', ${X});`,""),Q.join(`
108
108
  `)}function W8(Z,X,W){if(!Z)return"";if(G2(Z))return l9(Z,W);if(!Array.isArray(Z))return"";return Z.map((Q)=>G2(Q)?l9(Q,W):n9(Q,W)).join(`
109
- `)}function n9(Z,X){if(typeof Z==="string"){if(Z.includes("${"))return`${X}${z8(Z)}`;return`${X}${d(Z)}`}if(typeof Z==="number"||typeof Z==="boolean")return`${X}${d(String(Z))}`;if(!Z||typeof Z!=="object")return"";let W=Z.tagName??"div",Q=[];if(Z.attributes)for(let[q,U]of Object.entries(Z.attributes))if(U&&typeof U==="object"&&A2(U))Q.push(`${q}="\${${v2(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))Q.push(`${q}="${q1(U)}"`);else Q.push(`${q}="${U}"`);if(Z.id)Q.push(`id="${Z.id}"`);if(Z.className)Q.push(`class="${Z.className}"`);for(let[q,U]of Object.entries(Z)){if(c2.has(q)||q.startsWith("$")||q.startsWith("on")||q==="tagName"||q==="id"||q==="className"||q==="style"||q==="children"||q==="textContent"||q==="innerHTML"||q==="attributes")continue;if(U&&typeof U==="object"&&U.$ref)Q.push(`.${q}="\${${v2(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))Q.push(`.${q}="${q1(U)}"`)}if(Z.$props)for(let[q,U]of Object.entries(Z.$props))if(U&&typeof U==="object"&&U.$ref)Q.push(`.${q}="\${${v2(U.$ref)}}"`);else Q.push(`.${q}="\${${JSON.stringify(U)}}"`);for(let[q,U]of Object.entries(Z)){if(!q.startsWith("on")||q==="observedAttributes")continue;let H=q.slice(2).toLowerCase();if(U&&typeof U==="object"&&U.$ref)Q.push(`@${H}="\${(e) => ${v2(U.$ref)}(s, e)}"`);else if(U&&typeof U==="object"&&"$expression"in U){let F=M2(U.$expression,{eventParam:"e",statePrefix:"s"});Q.push(`@${H}="\${(e) => { ${F}; }}"`)}else if(k2(U))Q.push(`@${H}="\${(e) => { ${g4(U)} }}"`)}let J=o9(Z.style);if(J)Q.push(`style="${J}"`);let Y=Q.length>0?`
109
+ `)}function n9(Z,X){if(typeof Z==="string"){if(Z.includes("${"))return`${X}${z8(Z)}`;return`${X}${d(Z)}`}if(typeof Z==="number"||typeof Z==="boolean")return`${X}${d(String(Z))}`;if(!Z||typeof Z!=="object")return"";let W=Z.tagName??"div",Q=[];if(Z.attributes)for(let[q,U]of Object.entries(Z.attributes))if(U&&typeof U==="object"&&A2(U))Q.push(`${q}="\${${v2(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))Q.push(`${q}="${q1(U)}"`);else Q.push(`${q}="${U}"`);if(Z.id)Q.push(`id="${Z.id}"`);if(Z.className)Q.push(`class="${Z.className}"`);for(let[q,U]of Object.entries(Z)){if(c2.has(q)||q.startsWith("$")||q.startsWith("on")||q==="tagName"||q==="id"||q==="className"||q==="style"||q==="children"||q==="textContent"||q==="innerHTML"||q==="attributes")continue;if(U&&typeof U==="object"&&U.$ref)Q.push(`.${q}="\${${v2(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))Q.push(`.${q}="${q1(U)}"`)}if(Z.$props)for(let[q,U]of Object.entries(Z.$props))if(U&&typeof U==="object"&&U.$ref)Q.push(`.${q}="\${${v2(U.$ref)}}"`);else Q.push(`.${q}="\${${JSON.stringify(U)}}"`);for(let[q,U]of Object.entries(Z)){if(!q.startsWith("on")||q==="observedAttributes")continue;let H=q.slice(2).toLowerCase();if(U&&typeof U==="object"&&U.$ref)Q.push(`@${H}="\${(e) => ${v2(U.$ref)}(s, e)}"`);else if(U&&typeof U==="object"&&"$expression"in U){let F=M2(U.$expression,{eventParam:"e",statePrefix:"s"});Q.push(`@${H}="\${(e) => { ${F}; }}"`)}else if(k2(U))Q.push(`@${H}="\${(e) => { ${m4(U)} }}"`)}let J=o9(Z.style);if(J)Q.push(`style="${J}"`);let Y=Q.length>0?`
110
110
  ${X} ${Q.join(`
111
111
  ${X} `)}`:"";if(new Set(["input","br","hr","img","meta","link"]).has(W))return`${X}<${W}${Y}
112
112
  ${X}>`;let V="";if(Z.$switch){let q=A2(Z.$switch)?Z.$switch.$ref:Z.$switch,U=v2(q),H=Z.cases??{},F=[];for(let[B,M]of Object.entries(H)){if(!M||A2(M))continue;let L=n9(M,`${X} `);F.push(` ${JSON.stringify(B)}: html\`
@@ -117,14 +117,14 @@ ${F.join(`,
117
117
  }[${U}]}`}else if(Z.textContent!==void 0)V=z8(Z.textContent);else if(Z.innerHTML!==void 0)V=Z.innerHTML;else if(Z.children)V=`
118
118
  ${W8(Z.children,Z.style,`${X} `)}
119
119
  ${X}`;return`${X}<${W}${Y}
120
- ${X}>${V}</${W}>`}function l9(Z,X){let W=A2(Z.items)?v2(Z.items.$ref):"ITEMS",Q=Z.map;if(!Q)return"";let J=Q.tagName??"div",Y=[];if(Q.$props)for(let[U,H]of Object.entries(Q.$props))if(A2(H))Y.push(`.${U}="\${${b4(H.$ref)}}"`);else Y.push(`.${U}="\${${JSON.stringify(H)}}"`);let G=o9(Q.style);if(G)Y.push(`style="${G}"`);for(let[U,H]of Object.entries(Q)){if(!U.startsWith("on"))continue;let F=U.slice(2).toLowerCase();if(A2(H))Y.push(`@${F}="\${(e) => ${v2(H.$ref)}(s, e)}"`);else if(O2(H)){let B=M2(H.$expression,{eventParam:"e",statePrefix:"s"});Y.push(`@${F}="\${(e) => { ${B}; }}"`)}}let V=Y.length>0?`
120
+ ${X}>${V}</${W}>`}function l9(Z,X){let W=A2(Z.items)?v2(Z.items.$ref):"ITEMS",Q=Z.map;if(!Q)return"";let J=Q.tagName??"div",Y=[];if(Q.$props)for(let[U,H]of Object.entries(Q.$props))if(A2(H))Y.push(`.${U}="\${${h4(H.$ref)}}"`);else Y.push(`.${U}="\${${JSON.stringify(H)}}"`);let G=o9(Q.style);if(G)Y.push(`style="${G}"`);for(let[U,H]of Object.entries(Q)){if(!U.startsWith("on"))continue;let F=U.slice(2).toLowerCase();if(A2(H))Y.push(`@${F}="\${(e) => ${v2(H.$ref)}(s, e)}"`);else if(O2(H)){let B=M2(H.$expression,{eventParam:"e",statePrefix:"s"});Y.push(`@${F}="\${(e) => { ${B}; }}"`)}}let V=Y.length>0?`
121
121
  ${X} ${Y.join(`
122
122
  ${X} `)}`:"",q="";if(Q.textContent!==void 0)q=z8(Q.textContent);else if(Q.children)q=`
123
123
  ${W8(Q.children,null,`${X} `)}
124
124
  ${X} `;return`${X}\${${W}.map((item, index) => html\`
125
125
  ${X} <${J}${V}
126
126
  ${X} >${q}</${J}>
127
- ${X}\`)}`}function v2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return`s.${Z}`}function b4(Z){if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return v2(Z)}function q1(Z){return Z.replaceAll("state.","s.")}function z8(Z){if(Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string")return`\${${v2(Z.$ref)}}`;if(typeof Z==="string"&&Z.includes("${"))return q1(Z);return String(Z)}function g4(Z){return(Z.body??"").replaceAll(/(?<!this\.)state\./g,"s.").replaceAll(/(?<!this\.)state(?!\.)/g,"s")}function o9(Z){if(!Z||typeof Z!=="object")return"";let X=[];for(let[W,Q]of Object.entries(Z)){if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")||W.startsWith("@"))continue;if(Q===null||typeof Q==="object")continue;if(typeof Q==="string"&&Q.includes("${")){let J=J2(W);X.push(`${J}: ${q1(Q)}`)}}return X.join("; ")}function r9(Z){if(!Array.isArray(Z))return!1;for(let X of Z){if(!X||typeof X!=="object")continue;if(X.tagName==="slot")return!0;if(r9(X.children))return!0}return!1}var U1=p(()=>{A0();n2();f2();t1()});function s9(Z,X){let{title:W="Jx App",reactivitySrc:Q,litHtmlSrc:J}=X,Y=G0(Z,null,Z.state??{},Z.$media??{}),G=J0(Z,Z.$media??{},X.projectStyle??null),V=[],q=a9(Z,!1,Z,Y,V),U=[],H="",F="";if(V.length>0){for(let M of V){let L=_0(M.def,M.className,[]);U.push({content:L,path:`_islands/${M.tagName}.js`,tagName:M.tagName})}H=`<script type="importmap">
127
+ ${X}\`)}`}function v2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return`s.${Z}`}function h4(Z){if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return v2(Z)}function q1(Z){return Z.replaceAll("state.","s.")}function z8(Z){if(Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string")return`\${${v2(Z.$ref)}}`;if(typeof Z==="string"&&Z.includes("${"))return q1(Z);return String(Z)}function m4(Z){return(Z.body??"").replaceAll(/(?<!this\.)state\./g,"s.").replaceAll(/(?<!this\.)state(?!\.)/g,"s")}function o9(Z){if(!Z||typeof Z!=="object")return"";let X=[];for(let[W,Q]of Object.entries(Z)){if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")||W.startsWith("@"))continue;if(Q===null||typeof Q==="object")continue;if(typeof Q==="string"&&Q.includes("${")){let J=J2(W);X.push(`${J}: ${q1(Q)}`)}}return X.join("; ")}function r9(Z){if(!Array.isArray(Z))return!1;for(let X of Z){if(!X||typeof X!=="object")continue;if(X.tagName==="slot")return!0;if(r9(X.children))return!0}return!1}var U1=p(()=>{A0();n2();f2();t1()});function s9(Z,X){let{title:W="Jx App",reactivitySrc:Q,litHtmlSrc:J}=X,Y=G0(Z,null,Z.state??{},Z.$media??{}),G=J0(Z,Z.$media??{},X.projectStyle??null),V=[],q=a9(Z,!1,Z,Y,V),U=[],H="",F="";if(V.length>0){for(let M of V){let L=_0(M.def,M.className,[]);U.push({content:L,path:`_islands/${M.tagName}.js`,tagName:M.tagName})}H=`<script type="importmap">
128
128
  {
129
129
  "imports": {
130
130
  "@vue/reactivity": "${Q}",
@@ -145,8 +145,8 @@ ${X}\`)}`}function v2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).repla
145
145
  ${q}
146
146
  ${F}
147
147
  </body>
148
- </html>`;return{files:U,html:B}}function a9(Z,X,W,Q,J){if(typeof Z==="string")return d(Z);if(typeof Z==="number"||typeof Z==="boolean")return d(String(Z));if(!Z||typeof Z!=="object")return"";let Y=G0(W,Q.scope,W?.state??Q.scopeDefs,W?.$media??Q.media);if(X){let U=J.length,H=`jx-island-${U}`,F=`JxIsland${U}`,B={...W??Z,tagName:H};return J.push({className:F,def:B,tagName:H}),`<${H}></${H}>`}let G=Z.tagName??"div",V=W0(Z,Y.scope);if(j1.has(G))return`<${G}${V}>`;let q=v4(Z,W,Y,J);return`<${G}${V}>${q}</${G}>`}function v4(Z,X,W,Q){let J=X??Z;if(J.textContent!==void 0){let Y=t(J.textContent,W.scope);return Y==null?"":d(String(Y))}if(J.innerHTML)return t(J.innerHTML,W.scope)??J.innerHTML;if(Array.isArray(J.children)){let Y=Array.isArray(X?.children)?X.children:void 0;return J.children.map((G,V)=>{let q=G,U=A8(q),H=Y?.[V]??G;return a9(q,U,H,W,Q)}).join(`
149
- `)}return""}var t9=p(()=>{n2();U1()});function G8(Z,X){let{title:W="Jx App",reactivitySrc:Q=d0,litHtmlSrc:J=l0,modulePath:Y="app.js"}=X,G=G0(Z,null,Z.state??{},Z.$media??{}),V=J0(Z,Z.$media??{},X.projectStyle??null),q={h:0,l:0,m:0,needsLit:!1,s:0,sw:0,t:0},U=new Map,H=new Map,F=[],B=[],M=[],L=[],E=[],C=new Map,_=Z.state??{};for(let[y,b]of Object.entries(_)){if(b===null||typeof b!=="object"||Array.isArray(b)){if(typeof b==="string"&&i(b))B.push([y,`() => \`${b}\``]);else F.push([y,b]);continue}if(O2(b)){let l=b.$expression,Q2=M2(l,{eventParam:"e",statePrefix:"state"});if(h2(l.operator))L.push([y,{args:["state","e"],body:Q2}]);else B.push([y,`() => ${Q2}`]);continue}if(k2(b)){let l=b.parameters?u2(b.parameters):b.arguments;if(b.$src){if(!C.has(b.$src))C.set(b.$src,new Set);C.get(b.$src).add(y),B.push([y,`() => { return ${y}(state); }`])}else if(b.body&&b.body.includes("return"))B.push([y,`() => { ${b.body} }`]);else L.push([y,{args:l??["state"],body:b.body}]);continue}if(m2(b))continue;if(M8(b)){F.push([y,b.default]);continue}if(L0(b)){if(b.$prototype==="LocalStorage"||b.$prototype==="SessionStorage"){let l=b.$prototype==="LocalStorage"?"localStorage":"sessionStorage",Q2=b.key??y,B2=b.default??null;F.push([y,null]),E.push(m4(y,l,Q2,B2));continue}if(b.$prototype==="Request"){F.push([y,null]),E.push(h4(y,b));continue}if(b.$prototype==="Cookie"){F.push([y,null]),E.push(u4(y,b.name??y,b.default??null));continue}}F.push([y,b])}let x=e9(Z,Z,G,U,H,q);for(let[y,b]of U)if(!M.some(([l])=>l===y))M.push([y,b]);for(let[y,b]of H)if(!L.some(([l])=>l===y))L.push([y,b]);let h=y4(F,B,M,L,E,C,q,Q),u=[` "@vue/reactivity": "${Q}"`,` "lit-html": "${J}"`],f=`<!DOCTYPE html>
148
+ </html>`;return{files:U,html:B}}function a9(Z,X,W,Q,J){if(typeof Z==="string")return d(Z);if(typeof Z==="number"||typeof Z==="boolean")return d(String(Z));if(!Z||typeof Z!=="object")return"";let Y=G0(W,Q.scope,W?.state??Q.scopeDefs,W?.$media??Q.media);if(X){let U=J.length,H=`jx-island-${U}`,F=`JxIsland${U}`,B={...W??Z,tagName:H};return J.push({className:F,def:B,tagName:H}),`<${H}></${H}>`}let G=Z.tagName??"div",V=W0(Z,Y.scope);if(j1.has(G))return`<${G}${V}>`;let q=u4(Z,W,Y,J);return`<${G}${V}>${q}</${G}>`}function u4(Z,X,W,Q){let J=X??Z;if(J.textContent!==void 0){let Y=t(J.textContent,W.scope);return Y==null?"":d(String(Y))}if(J.innerHTML)return t(J.innerHTML,W.scope)??J.innerHTML;if(Array.isArray(J.children)){let Y=Array.isArray(X?.children)?X.children:void 0;return J.children.map((G,V)=>{let q=G,U=A8(q),H=Y?.[V]??G;return a9(q,U,H,W,Q)}).join(`
149
+ `)}return""}var t9=p(()=>{n2();U1()});function G8(Z,X){let{title:W="Jx App",reactivitySrc:Q=d0,litHtmlSrc:J=l0,modulePath:Y="app.js"}=X,G=G0(Z,null,Z.state??{},Z.$media??{}),V=J0(Z,Z.$media??{},X.projectStyle??null),q={h:0,l:0,m:0,needsLit:!1,s:0,sw:0,t:0},U=new Map,H=new Map,F=[],B=[],M=[],L=[],E=[],C=new Map,_=Z.state??{};for(let[y,b]of Object.entries(_)){if(b===null||typeof b!=="object"||Array.isArray(b)){if(typeof b==="string"&&i(b))B.push([y,`() => \`${b}\``]);else F.push([y,b]);continue}if(O2(b)){let l=b.$expression,Q2=M2(l,{eventParam:"e",statePrefix:"state"});if(h2(l.operator))L.push([y,{args:["state","e"],body:Q2}]);else B.push([y,`() => ${Q2}`]);continue}if(k2(b)){let l=b.parameters?u2(b.parameters):b.arguments;if(b.$src){if(!C.has(b.$src))C.set(b.$src,new Set);C.get(b.$src).add(y),B.push([y,`() => { return ${y}(state); }`])}else if(b.body&&b.body.includes("return"))B.push([y,`() => { ${b.body} }`]);else L.push([y,{args:l??["state"],body:b.body}]);continue}if(m2(b))continue;if(M8(b)){F.push([y,b.default]);continue}if(L0(b)){if(b.$prototype==="LocalStorage"||b.$prototype==="SessionStorage"){let l=b.$prototype==="LocalStorage"?"localStorage":"sessionStorage",Q2=b.key??y,B2=b.default??null;F.push([y,null]),E.push(p4(y,l,Q2,B2));continue}if(b.$prototype==="Request"){F.push([y,null]),E.push(c4(y,b));continue}if(b.$prototype==="Cookie"){F.push([y,null]),E.push(d4(y,b.name??y,b.default??null));continue}}F.push([y,b])}let x=e9(Z,Z,G,U,H,q);for(let[y,b]of U)if(!M.some(([l])=>l===y))M.push([y,b]);for(let[y,b]of H)if(!L.some(([l])=>l===y))L.push([y,b]);let h=f4(F,B,M,L,E,C,q,Q),u=[` "@vue/reactivity": "${Q}"`,` "lit-html": "${J}"`],f=`<!DOCTYPE html>
150
150
  <html lang="en">
151
151
  <head>
152
152
  <meta charset="utf-8">
@@ -175,13 +175,13 @@ ${u.join(`,
175
175
  `;else if(Array.isArray(Z.children))Q=`
176
176
  ${Z.children.map((Y)=>Z3(Y)).join(`
177
177
  `)}
178
- `;if(new Set(["input","br","hr","img","meta","link"]).has(X))return`<${X}${W}>`;return`<${X}${W}>${Q}</${X}>`}function Z3(Z){if(typeof Z==="string")return i(Z)?a2(Z):d(Z);if(typeof Z==="number"||typeof Z==="boolean")return d(String(Z));if(G2(Z))return X3(Z);return J8(Z)}function X3(Z){let{items:X}=Z,W=I2(X)?`state.${p2(X.$ref)}`:JSON.stringify(X??[]),Q=J8(Z.map);return`\${(${W} ?? []).map((item, index) => html\`${Q}\`)}`}function a2(Z){return Z.replaceAll("$map.","")}function y4(Z,X,W,Q,J,Y,G,V){let q=[],{needsLit:U}=G,H=X.length>0;q.push("// Generated by @jxsuite/compiler — do not edit manually");let F=["reactive","effect"];if(H)F.push("computed");if(q.push(`import { ${F.join(", ")} } from '@vue/reactivity';`),U)q.push("import { html, render } from 'lit-html';");for(let[B,M]of Y)q.push(`import { ${[...M].join(", ")} } from '${B}';`);q.push("","const state = reactive({");for(let[B,M]of Z)q.push(` ${B}: ${JSON.stringify(M)},`);if(q.push("});",""),J.length>0){for(let B of J)q.push(B);q.push("")}if(X.length>0){for(let[B,M]of X)q.push(`state.${B} = computed(${M});`);q.push("")}if(W.length>0){q.push("const bind = {");for(let[B,M]of W)q.push(` ${B}: ${M},`);q.push("};")}else q.push("const bind = {};");if(q.push(""),Q.length>0){q.push("const on = {");for(let[B,M]of Q){let L=M.args??["state"],E=L.map((C)=>C==="state"?"state":"e").join(", ");q.push(` ${B}: (e) => { const fn = (${L.join(", ")}) => { ${M.body} }; fn(${E}); },`)}q.push("};")}else q.push("const on = {};");if(q.push("","function hydrate(root) {"," root.querySelectorAll('[data-bind]').forEach(el => {"," [...el.attributes].forEach(a => {"," if (a.name.startsWith(':')) {"," const parts = a.name.slice(1).split('.');"," const key = a.value;"),U)q.push(" if (parts[0] === 'render') {"," effect(() => { render(bind[key](), el); });"," } else if (parts[0] === 'style' && parts.length > 1) {");else q.push(" if (parts[0] === 'style' && parts.length > 1) {");return q.push(" effect(() => { el.style[parts[1]] = bind[key](); });"," } else if (parts[0] === 'attr' && parts.length > 1) {"," effect(() => { el.setAttribute(parts[1], bind[key]()); });"," } else {"," const prop = parts[0].replace(/-([a-z])/g, (_, c) => c.toUpperCase());"," effect(() => { el[prop] = bind[key](); });"," }"," } else if (a.name.startsWith('@')) {"," el.addEventListener(a.name.slice(1), on[a.value]);"," }"," });"," });","}","","hydrate(document);",""),q.join(`
179
- `)}function h4(Z,X){let{url:W}=X,Q=X.method??"GET",J=i(W);if(X.manual)return`// ${Z}: manual Request — fetch triggered by user action`;let Y=[`// ${Z}: auto-fetch from ${J?"(dynamic URL)":W}`,"effect(() => {"];if(J)Y.push(` const url = \`${W}\`;`,' if (!url || url === "undefined" || url.includes("undefined")) return;');else Y.push(` const url = ${JSON.stringify(W)};`);let G=[];if(Q!=="GET")G.push(`method: ${JSON.stringify(Q)}`);if(X.headers)G.push(`headers: ${JSON.stringify(X.headers)}`);if(X.body){let q=typeof X.body==="object"?JSON.stringify(JSON.stringify(X.body)):JSON.stringify(X.body);G.push(`body: ${q}`)}let V=G.length>0?`, { ${G.join(", ")} }`:"";return Y.push(` fetch(url${V})`," .then(r => r.ok ? r.json() : Promise.reject(r.statusText))",` .then(d => { state.${Z} = d; })`,` .catch(e => { state.${Z} = { error: String(e) }; });`,"});"),Y.join(`
180
- `)}function m4(Z,X,W,Q){return[`// ${Z}: ${X} (key: "${W}")`,"try {",` const _s = ${X}.getItem(${JSON.stringify(W)});`,` state.${Z} = _s !== null ? JSON.parse(_s) : ${JSON.stringify(Q)};`,`} catch { state.${Z} = ${JSON.stringify(Q)}; }`,"effect(() => {",` const v = state.${Z};`," try {",` if (v === null) ${X}.removeItem(${JSON.stringify(W)});`,` else ${X}.setItem(${JSON.stringify(W)}, JSON.stringify(v));`," } catch {}","});"].join(`
181
- `)}function u4(Z,X,W){return[`// ${Z}: Cookie (name: "${X}")`,"{",` const _m = document.cookie.match(new RegExp("(?:^|; )${X}=([^;]*)"));`,` try { state.${Z} = _m ? JSON.parse(decodeURIComponent(_m[1])) : ${JSON.stringify(W)}; }`,` catch { state.${Z} = _m ? _m[1] : ${JSON.stringify(W)}; }`,"}"].join(`
182
- `)}function p2(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replaceAll("/","_");return Z.replaceAll("/","_")}function Q8(Z,X,W){if(Z.has(X))return;if(W.startsWith("#/state/")){let J=W.slice(8).split("/");Z.set(X,`() => state.${J.join(".")}`)}else Z.set(X,`() => state.${W}`)}var Y8=p(()=>{A0();n2();f2()});var W3={};U8(W3,{compileClassJson:()=>f4});function f4(Z,X={}){let W=Z.title;if(!W)throw Error("compileClassJson: missing title (class name)");let Q=c4(Z.extends),J=Z.$defs,Y=J?.fields??{},G=J?.constructor,V=typeof G==="object"?G:void 0,q=J?.methods??{},U=["// Generated by @jxsuite/compiler from .class.json — do not edit manually"];if(Z.$id)U.push(`// Source: ${Z.$id}`);U.push("");let H=Q!=="Object"?` extends ${Q}`:"";U.push(`class ${W}${H} {`);for(let[F,B]of Object.entries(Y)){if(B.scope!=="static")continue;let M=B.identifier??F,L=B.access==="private"?"#":"",E=B.initializer!==void 0?JSON.stringify(B.initializer):B.default!==void 0?JSON.stringify(B.default):"null";U.push(` static ${L}${M} = ${E};`)}for(let[F,B]of Object.entries(Y)){if(B.scope==="static")continue;if(B.access!=="private")continue;let M=B.identifier??F;U.push(` #${M};`)}if(Object.keys(Y).length>0)U.push("");if(U.push(" constructor(config = {}) {"),V?.superCall||Q!=="Object"){let F=V?.superCall?.arguments?V.superCall.arguments.join(", "):"";U.push(` super(${F});`)}for(let[F,B]of Object.entries(Y)){if(B.scope==="static")continue;let M=B.identifier??F,L=B.access==="private"?"#":"",E=B.initializer!==void 0?JSON.stringify(B.initializer):B.default!==void 0?JSON.stringify(B.default):"null";U.push(` this.${L}${M} = config.${M} !== undefined ? config.${M} : ${E};`)}if(V?.body){let F=Array.isArray(V.body)?V.body:[V.body];for(let B of F)U.push(` ${B}`)}U.push(" }");for(let[F,B]of Object.entries(q)){let M=B.identifier??F,L=B.scope==="static",C=B.access==="private"?"#":"",_=L?"static ":"",x=B.returnType?.$ref?.includes("Promise")||d4(B)?"async ":"",h=z3(B.parameters??[]),u=p4(B.body);if(U.push(""),B.role==="accessor"){if(B.getter)U.push(` ${_}get ${C}${M}() {`,` ${B.getter.body}`," }");if(B.setter){let f=z3(B.setter.parameters??[]);U.push(` ${_}set ${C}${M}(${f}) {`,` ${B.setter.body}`," }")}}else{U.push(` ${_}${x}${C}${M}(${h}) {`);for(let f of u)U.push(` ${f}`);U.push(" }")}}return U.push("}","",`export { ${W} };`,`export default ${W};`,""),U.join(`
183
- `)}function c4(Z){if(!Z)return"Object";if(typeof Z==="string")return Z;if(Z.$ref){let X=Z.$ref.match(/([A-Za-z0-9_]+)\.class\.json/);return X?X[1]:"Object"}return"Object"}function z3(Z){return Z.map((X)=>{if(X.$ref)return X.$ref.split("/").pop();let W=X.identifier??X.name;return typeof W==="string"?W:"arg"}).join(", ")}function p4(Z){if(!Z)return[""];return Array.isArray(Z)?Z:[Z]}function d4(Z){return(Array.isArray(Z.body)?Z.body.join(`
184
- `):Z.body??"").includes("await ")}import{readFileSync as l4}from"node:fs";async function i4(Z,X={}){let{title:W="Jx App",reactivitySrc:Q=d0,litHtmlSrc:J=l0,projectStyle:Y=null}=X,G;if(typeof Z==="string"){let V=l4(Z,"utf8");if(Z.endsWith(".json"))G=J1(V,Z);else{let{extname:q}=await import("node:path"),U=q(Z).toLowerCase(),H=X.formats?.byExtension?.(U,"parse");if(!H){let{unknownFormatError:F}=await Promise.resolve().then(() => (X8(),Z8));throw F(Z,U)}G=await H.call("parse",V)}}else G=Z;if(D8(G)){let{compileClassJson:V}=await Promise.resolve().then(() => W3),q=V(G,X),U=typeof Z==="string"?Z.replace(/\.class\.json$/,".js"):`${G.title}.js`;return{files:[{content:q,path:U}],html:""}}if(!i0(G))return s9(G,{litHtmlSrc:J,projectStyle:Y,reactivitySrc:Q,title:W});if(G.tagName&&G.tagName.includes("-")){let{tagName:V}=G,q=n0(V),H={content:_0(G,q,[]),path:`${V}.js`,tagName:V},F=J0(G,G.$media??{}),B=`<!DOCTYPE html>
178
+ `;if(new Set(["input","br","hr","img","meta","link"]).has(X))return`<${X}${W}>`;return`<${X}${W}>${Q}</${X}>`}function Z3(Z){if(typeof Z==="string")return i(Z)?a2(Z):d(Z);if(typeof Z==="number"||typeof Z==="boolean")return d(String(Z));if(G2(Z))return X3(Z);return J8(Z)}function X3(Z){let{items:X}=Z,W=I2(X)?`state.${p2(X.$ref)}`:JSON.stringify(X??[]),Q=J8(Z.map);return`\${(${W} ?? []).map((item, index) => html\`${Q}\`)}`}function a2(Z){return Z.replaceAll("$map.","")}function f4(Z,X,W,Q,J,Y,G,V){let q=[],{needsLit:U}=G,H=X.length>0;q.push("// Generated by @jxsuite/compiler — do not edit manually");let F=["reactive","effect"];if(H)F.push("computed");if(q.push(`import { ${F.join(", ")} } from '@vue/reactivity';`),U)q.push("import { html, render } from 'lit-html';");for(let[B,M]of Y)q.push(`import { ${[...M].join(", ")} } from '${B}';`);q.push("","const state = reactive({");for(let[B,M]of Z)q.push(` ${B}: ${JSON.stringify(M)},`);if(q.push("});",""),J.length>0){for(let B of J)q.push(B);q.push("")}if(X.length>0){for(let[B,M]of X)q.push(`state.${B} = computed(${M});`);q.push("")}if(W.length>0){q.push("const bind = {");for(let[B,M]of W)q.push(` ${B}: ${M},`);q.push("};")}else q.push("const bind = {};");if(q.push(""),Q.length>0){q.push("const on = {");for(let[B,M]of Q){let L=M.args??["state"],E=L.map((C)=>C==="state"?"state":"e").join(", ");q.push(` ${B}: (e) => { const fn = (${L.join(", ")}) => { ${M.body} }; fn(${E}); },`)}q.push("};")}else q.push("const on = {};");if(q.push("","function hydrate(root) {"," root.querySelectorAll('[data-bind]').forEach(el => {"," [...el.attributes].forEach(a => {"," if (a.name.startsWith(':')) {"," const parts = a.name.slice(1).split('.');"," const key = a.value;"),U)q.push(" if (parts[0] === 'render') {"," effect(() => { render(bind[key](), el); });"," } else if (parts[0] === 'style' && parts.length > 1) {");else q.push(" if (parts[0] === 'style' && parts.length > 1) {");return q.push(" effect(() => { el.style[parts[1]] = bind[key](); });"," } else if (parts[0] === 'attr' && parts.length > 1) {"," effect(() => { el.setAttribute(parts[1], bind[key]()); });"," } else {"," const prop = parts[0].replace(/-([a-z])/g, (_, c) => c.toUpperCase());"," effect(() => { el[prop] = bind[key](); });"," }"," } else if (a.name.startsWith('@')) {"," el.addEventListener(a.name.slice(1), on[a.value]);"," }"," });"," });","}","","hydrate(document);",""),q.join(`
179
+ `)}function c4(Z,X){let{url:W}=X,Q=X.method??"GET",J=i(W);if(X.manual)return`// ${Z}: manual Request — fetch triggered by user action`;let Y=[`// ${Z}: auto-fetch from ${J?"(dynamic URL)":W}`,"effect(() => {"];if(J)Y.push(` const url = \`${W}\`;`,' if (!url || url === "undefined" || url.includes("undefined")) return;');else Y.push(` const url = ${JSON.stringify(W)};`);let G=[];if(Q!=="GET")G.push(`method: ${JSON.stringify(Q)}`);if(X.headers)G.push(`headers: ${JSON.stringify(X.headers)}`);if(X.body){let q=typeof X.body==="object"?JSON.stringify(JSON.stringify(X.body)):JSON.stringify(X.body);G.push(`body: ${q}`)}let V=G.length>0?`, { ${G.join(", ")} }`:"";return Y.push(` fetch(url${V})`," .then(r => r.ok ? r.json() : Promise.reject(r.statusText))",` .then(d => { state.${Z} = d; })`,` .catch(e => { state.${Z} = { error: String(e) }; });`,"});"),Y.join(`
180
+ `)}function p4(Z,X,W,Q){return[`// ${Z}: ${X} (key: "${W}")`,"try {",` const _s = ${X}.getItem(${JSON.stringify(W)});`,` state.${Z} = _s !== null ? JSON.parse(_s) : ${JSON.stringify(Q)};`,`} catch { state.${Z} = ${JSON.stringify(Q)}; }`,"effect(() => {",` const v = state.${Z};`," try {",` if (v === null) ${X}.removeItem(${JSON.stringify(W)});`,` else ${X}.setItem(${JSON.stringify(W)}, JSON.stringify(v));`," } catch {}","});"].join(`
181
+ `)}function d4(Z,X,W){return[`// ${Z}: Cookie (name: "${X}")`,"{",` const _m = document.cookie.match(new RegExp("(?:^|; )${X}=([^;]*)"));`,` try { state.${Z} = _m ? JSON.parse(decodeURIComponent(_m[1])) : ${JSON.stringify(W)}; }`,` catch { state.${Z} = _m ? _m[1] : ${JSON.stringify(W)}; }`,"}"].join(`
182
+ `)}function p2(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replaceAll("/","_");return Z.replaceAll("/","_")}function Q8(Z,X,W){if(Z.has(X))return;if(W.startsWith("#/state/")){let J=W.slice(8).split("/");Z.set(X,`() => state.${J.join(".")}`)}else Z.set(X,`() => state.${W}`)}var Y8=p(()=>{A0();n2();f2()});var W3={};U8(W3,{compileClassJson:()=>l4});function l4(Z,X={}){let W=Z.title;if(!W)throw Error("compileClassJson: missing title (class name)");let Q=i4(Z.extends),J=Z.$defs,Y=J?.fields??{},G=J?.constructor,V=typeof G==="object"?G:void 0,q=J?.methods??{},U=["// Generated by @jxsuite/compiler from .class.json — do not edit manually"];if(Z.$id)U.push(`// Source: ${Z.$id}`);U.push("");let H=Q!=="Object"?` extends ${Q}`:"";U.push(`class ${W}${H} {`);for(let[F,B]of Object.entries(Y)){if(B.scope!=="static")continue;let M=B.identifier??F,L=B.access==="private"?"#":"",E=B.initializer!==void 0?JSON.stringify(B.initializer):B.default!==void 0?JSON.stringify(B.default):"null";U.push(` static ${L}${M} = ${E};`)}for(let[F,B]of Object.entries(Y)){if(B.scope==="static")continue;if(B.access!=="private")continue;let M=B.identifier??F;U.push(` #${M};`)}if(Object.keys(Y).length>0)U.push("");if(U.push(" constructor(config = {}) {"),V?.superCall||Q!=="Object"){let F=V?.superCall?.arguments?V.superCall.arguments.join(", "):"";U.push(` super(${F});`)}for(let[F,B]of Object.entries(Y)){if(B.scope==="static")continue;let M=B.identifier??F,L=B.access==="private"?"#":"",E=B.initializer!==void 0?JSON.stringify(B.initializer):B.default!==void 0?JSON.stringify(B.default):"null";U.push(` this.${L}${M} = config.${M} !== undefined ? config.${M} : ${E};`)}if(V?.body){let F=Array.isArray(V.body)?V.body:[V.body];for(let B of F)U.push(` ${B}`)}U.push(" }");for(let[F,B]of Object.entries(q)){let M=B.identifier??F,L=B.scope==="static",C=B.access==="private"?"#":"",_=L?"static ":"",x=B.returnType?.$ref?.includes("Promise")||o4(B)?"async ":"",h=z3(B.parameters??[]),u=n4(B.body);if(U.push(""),B.role==="accessor"){if(B.getter)U.push(` ${_}get ${C}${M}() {`,` ${B.getter.body}`," }");if(B.setter){let f=z3(B.setter.parameters??[]);U.push(` ${_}set ${C}${M}(${f}) {`,` ${B.setter.body}`," }")}}else{U.push(` ${_}${x}${C}${M}(${h}) {`);for(let f of u)U.push(` ${f}`);U.push(" }")}}return U.push("}","",`export { ${W} };`,`export default ${W};`,""),U.join(`
183
+ `)}function i4(Z){if(!Z)return"Object";if(typeof Z==="string")return Z;if(Z.$ref){let X=Z.$ref.match(/([A-Za-z0-9_]+)\.class\.json/);return X?X[1]:"Object"}return"Object"}function z3(Z){return Z.map((X)=>{if(X.$ref)return X.$ref.split("/").pop();let W=X.identifier??X.name;return typeof W==="string"?W:"arg"}).join(", ")}function n4(Z){if(!Z)return[""];return Array.isArray(Z)?Z:[Z]}function o4(Z){return(Array.isArray(Z.body)?Z.body.join(`
184
+ `):Z.body??"").includes("await ")}import{readFileSync as r4}from"node:fs";async function s4(Z,X={}){let{title:W="Jx App",reactivitySrc:Q=d0,litHtmlSrc:J=l0,projectStyle:Y=null}=X,G;if(typeof Z==="string"){let V=r4(Z,"utf8");if(Z.endsWith(".json"))G=J1(V,Z);else{let{extname:q}=await import("node:path"),U=q(Z).toLowerCase(),H=X.formats?.byExtension?.(U,"parse");if(!H){let{unknownFormatError:F}=await Promise.resolve().then(() => (X8(),Z8));throw F(Z,U)}G=await H.call("parse",V)}}else G=Z;if(D8(G)){let{compileClassJson:V}=await Promise.resolve().then(() => W3),q=V(G,X),U=typeof Z==="string"?Z.replace(/\.class\.json$/,".js"):`${G.title}.js`;return{files:[{content:q,path:U}],html:""}}if(!i0(G))return s9(G,{litHtmlSrc:J,projectStyle:Y,reactivitySrc:Q,title:W});if(G.tagName&&G.tagName.includes("-")){let{tagName:V}=G,q=n0(V),H={content:_0(G,q,[]),path:`${V}.js`,tagName:V},F=J0(G,G.$media??{}),B=`<!DOCTYPE html>
185
185
  <html lang="en">
186
186
  <head>
187
187
  <meta charset="utf-8">
@@ -201,4 +201,4 @@ ${u.join(`,
201
201
  <${V}></${V}>
202
202
  <script type="module" src="./${V}.js"></script>
203
203
  </body>
204
- </html>`;return{files:[H],html:B}}return G8(G,{litHtmlSrc:J,projectStyle:Y,reactivitySrc:Q,title:W})}async function S7(Z,X){let[W,Q]=await Promise.all([i4(Z),r1(Z)]),{writeFileSync:J,mkdirSync:Y}=await import("node:fs"),{dirname:G,join:V}=await import("node:path");if(X){J(X,W.html,"utf8"),console.error(`Written to ${X}`);let q=G(X);for(let U of W.files){let H=V(q,U.path);Y(G(H),{recursive:!0}),J(H,U.content,"utf8"),console.error(`Written to ${H}`)}}else process.stdout.write(W.html);if(Q&&X){let q=X.replace(/(\.[^.]+)?$/,"-server.js");J(q,Q,"utf8"),console.error(`Server handler written to ${q}`)}}var n4=p(()=>{n2();s1();U1();t9();Y8();f2();t1();n2();s1();U1();Y8()});n4();export{S7 as runCli,i0 as isDynamic,w4 as compileSiteServer,r1 as compileServer,S4 as compileElementPage,i9 as compileElement,G8 as compileClient,i4 as compile};
204
+ </html>`;return{files:[H],html:B}}return G8(G,{litHtmlSrc:J,projectStyle:Y,reactivitySrc:Q,title:W})}async function v7(Z,X){let[W,Q]=await Promise.all([s4(Z),r1(Z)]),{writeFileSync:J,mkdirSync:Y}=await import("node:fs"),{dirname:G,join:V}=await import("node:path");if(X){J(X,W.html,"utf8"),console.error(`Written to ${X}`);let q=G(X);for(let U of W.files){let H=V(q,U.path);Y(G(H),{recursive:!0}),J(H,U.content,"utf8"),console.error(`Written to ${H}`)}}else process.stdout.write(W.html);if(Q&&X){let q=X.replace(/(\.[^.]+)?$/,"-server.js");J(q,Q,"utf8"),console.error(`Server handler written to ${q}`)}}var a4=p(()=>{n2();s1();U1();t9();Y8();f2();t1();n2();s1();U1();Y8()});a4();export{v7 as runCli,i0 as isDynamic,N4 as compileSiteServer,r1 as compileServer,v4 as compileElementPage,i9 as compileElement,G8 as compileClient,s4 as compile};