PageSourceSearch

https://martinwiniecki.org/assets/components-BLJn8K3E.js

js martinwiniecki.org collected 2026-10-04 20:53:43 UTC 4,058 bytes, 1 lines download raw bytes

1import{r as n,j as a,N as v,c as y,S as x,f as g,F as w}from"./chunk-4WY6JWTD-Y0SD1epq.js";var R="ws--form-id",S="ws--form-bot",j=n.createContext({assetBaseUrl:"/",imageLoader:({src:e})=>e,videoLoader:({src:e})=>e,resources:{},breakpoints:[],onError:e=>{console.error(e)}}),f=e=>Object.keys(e).some(r=>r.startsWith("__react")),$=typeof window>"u",F=e=>{const[r,s]=n.useState();if(n.useEffect(()=>{const t=`meta[${e.name?`name="${e.name}"`:`property="${e.property}"`}]`;let o=document.querySelectorAll(t);for(const c of o)f(c)||c.remove();o=document.querySelectorAll(t),o.length===0&&s(e)},[e]),$)return a.jsx("meta",{...e});if(r!==void 0)return a.jsx("meta",{...r})},B=({url:e,host:r,siteName:s,pageMeta:t,imageLoader:o,assetBaseUrl:c})=>{const i=[];e!==void 0&&i.push({property:"og:url",content:e}),t.title&&i.push({property:"og:title",content:t.title}),i.push({property:"og:type",content:"website"}),s&&i.push({property:"og:site_name",content:s}),t.excludePageFromSearch&&i.push({name:"robots",content:"noindex, nofollow"}),t.description&&(i.push({name:"description",content:t.description}),i.push({property:"og:description",content:t.description})),t.socialImageAssetName?i.push({property:"og:image",content:`https://${r}${o({src:`${c}${t.socialImageAssetName}`,format:"raw"})}`}):t.socialImageUrl&&i.push({property:"og:image",content:t.socialImageUrl}),i.push(...t.custom);const l=t.custom.some(d=>d.property==="twitter:card");return(t.socialImageAssetName!==void 0||t.socialImageUrl!==void 0)&&l===!1&&i.push({property:"twitter:card",content:"summary_large_image"}),i.map((d,m)=>a.jsx(F,{...d},m))},A=typeof window>"u",D=e=>{const[r,s]=n.useState();if(n.useEffect(()=>{const t="head > title";let o=document.querySelectorAll(t);for(const c of o)f(c)||c.remove();o=document.querySelectorAll(t),o.length===0&&s(e)},[e]),A)return a.jsx("title",{...e});if(r!==void 0)return a.jsx("title",{...r})};const h=n.forwardRef((e,r)=>{const{children:s,$webstudio$canvasOnly$assetId:t,...o}=e;return a.jsx("a",{...o,href:o.href??"#",ref:r,children:s})});h.displayName="Link";var N=n.forwardRef(({children:e,...r},s)=>a.jsxs("body",{...r,ref:s,children:[e,a.jsx(y,{}),a.jsx(x,{})]}));N.displayName="Body";var k=n.forwardRef((e,r)=>{const{assetBaseUrl:s}=n.useContext(j),t=String(e.href??"");if(t===""||t.startsWith("?")||t.startsWith("/")&&t.startsWith(s)===!1)return a.jsx(v,{...e,to:t,ref:r,end:!0});const{prefetch:o,reloadDocument:c,replace:i,preventScrollReset:l,...d}=e;return a.jsx(h,{...d,ref:r})});k.displayName=h.displayName;var W=(e,r)=>{const s=n.useRef(r);s.current=r;const t=n.useRef(e);n.useEffect(()=>{t.current.state!==e.state&&e.state==="idle"&&e.data!==void 0&&s.current(e.data),t.current=e},[e])},p=(e,r)=>r===0?e:p(r,e%r),b=(e,r)=>{const s=p(e,r);return`${e/s}/${r/s}`},E=()=>{if(typeof matchMedia>"u")return!0;const{width:e,height:r}=screen,s=b(e,r),t=matchMedia(`(device-aspect-ratio: ${s})`).matches,o=matchMedia(`(device-width: ${e}px) and (device-height: ${r}px)`).matches,c=matchMedia(`(device-width: ${e-1}px) and (device-height: ${r}px)`).matches,i=matchMedia("(prefers-color-scheme: light)").matches,l=matchMedia("(prefers-color-scheme: dark)").matches;return(t&&o&&!c&&i!==l)===!1},I=n.forwardRef(({children:e,action:r,method:s,state:t="initial",onStateChange:o,...c},i)=>{const l=g();W(l,m=>{const u=(m==null?void 0:m.success)===!0?"success":"error";o==null||o(u)});const d=m=>{const u=document.createElement("input");u.type="hidden",u.name=S,u.value=E()?"jsdom":Date.now().toString(16),m.currentTarget.appendChild(u)};return a.jsxs(l.Form,{...c,method:"post","data-state":t,ref:i,onSubmit:d,children:[a.jsx("input",{type:"hidden",name:R,value:r==null?void 0:r.toString()}),e]})});I.displayName="WebhookForm";var L=n.forwardRef(({action:e,method:r,...s},t)=>r==="dialog"?a.jsx("form",{...s,ref:t}):e===void 0||e===""||typeof e=="string"&&(e!=null&&e.startsWith("/"))?a.jsx(w,{action:e,method:r,...s,ref:t,preventScrollReset:e===void 0||e===""}):a.jsx("form",{...s,ref:t}));L.displayName="Form";export{N as B,k as L,B as P,j as R,D as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.