Something went wrong. Try again.
jetstream v2 in zig stream.waow.tech
Something went wrong. Try again.
12var D=class{name;constructor(e){this.name=e?.replace(/[^A-Za-z0-9_$]/g,"_")}},te=Symbol(),P=class F{strings;values;#e;constructor(t,n,s){this.strings=t,this.values=n,this.#e=s}eval(){let t=new Map,n=[],s=[],i=0,p=r=>{let a=r.strings[0];for(let c=0;c<r.values.length;c++){let o=r.values[c];if(o instanceof F)a+=p(o);else{let u=Object.is(o,-0)?te:o,d=t.get(u);d===void 0&&(d="_$_"+i++,o instanceof D?o.name!==void 0&&(d+="_"+o.name):(n.push(d),s.push(o)),t.set(u,d)),a+=d}a+=r.strings[c+1]}return a},h=p(this);return new Function(this.#e(n.join(",")),this.#e(h)).apply(void 0,s)}},z=e=>e,G=[],H=e=>{let t=z;if(e?.policyName!==void 0){let s=globalThis.trustedTypes?.createPolicy(e.policyName,{createScript:z});s!==void 0&&(t=i=>s.createScript(i))}let n=(s,...i)=>new P(s,i,t);return Object.defineProperties(n,{empty:{configurable:!0,get(){let s=new P([""],G,t);return Object.defineProperty(n,"empty",{configurable:!1,value:s}),s}},local:{value:s=>new D(s)},raw:{value:s=>new P([s],G,t)}})};var f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),k=e=>({get value(){let t=e();return f(this,"value",t)}}),C=Array.isArray,L=e=>typeof e=="object"&&e!==null&&!C(e),K=e=>{try{let t=H(e);return t.empty.eval(),t}catch{return}},W=k(()=>{if(!(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare")))return K({policyName:"atcute-lexicons"})??K()});var S=(e,t)=>e?{ok:!1,code:"join",left:e,right:t}:t,x=(e,t)=>({ok:!1,code:"prepend",key:e,tree:t}),R=e=>({ok:!0,value:e}),J=0,E=1,ne=2,re=(e,t)=>{let{ok:n,msg:s,...i}=e;return{...i,path:t}},Z=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{Z(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push(re(e,t)),n}},Q=e=>{let t=0;for(;;)switch(e.code){case"join":{t+=Q(e.left),e=e.right;continue}case"prepend":{e=e.tree;continue}default:return t+1}};var se=e=>{let t="",n=0;for(;;){switch(e.code){case"join":{n+=Q(e.right),e=e.left;continue}case"prepend":{t+=`.${e.key}`,e=e.tree;continue}}break}let s=e.msg(),i=`${e.code} at ${t||"."} (${s})`;return n>0&&(i+=` (+${n} other issue(s))`),i},U=class extends Error{name="ValidationError";#e;constructor(t){super(),this.#e=t}get message(){return se(this.#e)}get issues(){return Z(this.#e)}};var B=(e,t,n)=>{let s=J;n?.strict&&(s|=ne);let i=e["~run"](t,s);if(i===void 0)return t;if(i.ok)return i.value;throw new U(i)},V=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{V(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push({message:e.msg(),path:t.length>0?t:void 0}),n}},I=e=>({version:1,vendor:"@atcute/lexicons",validate(t){let n=e["~run"](t,J);return n===void 0?{value:t}:n.ok?{value:n.value}:{issues:V(n)}}});var X={ok:!1,code:"invalid_type",expected:"integer",msg(){return"expected integer"}},ie={kind:"schema",type:"integer","~run"(e,t){if(typeof e!="number"||!Number.isSafeInteger(e))return X},get"~standard"(){return f(this,"~standard",I(this))}},M=()=>ie;var oe={ok:!1,code:"invalid_type",expected:"string",msg(){return"expected string"}},ae={kind:"schema",type:"string",format:null,"~run"(e,t){if(typeof e!="string")return oe},get"~standard"(){return f(this,"~standard",I(this))}},T=()=>ae;var ce=e=>e.type==="optional",ue={ok:!1,code:"invalid_type",expected:"array",msg(){return"expected array"}},w=e=>{let t=k(()=>typeof e=="function"?e():e);return{kind:"schema",type:"array",get item(){return f(this,"item",t.value)},get"~run"(){let n=t.value;return f(this,"~run",(i,p)=>{if(!C(i))return ue;let h,r;for(let a=0,c=i.length;a<c;a++){let o=i[a],u=n["~run"](o,p);if(u!==void 0)if(u.ok)r===void 0&&(r=i.slice()),r[a]=u.value;else{if(p&E)return x(a,u);h=S(h,x(a,u))}}if(h!==void 0)return h;if(r!==void 0)return R(r)})},get"~standard"(){return f(this,"~standard",I(this))}}};var q={ok:!1,code:"invalid_type",expected:"object",msg(){return"expected object"}},de={ok:!1,code:"missing_value",msg(){return"missing value"}},le=(e,t,n)=>{t==="__proto__"?Object.defineProperty(e,t,{value:n}):e[t]=n},j=e=>{let t=k(()=>{let n=[];for(let s in e){let i=e[s];n.push({key:s,schema:i,optional:ce(i),missing:x(s,de)})}return n});return{kind:"schema",type:"object",get shape(){let n=t.value,s={};for(let i of n)s[i.key]=i.schema;return f(this,"shape",s)},get"~run"(){let n=t.value,s=n.length,i=r=>{let a=r.local(),c=r.local(),o=r.local(),u=r.local(),d=(l,y)=>l==="__proto__"?r`Object.defineProperty(${u}??={...${a}},${l},{value:${y}})`:r`(${u}??={...${a}})[${l}]=${y}`,m=l=>r`if(((${o}=${S}(${o},${l})),${c}&${E}))return ${o};`,g=r.empty;for(let l=0;l<s;l++){let y=n[l],_=y.key,$=r.local(),b=r.local(),A,N,O=r.empty;if(y.optional){let Y=y.schema,v=Y.default;if(A=r`${$}!==undefined`,N=Y.wrapped,v!==void 0){let ee=typeof v=="function"?r`${v}()`:r`${v}`;O=r`else ${d(_,ee)};`}}else A=r`${$}!==undefined||${_} in ${a}`,N=y.schema,O=r`else ${m(r`${y.missing}`)}`;g=r`${g}const ${$}=${a}[${_}];if(${A}){const ${b}=${N}["~run"](${$},${c});if(${b}!==undefined)if(${b}.ok)${d(_,r`${b}.value`)};else ${m(r`${x}(${_},${b})`)}}${O}`}return g=r`return function matcher(${a},${c}){let ${o},${u};${g}if(${o}!==undefined)return ${o};if(${u}!==undefined)return ${R}(${u});}`,g.eval()},p=W.value;if(p!==void 0){let r=i(p);return f(this,"~run",(c,o)=>L(c)?r(c,o):q)}return f(this,"~run",(r,a)=>{if(!L(r))return q;let c,o;for(let u=0;u<s;u++){let d=n[u],m=d.key,g=r[m];if(!d.optional&&g===void 0&&!(m in r)){if(c=S(c,d.missing),a&E)return c;continue}let l=d.schema["~run"](g,a);if(l!==void 0){if(l.ok)o===void 0&&(o={...r}),le(o,m,l.value);else if(c=S(c,x(m,l)),a&E)return c}}if(c!==void 0)return c;if(o!==void 0)return R(o)})},get"~standard"(){return f(this,"~standard",I(this))}}};var pe=w(j({key:T(),count:M()})),ge=w(j({ns:T(),records:w(j({suffix:T(),count:M()}))})),xe=e=>B(pe,e),$e=e=>B(ge,e);export{$e as parseSourceDetails,xe as parseSources};