1 line
8 KiB
JavaScript
1 line
8 KiB
JavaScript
import{Y as F,a2 as ie,aN as te,a8 as y,D as _,ae as ne,a3 as pe,g as z,I as ge,a5 as he,a6 as _e,a7 as Q,a9 as D,_ as L,ao as le,aL as me,av as j,x as Ee,aO as b,Z as B,a1 as xe,al as ee,aP as we,aJ as X,q as Ae,aQ as be,aR as Ne,aS as Te,V as oe,X as ue,aT as V,an as ve,aF as U,aU as Se,aI as Ce,W as Ie,aV as ke,aW as Me,aX as Le,aY as Oe,aZ as ye,a_ as De,p as Re,u as He,i as Fe,t as Ve,e as Ye,j as ze}from"./s1dcSIVc.js";import{f as ce,a as de}from"./CkL4Pxt3.js";import"./ZgnPtkD2.js";function rr(e,r){return r}function Be(e,r,a){for(var i=[],t=r.length,f,l=r.length,c=0;c<t;c++){let d=r[c];ue(d,()=>{if(f){if(f.pending.delete(d),f.done.add(d),f.pending.size===0){var u=e.outrogroups;q(X(f.done)),u.delete(f),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var o=i.length===0&&a!==null;if(o){var p=a,n=p.parentNode;Ce(n),n.append(p),e.items.clear()}q(r,!o)}else f={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(f)}function q(e,r=!0){for(var a=0;a<e.length;a++)Ie(e[a],r)}var re;function ar(e,r,a,i,t,f=null){var l=e,c=new Map,o=(r&te)!==0;if(o){var p=e;l=_?y(ne(p)):p.appendChild(F())}_&&pe();var n=null,d=ge(()=>{var v=a();return Ae(v)?v:v==null?[]:X(v)}),u,g=!0;function x(){s.fallback=n,Ue(s,u,l,r,i),n!==null&&(u.length===0?(n.f&b)===0?oe(n):(n.f^=b,O(n,null,l)):ue(n,()=>{n=null}))}var w=ie(()=>{u=z(d);var v=u.length;let C=!1;if(_){var I=he(l)===_e;I!==(v===0)&&(l=Q(),y(l),D(!1),C=!0)}for(var E=new Set,T=Ee,k=xe(),h=0;h<v;h+=1){_&&L.nodeType===le&&L.data===me&&(l=L,C=!0,D(!1));var S=u[h],M=i(S,h),m=g?null:c.get(M);m?(m.v&&j(m.v,S),m.i&&j(m.i,h),k&&T.skipped_effects.delete(m.e)):(m=qe(c,g?l:re??(re=F()),S,M,h,t,r,a),g||(m.e.f|=b),c.set(M,m)),E.add(M)}if(v===0&&f&&!n&&(g?n=B(()=>f(l)):(n=B(()=>f(re??(re=F()))),n.f|=b)),_&&v>0&&y(Q()),!g)if(k){for(const[R,H]of c)E.has(R)||T.skipped_effects.add(H.e);T.oncommit(x),T.ondiscard(()=>{})}else x();C&&D(!0),z(d)}),s={effect:w,items:c,outrogroups:null,fallback:n};g=!1,_&&(l=L)}function Ue(e,r,a,i,t){var m,R,H,G,P,W,Z,$,J;var f=(i&Se)!==0,l=r.length,c=e.items,o=e.effect.first,p,n=null,d,u=[],g=[],x,w,s,v;if(f)for(v=0;v<l;v+=1)x=r[v],w=t(x,v),s=c.get(w).e,(s.f&b)===0&&((R=(m=s.nodes)==null?void 0:m.a)==null||R.measure(),(d??(d=new Set)).add(s));for(v=0;v<l;v+=1){if(x=r[v],w=t(x,v),s=c.get(w).e,e.outrogroups!==null)for(const A of e.outrogroups)A.pending.delete(s),A.done.delete(s);if((s.f&b)!==0)if(s.f^=b,s===o)O(s,null,a);else{var C=n?n.next:o;s===e.effect.last&&(e.effect.last=s.prev),s.prev&&(s.prev.next=s.next),s.next&&(s.next.prev=s.prev),N(e,n,s),N(e,s,C),O(s,C,a),n=s,u=[],g=[],o=n.next;continue}if((s.f&V)!==0&&(oe(s),f&&((G=(H=s.nodes)==null?void 0:H.a)==null||G.unfix(),(d??(d=new Set)).delete(s))),s!==o){if(p!==void 0&&p.has(s)){if(u.length<g.length){var I=g[0],E;n=I.prev;var T=u[0],k=u[u.length-1];for(E=0;E<u.length;E+=1)O(u[E],I,a);for(E=0;E<g.length;E+=1)p.delete(g[E]);N(e,T.prev,k.next),N(e,n,T),N(e,k,I),o=I,n=k,v-=1,u=[],g=[]}else p.delete(s),O(s,o,a),N(e,s.prev,s.next),N(e,s,n===null?e.effect.first:n.next),N(e,n,s),n=s;continue}for(u=[],g=[];o!==null&&o!==s;)(p??(p=new Set)).add(o),g.push(o),o=o.next;if(o===null)continue}(s.f&b)===0&&u.push(s),n=s,o=s.next}if(e.outrogroups!==null){for(const A of e.outrogroups)A.pending.size===0&&(q(X(A.done)),(P=e.outrogroups)==null||P.delete(A));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||p!==void 0){var h=[];if(p!==void 0)for(s of p)(s.f&V)===0&&h.push(s);for(;o!==null;)(o.f&V)===0&&o!==e.fallback&&h.push(o),o=o.next;var S=h.length;if(S>0){var M=(i&te)!==0&&l===0?a:null;if(f){for(v=0;v<S;v+=1)(Z=(W=h[v].nodes)==null?void 0:W.a)==null||Z.measure();for(v=0;v<S;v+=1)(J=($=h[v].nodes)==null?void 0:$.a)==null||J.fix()}Be(e,h,M)}}f&&ve(()=>{var A,K;if(d!==void 0)for(s of d)(K=(A=s.nodes)==null?void 0:A.a)==null||K.apply()})}function qe(e,r,a,i,t,f,l,c){var o=(l&be)!==0?(l&Ne)===0?we(a,!1,!1):ee(a):null,p=(l&Te)!==0?ee(t):null;return{v:o,i:p,e:B(()=>(f(r,o??a,p??t,c),()=>{e.delete(i)}))}}function O(e,r,a){if(e.nodes)for(var i=e.nodes.start,t=e.nodes.end,f=r&&(r.f&b)===0?r.nodes.start:a;i!==null;){var l=U(i);if(f.before(i),i===t)return;i=l}}function N(e,r,a){r===null?e.effect.first=a:r.next=a,a===null?e.effect.last=r:a.prev=r}function sr(e,r){let a=null,i=_;var t;if(_){a=L;for(var f=ne(document.head);f!==null&&(f.nodeType!==le||f.data!==e);)f=U(f);if(f===null)D(!1);else{var l=U(f);f.remove(),y(l)}}_||(t=document.head.appendChild(F()));try{ie(()=>r(t),ke)}finally{i&&(D(!0),y(a))}}function Xe(e,r,a){var i=e==null?"":""+e;return i===""?null:i}function ae(e,r=!1){var a=r?" !important;":";",i="";for(var t in e){var f=e[t];f!=null&&f!==""&&(i+=" "+t+": "+f+a)}return i}function Y(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function fr(e,r){if(r){var a="",i,t;if(Array.isArray(r)?(i=r[0],t=r[1]):i=r,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var f=!1,l=0,c=!1,o=[];i&&o.push(...Object.keys(i).map(Y)),t&&o.push(...Object.keys(t).map(Y));var p=0,n=-1;const w=e.length;for(var d=0;d<w;d++){var u=e[d];if(c?u==="/"&&e[d-1]==="*"&&(c=!1):f?f===u&&(f=!1):u==="/"&&e[d+1]==="*"?c=!0:u==='"'||u==="'"?f=u:u==="("?l++:u===")"&&l--,!c&&f===!1&&l===0){if(u===":"&&n===-1)n=d;else if(u===";"||d===w-1){if(n!==-1){var g=Y(e.substring(p,n).trim());if(!o.includes(g)){u!==";"&&d++;var x=e.substring(p,d).trim();a+=" "+x+";"}}p=d+1,n=-1}}}}return i&&(a+=ae(i)),t&&(a+=ae(t,!0)),a=a.trim(),a===""?null:a}return e==null?null:String(e)}function Ge(e,r,a,i,t,f){var l=e.__className;if(_||l!==a||l===void 0){var c=Xe(a);(!_||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):e.className=c),e.__className=a}return f}const Pe=Symbol("is custom element"),We=Symbol("is html");function ir(e){if(_){var r=!1,a=()=>{if(!r){if(r=!0,e.hasAttribute("value")){var i=e.value;se(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var t=e.checked;se(e,"checked",null),e.checked=t}}};e.__on_r=a,ve(a),Me()}}function se(e,r,a,i){var t=Ze(e);_&&(t[r]=e.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&e.nodeName==="LINK")||t[r]!==(t[r]=a)&&(r==="loading"&&(e[Le]=a),a==null?e.removeAttribute(r):typeof a!="string"&&$e(e).includes(r)?e[r]=a:e.setAttribute(r,a))}function Ze(e){return e.__attributes??(e.__attributes={[Pe]:e.nodeName.includes("-"),[We]:e.namespaceURI===Oe})}var fe=new Map;function $e(e){var r=e.getAttribute("is")||e.nodeName,a=fe.get(r);if(a)return a;fe.set(r,a=[]);for(var i,t=e,f=Element.prototype;f!==t;){i=De(t);for(var l in i)i[l].set&&a.push(l);t=ye(t)}return a}var Je=ce('<nav><div class="max-w-6xl mx-auto px-6 py-4 flex items-center justify-between"><a href="/" class="flex items-center gap-2"><img src="/logo.png" alt="ValueCurve" class="h-8 w-auto"/> <span class="font-semibold text-gray-900">Build ValueCurve</span></a> <div class="flex items-center gap-6"><a href="/guides/" class="text-gray-600 hover:text-gray-900 transition-colors text-sm font-medium">Guides</a> <a href="/tools/" class="text-gray-600 hover:text-gray-900 transition-colors text-sm font-medium">Tools</a> <a href="https://www.valuecurve.ai" target="_blank" rel="noopener" class="text-gray-600 hover:text-gray-900 transition-colors text-sm font-medium">Newsletter</a> <a href="/notebooks/" class="text-gray-600 hover:text-gray-900 transition-colors text-sm font-medium">Notebooks</a></div></div></nav>');function tr(e,r){Re(r,!0);let a=ze(!1);He(()=>{const t=()=>{Fe(a,window.scrollY>20)};return window.addEventListener("scroll",t),()=>window.removeEventListener("scroll",t)});var i=Je();Ve(()=>Ge(i,1,`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${z(a)?"bg-white/90 backdrop-blur-md shadow-sm":"bg-transparent"}`)),de(e,i),Ye()}var Ke=ce('<footer class="bg-gray-50 border-t border-gray-100 py-12"><div class="max-w-6xl mx-auto px-6"><div class="flex flex-col md:flex-row items-center justify-between gap-4"><div class="flex items-center gap-2"><img src="/logo.png" alt="ValueCurve" class="h-6 w-auto"/> <span class="text-sm text-gray-600">Build ValueCurve</span></div> <p class="text-sm text-gray-500">Data science guides and tools for builders.</p></div></div></footer>');function nr(e){var r=Ke();de(e,r)}export{nr as F,tr as N,se as a,ar as e,sr as h,rr as i,ir as r,Ge as s,fr as t};
|