PageSourceSearch

https://farcaster.xyz/assets/prod-mIAyMzef.js

js farcaster.xyz collected 2026-09-24 08:35:13 UTC 17,151 bytes, 5 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/srt-parser-B4Kmilhm.js","assets/vendor-viem-ArXx0jqs.js","assets/ssa-parser-BXBMtfz5.js","assets/errors-Btgfp926.js"])))=>i.map(i=>d[i]);
2import{_ as k}from"./vendor-viem-ArXx0jqs.js";const Q={LoadFail:0,BadSignature:1,BadTimestamp:2,BadSettingValue:3,BadFormat:4,UnknownSetting:5};class Z extends Error{code;line;constructor(t){super(t.reason),this.code=t.code,this.line=t.line}}const z=/\r?\n|\r/gm;class U{writable;readable;constructor(t){const e=new tt(t);this.writable=new WritableStream({write(s){e.transform(s)},close(){e.close()}}),this.readable=new ReadableStream({start(s){e.onLine=a=>s.enqueue(a),e.onClose=()=>s.close()}})}}class tt{a="";b;onLine;onClose;constructor(t){this.b=new TextDecoder(t)}transform(t){this.a+=this.b.decode(t,{stream:!0});const e=this.a.split(z);this.a=e.pop()||"";for(let s=0;s<e.length;s++)this.onLine(e[s].trim())}close(){this.a&&this.onLine(this.a.trim()),this.a="",this.onClose()}}async function et(i,t){const e=new ReadableStream({start(s){const a=i.split(z);for(const r of a)s.enqueue(r);s.close()}});return N(e,t)}async function N(i,t){const e=t?.type??"vtt";let s;if(typeof e=="string")switch(e){case"srt":s=(await k(async()=>{const{default:h}=await import("./srt-parser-B4Kmilhm.js");return{default:h}},__vite__mapDeps([0,1]))).default;break;case"ssa":case"ass":s=(await k(async()=>{const{default:h}=await import("./ssa-parser-BXBMtfz5.js");return{default:h}},__vite__mapDeps([2,1]))).default;break;default:s=(await Promise.resolve().then(function(){return yt})).default}else s=e;let a;const r=i.getReader(),n=s(),o=!!t?.strict||!!t?.errors;await n.init({strict:!1,...t,errors:o,type:e,cancel(){r.cancel(),a=n.done(!0)}});let l=1;for(;;){const{value:h,done:c}=await r.read();if(c){n.parse("",l),a=n.done(!1);break}n.parse(h,l),l++}return a}async function it(i,t){const e=await i;if(!e.ok||!e.body)return{metadata:{},cues:[],regions:[],errors:[void 0]};const s=e.headers.get("content-type")||"",a=s.match(/text\/(.*?)(?:;|$)/)?.[1],r=s.match(/charset=(.*?)(?:;|$)/)?.[1];return $(e.body,{type:a,encoding:r,...t})}async function $(i,{encoding:t="utf-8",...e}={}){const s=i.pipeThrough(new U(t));return N(s,e)}class V extends EventTarget{id="";startTime;endTime;text;pauseOnExit=!1;constructor(t,e,s){super(),this.startTime=t,this.endTime=e,this.text=s}addEventListener(t,e,s){super.addEventListener(t,e,s)}removeEventListener(t,e,s){super.removeEventListener(t,e,s)}}const R=typeof document>"u",st=R?V:window.VTTCue;class j extends st{region=null;vertical="";snapToLines=!0;line="auto";lineAlign="start";position="auto";positionAlign="auto";size=100;align="center";style}class G{id="";width=100;lines=3;regionAnchorX=0;regionAnchorY=100;viewportAnchorX=0;viewportAnchorY=100;scroll=""}const M=",",rt="%";function nt(i){const t=parseInt(i,10);return Number.isNaN(t)?null:t}function w(i){const t=parseInt(i.replace(rt,""),10);return!Number.isNaN(t)&&t>=0&&t<=100?t:null}function O(i){if(!i.includes(M))return null;const[t,e]=i.split(M).map(w);return t!==null&&e!==null?[t,e]:null}function at(i){const t=parseFloat(i);return Number.isNaN(t)?null:t}const ot="WEBVTT",x=",",lt="%",g=/[:=]/,ht=/^[\s\t]*(region|vertical|line|position|size|align)[:=]/,ct="NOTE",ut="REGION",ft=/^REGION:?[\s\t]+/,T=/[\s\t]+/,dt="-->",pt=/[\s\t]*-->[\s\t]+/,gt=/start|center|end|left|right/,mt=/start|center|end/,Tt=/line-(?:left|right)|center|auto/,wt=/^(?:(\d{1,2}):)?(\d{2}):(\d{2})(?:\.(\d{1,3}))?$/;var H=(i=>(i[i.None=0]="None",i[i.Header=1]="Header",i[i.Cue=2]="Cue",i[i.Region=3]="Region",i[i.Note=4]="Note",i))(H||{});class D{h;e=0;i={};j={};l=[];c=null;d=null;m=[];f;n="";async init(t){this.h=t,t.strict&&(this.e=1),t.errors&&(this.f=(await k(async()=>{const{ParseErrorBuilder:e}=await import("./errors-Btgfp926.js");return{ParseErrorBuilder:e}},__vite__mapDeps([3,1]))).ParseErrorBuilder)}parse(t,e){if(t==="")this.c?(this.l.push(this.c),this.h.onCue?.(this.c),this.c=null):this.d?(this.j[this.d.id]=this.d,this.h.onRegion?.(this.d),this.d=null):this.e===1&&(this.k(t,e),this.h.onHeaderMetadata?.(this.i)),this.e=0;else if(this.e)switch(this.e){case 1:this.k(t,e);break;case 2:if(this.c){const s=this.c.text.length>0;!s&&ht.test(t)?this.o(t.split(T),e):this.c.text+=(s?`
3`:"")+t}break;case 3:this.p(t.split(T),e);break}else if(t.startsWith(ct))this.e=4;else if(t.startsWith(ut))this.e=3,this.d=new G,this.p(t.replace(ft,"").split(T),e);else if(t.includes(dt)){const s=this.q(t,e);s&&(this.c=new j(s[0],s[1],""),this.c.id=this.n,this.o(s[2],e)),this.e=2}else e===1&&this.k(t,e);this.n=t}done(){return{metadata:this.i,cues:this.l,regions:Object.values(this.j),errors:this.m}}k(t,e){if(e>1){if(g.test(t)){const[s,a]=t.split(g);s&&(this.i[s]=(a||"").replace(T,""))}}else t.startsWith(ot)?this.e=1:this.g(this.f?.r())}q(t,e){const[s,a=""]=t.split(pt),[r,...n]=a.split(T),o=y(s),l=y(r);if(o!==null&&l!==null&&l>o)return[o,l,n];o===null&&this.g(this.f?.s(s,e)),l===null&&this.g(this.f?.t(r,e)),o!=null&&l!==null&&l>o&&this.g(this.f?.u(o,l,e))}p(t,e){let s;for(let a=0;a<t.length;a++)if(g.test(t[a])){s=!1;const[r,n]=t[a].split(g);switch(r){case"id":this.d.id=n;break;case"width":const o=w(n);o!==null?this.d.width=o:s=!0;break;case"lines":const l=nt(n);l!==null?this.d.lines=l:s=!0;break;
vendor: 11,875 bytes, lines 3-5
3case"regionanchor":const h=O(n);h!==null?(this.d.regionAnchorX=h[0],this.d.regionAnchorY=h[1]):s=!0;break;case"viewportanchor":const c=O(n);c!==null?(this.d.viewportAnchorX=c[0],this.d.viewportAnchorY=c[1]):s=!0;break;case"scroll":n==="up"?this.d.scroll="up":s=!0;break;default:this.g(this.f?.v(r,n,e))}s&&this.g(this.f?.w(r,n,e))}}o(t,e){let s;for(let a=0;a<t.length;a++)if(s=!1,g.test(t[a])){const[r,n]=t[a].split(g);switch(r){case"region":const o=this.j[n];o&&(this.c.region=o);break;case"vertical":n==="lr"||n==="rl"?(this.c.vertical=n,this.c.region=null):s=!0;break;case"line":const[l,h]=n.split(x);if(l.includes(lt)){const m=w(l);m!==null?(this.c.line=m,this.c.snapToLines=!1):s=!0}else{const m=at(l);m!==null?this.c.line=m:s=!0}mt.test(h)?this.c.lineAlign=h:h&&(s=!0),this.c.line!=="auto"&&(this.c.region=null);break;case"position":const[c,f]=n.split(x),b=w(c);b!==null?this.c.position=b:s=!0,f&&Tt.test(f)?this.c.positionAlign=f:f&&(s=!0);break;case"size":const E=w(n);E!==null?(this.c.size=E,E<100&&(this.c.region=null)):s=!0;break;case"align":gt.test(n)?this.c.align=n:s=!0;break;default:this.g(this.f?.x(r,n,e))}s&&this.g(this.f?.y(r,n,e))}}g(t){if(t){if(this.m.push(t),this.h.strict)throw this.h.cancel(),t;this.h.onError?.(t)}}}function y(i){const t=i.match(wt);if(!t)return null;const e=t[1]?parseInt(t[1],10):0,s=parseInt(t[2],10),a=parseInt(t[3],10),r=t[4]?parseInt(t[4].padEnd(3,"0"),10):0,n=e*3600+s*60+a+r/1e3;return e<0||s<0||a<0||r<0||s>59||a>59?null:n}function vt(){return new D}var yt=Object.freeze({__proto__:null,VTTBlock:H,VTTParser:D,default:vt,parseVTTTimestamp:y});const bt=/[0-9]/,_t=/[\s\t]+/,F={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span",timestamp:"span"},At={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},Et=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,St=new Set(["white","lime","cyan","red","yellow","magenta","blue","black"]),kt=new Set(Object.keys(F));function W(i){let t="",e=1,s=[],a=[],r;for(let h=0;h<i.text.length;h++){const c=i.text[h];switch(e){case 1:c==="<"?(l(),e=2):t+=c;break;case 2:switch(c){case`
4`:case"	":case" ":n(),e=4;break;case".":n(),e=3;break;case"/":e=5;break;case">":n(),e=1;break;default:!t&&bt.test(c)&&(e=6),t+=c;break}break;case 3:switch(c){case"	":case" ":case`
5`:o(),r&&r.class?.trim(),e=4;break;case".":o();break;case">":o(),r&&r.class?.trim(),e=1;break;default:t+=c}break;case 4:c===">"?(t=t.replace(_t," "),r?.type==="v"?r.voice=S(t):r?.type==="lang"&&(r.lang=S(t)),t="",e=1):t+=c;break;case 5:c===">"&&(t="",r=a.pop(),e=1);break;case 6:if(c===">"){const f=y(t);f!==null&&f>=i.startTime&&f<=i.endTime&&(t="timestamp",n(),r.time=f),t="",e=1}else t+=c;break}}function n(){if(kt.has(t)){const h=r;r=Nt(t),h?(a[a.length-1]!==h&&a.push(h),h.children.push(r)):s.push(r)}t="",e=1}function o(){if(r&&t){const h=t.replace("bg_","");St.has(h)?r[t.startsWith("bg_")?"bgColor":"color"]=h:r.class=r.class?r.class+" "+t:t}t=""}function l(){if(!t)return;const h={type:"text",data:S(t)};r?r.children.push(h):s.push(h),t=""}return e===1&&l(),s}function Nt(i){return{tagName:F[i],type:i,children:[]}}function S(i){return i.replace(Et,t=>At[t]||"'")}function u(i,t,e){i.style.setProperty(`--${t}`,e+"")}function d(i,t,e=!0){i.setAttribute(`data-${t}`,e===!0?"":e+"")}function _(i,t){i.setAttribute("data-part",t)}function Rt(i){return parseFloat(getComputedStyle(i).lineHeight)||0}function Ct(i){if(R)throw Error("[media-captions] called `createVTTCueTemplate` on the server - use `renderVTTCueString`");const t=document.createElement("template");return t.innerHTML=C(i),{cue:i,content:t.content}}function C(i,t=0){return I(W(i),t)}function I(i,t=0){let e,s="";for(const a of i)if(a.type==="text")s+=a.data;else{const r=a.type==="timestamp";e={},e.class=a.class,e.title=a.type==="v"&&a.voice,e.lang=a.type==="lang"&&a.lang,e["data-part"]=a.type==="v"&&"voice",r&&(e["data-part"]="timed",e["data-time"]=a.time,e["data-future"]=a.time>t,e["data-past"]=a.time<t),e.style=`${a.color?`color: ${a.color};`:""}${a.bgColor?`background-color: ${a.bgColor};`:""}`;const n=Object.entries(e).filter(o=>o[1]).map(o=>`${o[0]}="${o[1]===!0?"":o[1]}"`).join(" ");s+=`<${a.tagName}${n?" "+n:""}>${I(a.children)}</${a.tagName}>`}return s}function q(i,t){if(!R)for(const e of i.querySelectorAll('[data-part="timed"]')){const s=Number(e.getAttribute("data-time"));Number.isNaN(s)||(s>t?d(e,"future"):e.removeAttribute("data-future"),s<t?d(e,"past"):e.removeAttribute("data-past"))}}function It(i,t){let e=null,s;function a(){r(),i(...s),s=void 0}function r(){clearTimeout(e),e=null}function n(){s=[].slice.call(arguments),r(),e=setTimeout(a,t)}return n}const p=Symbol(0);function L(i){return i instanceof HTMLElement?{top:i.offsetTop,width:i.clientWidth,height:i.clientHeight,left:i.offsetLeft,right:i.offsetLeft+i.clientWidth,bottom:i.offsetTop+i.clientHeight}:{...i}}function A(i,t,e){switch(t){case"+x":i.left+=e,i.right+=e;break;case"-x":i.left-=e,i.right-=e;break;case"+y":i.top+=e,i.bottom+=e;break;case"-y":i.top-=e,i.bottom-=e;break}}function Lt(i,t){return i.left<=t.right&&i.right>=t.left&&i.top<=t.bottom&&i.bottom>=t.top}function Pt(i,t){for(let e=0;e<t.length;e++)if(Lt(i,t[e]))return t[e];return null}function B(i,t){return t.top>=0&&t.bottom<=i.height&&t.left>=0&&t.right<=i.width}function Mt(i,t,e){switch(e){case"+x":return t.left<0;case"-x":return t.right>i.width;case"+y":return t.top<0;case"-y":return t.bottom>i.height}}function Ot(i,t){const e=Math.max(0,Math.min(i.width,t.right)-Math.max(0,t.left)),s=Math.max(0,Math.min(i.height,t.bottom)-Math.max(0,t.top));return e*s/(i.height*i.width)}function P(i,t){return{top:t.top/i.height,left:t.left/i.width,right:(i.width-t.right)/i.width,bottom:(i.height-t.bottom)/i.height}}function X(i,t){return t.top=t.top*i.height,t.left=t.left*i.width,t.right=i.width-t.right*i.width,t.bottom=i.height-t.bottom*i.height,t}const Y=["top","left","right","bottom"];function K(i,t,e,s){const a=P(t,e);for(const r of Y)u(i,`${s}-${r}`,a[r]*100+"%")}function J(i,t,e,s){let a=1,r,n={...t};for(let o=0;o<s.length;o++){for(;Mt(i,t,s[o])||B(i,t)&&Pt(t,e);)A(t,s[o],1);if(B(i,t))return t;const l=Ot(i,t);a>l&&(r={...t},a=l),t={...n}}return r||n}const v=Symbol(0);function xt(i,t,e,s){let a=e.firstElementChild,r=$t(t),n,o=[];if(e[p]||(e[p]=Bt(i,e)),n=X(i,{...e[p]}),e[v])o=[e[v]==="top"?"+y":"-y","+x","-x"];else if(t.snapToLines){let l;switch(t.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width";break}let h=Rt(a),c=h*Math.round(r),f=i[l]+h,b=o[0];Math.abs(c)>f&&(c=c<0?-1:1,c*=Math.ceil(f/h)*h),r<0&&(c+=t.vertical===""?i.height:i.width,o=o.reverse()),A(n,b,c)}else{const l=t.vertical==="",h=l?"+y":"+x",c=l?n.height:n.width;A(n,h,(l?i.height:i.width)*r/100),A(n,h,t.lineAlign==="center"?c/2:t.lineAlign==="end"?c:0),o=l?["-y","+y","-x","+x"]:["-x","+x","-y","+y"]}return n=J(i,n,s,o),K(e,i,n,"cue"),n}function Bt(i,t){const e=L(t),s=zt(t);if(t[v]=!1,s.top&&(e.top=s.top,e.bottom=s.top+e.height,t[v]="top"),s.bottom){const a=i.height-s.bottom;e.top=a-e.height,e.bottom=a,t[v]="bottom"}return s.left&&(e.left=s.left),s.right&&(e.right=i.width-s.right),P(i,e)}function zt(i){const t={};for(const e of Y)t[e]=parseFloat(i.style.getPropertyValue(`--cue-${e}`));return t}function $t(i){return i.line==="auto"?i.snapToLines?-1:100:i.line}function Vt(i){if(i.position==="auto")switch(i.align){case"start":case"left":return 0;case"right":case"end":return 100;default:return 50}return i.position}function jt(i,t){if(i.positionAlign==="auto")switch(i.align){case"start":return t==="ltr"?"line-left":"line-right";case"end":return t==="ltr"?"line-right":"line-left";case"center":return"center";default:return`line-${i.align}`}return i.positionAlign}const Gt=["-y","+y","-x","+x"];function Ht(i,t,e,s){let a=Array.from(e.querySelectorAll('[data-part="cue-display"]')),r=0,n=Math.max(0,a.length-t.lines);for(let l=a.length-1;l>=n;l--)r+=a[l].offsetHeight;u(e,"region-height",r+"px"),e[p]||(e[p]=P(i,L(e)));let o={...e[p]};return o=X(i,o),o.width=e.clientWidth,o.height=r,o.right=o.left+o.width,o.bottom=o.top+r,o=J(i,o,s,Gt),K(e,i,o,"region"),o}class Dt{overlay;z;A=0;C="ltr";B=[];D=!1;E;j=new Map;l=new Map;get dir(){return this.C}set dir(t){this.C=t,d(this.overlay,"dir",t)}get currentTime(){return this.A}set currentTime(t){this.A=t,this.update()}constructor(t,e){this.overlay=t,this.dir=e?.dir??"ltr",t.setAttribute("translate","yes"),t.setAttribute("aria-live","off"),t.setAttribute("aria-atomic","true"),_(t,"captions"),this.G(),this.E=new ResizeObserver(this.I.bind(this)),this.E.observe(t)}changeTrack({regions:t,cues:e}){this.reset(),this.J(t);for(const s of e)this.l.set(s,null);this.update()}addCue(t){this.l.set(t,null),this.update()}removeCue(t){this.l.delete(t),this.update()}update(t=!1){this.H(t)}reset(){this.l.clear(),this.j.clear(),this.B=[],this.overlay.textContent=""}destroy(){this.reset(),this.E.disconnect()}I(){this.D=!0,this.K()}K=It(()=>{this.D=!1,this.G();for(const t of this.j.values())t[p]=null;for(const t of this.l.values())t&&(t[p]=null);this.H(!0)},50);G(){this.z=L(this.overlay),u(this.overlay,"overlay-width",this.z.width+"px"),u(this.overlay,"overlay-height",this.z.height+"px")}H(t=!1){if(!this.l.size||this.D)return;let e,s=[...this.l.keys()].filter(r=>this.A>=r.startTime&&this.A<=r.endTime).sort((r,n)=>r.startTime!==n.startTime?r.startTime-n.startTime:r.endTime-n.endTime),a=s.map(r=>r.region);for(let r=0;r<this.B.length;r++){if(e=this.B[r],s[r]===e)continue;if(e.region&&!a.includes(e.region)){const o=this.j.get(e.region.id);o&&(o.removeAttribute("data-active"),t=!0)}const n=this.l.get(e);n&&(n.remove(),t=!0)}for(let r=0;r<s.length;r++){e=s[r];let n=this.l.get(e);n||this.l.set(e,n=this.L(e));const o=this.F(e)&&this.j.get(e.region.id);o&&!o.hasAttribute("data-active")&&(requestAnimationFrame(()=>d(o,"active")),t=!0),n.isConnected||((o||this.overlay).append(n),t=!0)}if(t){const r=[],n=new Set;for(let o=s.length-1;o>=0;o--){if(e=s[o],n.has(e.region||e))continue;const l=this.F(e),h=l?this.j.get(e.region.id):this.l.get(e);l?r.push(Ht(this.z,e.region,h,r)):r.push(xt(this.z,e,h,r)),n.add(l?e.region:e)}}q(this.overlay,this.A),this.B=s}J(t){if(t)for(const e of t){const s=this.M(e);this.j.set(e.id,s),this.overlay.append(s)}}M(t){const e=document.createElement("div");return _(e,"region"),d(e,"id",t.id),d(e,"scroll",t.scroll),u(e,"region-width",t.width+"%"),u(e,"region-anchor-x",t.regionAnchorX),u(e,"region-anchor-y",t.regionAnchorY),u(e,"region-viewport-anchor-x",t.viewportAnchorX),u(e,"region-viewport-anchor-y",t.viewportAnchorY),u(e,"region-lines",t.lines),e}L(t){const e=document.createElement("div"),s=Vt(t),a=jt(t,this.C);if(_(e,"cue-display"),t.vertical!==""&&d(e,"vertical"),u(e,"cue-text-align",t.align),t.style)for(const n of Object.keys(t.style))e.style.setProperty(n,t.style[n]);if(this.F(t))u(e,"cue-offset",`${s-(a==="line-right"?100:a==="center"?50:0)}%`);else if(u(e,"cue-writing-mode",t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl"),!t.style?.["--cue-width"]){let n=s;a==="line-left"?n=100-s:a==="center"&&s<=50?n=s*2:a==="center"&&s>50&&(n=(100-s)*2);const o=t.size<n?t.size:n;t.vertical===""?u(e,"cue-width",o+"%"):u(e,"cue-height",o+"%")}const r=document.createElement("div");return _(r,"cue"),t.id&&d(r,"id",t.id),r.innerHTML=C(t),e.append(r),e}F(t){return t.region&&t.size===100&&t.vertical===""&&t.line==="auto"}}const Wt=Object.freeze(Object.defineProperty({__proto__:null,CaptionsRenderer:Dt,ParseError:Z,ParseErrorCode:Q,TextCue:V,VTTCue:j,VTTRegion:G,createVTTCueTemplate:Ct,parseByteStream:$,parseResponse:it,parseText:et,parseTextStream:N,parseVTTTimestamp:y,renderVTTCueString:C,renderVTTTokensString:I,tokenizeVTTCue:W,updateTimedVTTCueNodes:q},Symbol.toStringTag,{value:"Module"}));export{Z as P,D as V,H as a,j as b,Q as c,Wt as d,y as p};

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.