(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,621750,e=>{"use strict";var t=e.i(458201),n=e.i(538167);let s="twitter-script-loaded",r=/[\r\n\u2028\u2029]+/g,o=/\u200D|[\u200B\u200C\uFEFF\u00AD\u2060\u200E\u200F\u061C\u202A-\u202E\u2066-\u2069]/g,i=/])[^]*>/gi,a=[[""],['"','"'],["'","'"],["“","”"],["‘","’"],["`","`"]],l=[["invisible-characters",e=>e.replace(o,"")],["trimmed",e=>e.trim()],["line-breaks",e=>e.replace(i,e=>e.replace(r," ")).replace(r,"")],["wrapper",function(e){let t=e;for(;;){if(!a.find(([e,n])=>t.length>1&&t.startsWith(e)&&t.endsWith(n)&&!t.slice(1,-1).includes(e)&&!t.slice(1,-1).includes(n)))return t;t=t.slice(1,-1).trim()}}],["html-entities",function(e){let t=e;for(;;){let e=t.replace(/&/gi,"&");if(e===t)return t;t=e}}],["https",e=>e.replace(/^(?:http:)?\/\//i,"https://")],["host-case",function(e){return e.replace(/^(https?:\/\/)([^/?#]+)/i,(e,t,n)=>t.toLowerCase()+n.toLowerCase())}]],c=e=>(function(e,t){let n=[],s=e;for(let[e,r]of t){let t=r(s);t!==s&&(n.push(e),s=t)}return{value:s,fixes:n}})(e,l),u=(e,t)=>({label:e.label,noun:e.noun,example:e.example,detail:t}),h={"invisible-characters":({label:e,noun:t})=>`Removes hidden characters from the ${e} ${t}.`,trimmed:({label:e,noun:t})=>`Removes spaces from the start and end of the ${e} ${t}.`,"line-breaks":({label:e,noun:t})=>`Removes line breaks from the ${e} ${t}.`,wrapper:({label:e,noun:t})=>`Removes the brackets or quotes around the ${e} ${t}.`,"html-entities":({label:e,noun:t})=>`Changes "&" back to "&" in the ${e} ${t}.`,https:({label:e,noun:t})=>`Changes the ${e} ${t} to start with https://.`,"host-case":({label:e,noun:t})=>`Changes the website name in the ${e} ${t} to lowercase.`,"embed-code":({label:e})=>`Takes the post link out of the pasted ${e} embed code.`,"removed-params":({label:e,noun:t,detail:n})=>`Removes "${n}" from the ${e} ${t}. It doesn't change which post is shown.`,"canonical-form":({label:e,noun:t,detail:n})=>`Changes the ${e} ${t} to its standard form, ${n}.`,"uppercase-ticker":({label:e})=>`Changes the ${e} ticker to capital letters.`,"built-from-id":({label:e,detail:t})=>`Builds the ${e} link ${t} from the post number.`,"id-from-link":({label:e,detail:t})=>`Keeps only the post number, ${t}, from the pasted ${e} link.`,"share-link":({label:e,detail:t})=>`Replaces the ${e} share link with the post link it opens, ${t}. A share link can't be embedded.`},m={empty:({label:e,noun:t})=>`The ${e} block has no ${t}.`,"inner-whitespace":({label:e,noun:t})=>`The ${e} ${t} has a space in the middle. Check it against the original and remove the space.`,truncated:({label:e,noun:t})=>`The ${e} ${t} looks cut off. Copy the full ${t} again.`,"not-a-post":({label:e,example:t})=>`This ${e} link isn't a single post. Use a post link like ${t}.`,"wrong-provider":({label:e,detail:t})=>`This is a ${t} link, not a ${e} link. Use a ${t} block instead.`,"multiple-links":({label:e})=>`The ${e} block has more than one link. Use the link to one post.`,"needs-lookup":({label:e})=>`This ${e} short link has to be opened to find the post. Open it and copy the full link from the address bar.`,"bare-id":({label:e,example:t})=>`A ${e} post number on its own can't identify the post. Paste the full link, like ${t}.`,"needs-url-entry":({label:e,example:t})=>`A ${e} post number on its own can't identify the post. Switch Entry Method to ${e} URL and paste the full link, like ${t}.`,unrecognized:({label:e,noun:t,example:n})=>`This isn't a ${e} ${t}. Use one like ${n}.`},p={kind:"none"},d=e=>({kind:"problem",code:e}),w=d("not-a-post"),k=(e,t,n)=>({kind:"post",id:e,clean:t,fixes:n});function f(e,t,n){for(let[s,r]of e.searchParams)n.includes(s)&&t.searchParams.append(s,r)}let b=e=>e.pathname.split("/").filter(e=>e.length>0),$=/^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$/,g=/^did:[a-z]+:[A-Za-z0-9._:%-]+$/,v=/^[A-Za-z0-9._~:-]{1,512}$/,y=/^at:\/\/([^/]+)\/app\.bsky\.feed\.post\/([^/?#]+)$/,T=e=>$.test(e)||g.test(e),x=(e,t)=>k(`${e}/${t}`,`https://bsky.app/profile/${e}/post/${t}`),U=/^https:\/\/(?:(?:www|web|m)\.)?facebook\.com\/(?:[^/?#\s]+\/(?:posts|videos)\/[^/?#\s]+|(?:permalink|story)\.php\?[^#\s]+|photo(?:\.php)?\/?\?[^#\s]+|watch\/?\?[^#\s]+|reel\/[^/?#\s]+|groups\/[^/?#\s]+\/(?:posts|permalink)\/[^/?#\s]+)(?:[/?#]\S*)?$|^https:\/\/fb\.watch\/[^/?#\s]+\/?$/i,C=/^https:\/\/(?:(?:www|web|m)\.)?facebook\.com\/share\/[pvr]\/[^/?#\s]+/i,P=["fbid","set","v","story_fbid","id"],R=["p","reel","reels"],A=/^[A-Za-z0-9_-]+$/,S=["img_index"],_=/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/,z=e=>({key:`kalshi-${e}`,blockType:"Kalshi",label:"Kalshi",noun:"ticker",hosts:["kalshi.com","www.kalshi.com"],hostSuffixes:[".kalshi.com"],example:"event"===e?"KXTROPSTORM-26DEC01":"KXTROPSTORM",bareId:e=>{if(!_.test(e))return p;let t=e.toUpperCase();return k(t,t,t===e?[]:["uppercase-ticker"])},fromUrl:t=>{let n=function(e){if(!/(^|\.)kalshi\.com$/i.test(e.hostname))return{kind:"not-kalshi-market"};let t=e.pathname.split("/").map(e=>e.trim()).filter(e=>e.length>0);if(t[0]?.toLowerCase()!=="markets")return{kind:"kalshi-other"};let n=t.slice(1);return 0===n.length?{kind:"kalshi-other"}:{kind:"kalshi-market",segments:n}}(t);if("kalshi-market"!==n.kind)return w;let s=function(e,t){if("event"===t&&e.length{if(!B.test(e))return p;let t=K.fromUrl(new URL(`https://${e}`));return"post"===t.kind?k(t.id,t.clean,["https"]):p},fromUrl:e=>{let[t,n,s]=b(e);if("t"===t)return d("needs-lookup");if("v"===t||"player"===t&&"v1"===n||"embed"===t&&"v2"===n){let e="v"===t?n?.match(j)?.[1]:s;return e&&O.test(e)?k(e,`https://www.tiktok.com/@/video/${e}`):w}return t&&Z.test(t)&&"video"===n&&s&&O.test(s)?k(s,`https://www.tiktok.com/${t}/video/${s}`):w}},F=/^[A-Za-z0-9_]{1,15}$/,D=/^\d{1,19}$/,H=/^[A-Za-z0-9_-]+$/,W=["embed","shorts","live","v"];function M(e){if(!e)return null;let t=e.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s?)?$/);if(!t||!t[1]&&!t[2]&&!t[3])return null;let[,n="0",s="0",r="0"]=t;return 3600*Number(n)+60*Number(s)+Number(r)}let N={twitter:{key:"twitter",blockType:"Twitter",label:"Twitter",noun:"link",hosts:["twitter.com","www.twitter.com","mobile.twitter.com","x.com","www.x.com","mobile.x.com"],lookupHosts:["t.co"],example:"https://twitter.com/weatherchannel/status/1846275512478892033",bareId:e=>D.test(e)?k(e,`https://twitter.com/i/status/${e}`,["built-from-id"]):p,fromUrl:e=>{let t=b(e),[n,s,r]=t;if("i"===n){let e="web"===s?t[3]:r;return"status"===("web"===s?r:s)&&e&&D.test(e)?k(e,`https://twitter.com/i/status/${e}`):w}return n&&F.test(n)&&"status"===s&&r&&D.test(r)?k(r,`https://twitter.com/${n}/status/${r}`):w}},bluesky:{key:"bluesky",blockType:"Bluesky",label:"Bluesky",noun:"link",hosts:["bsky.app","www.bsky.app"],example:"https://bsky.app/profile/weather.com/post/3l6oveex3ii2l",bareId:e=>{let t=e.match(y);return t?.[1]&&t[2]&&T(t[1])?v.test(t[2])?x(t[1],t[2]):p:/^[A-Za-z0-9]+$/.test(e)?d("bare-id"):p},fromUrl:e=>{let[t,n,s,r]=b(e);return"profile"===t&&n&&T(n)&&"post"===s&&r&&v.test(r)?x(n,r):w}},facebook:{key:"facebook",blockType:"Facebook",label:"Facebook",noun:"link",hosts:["facebook.com","www.facebook.com","web.facebook.com","m.facebook.com","fb.watch"],example:"https://www.facebook.com/TheWeatherChannel/posts/pfbid0abc123",unwrap:e=>{if("string"!=typeof e)return"";let t=e.trim(),n=t.match(/