PageSourceSearch

https://giphy.com/_next/static/chunks/app/(site)/gifs/%5Bslug%5D/layout-8bade5a745dd94b4.js

js giphy.com collected 2026-10-01 07:45:26 UTC 12,716 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3932],{16003:(e,t,r)=>{"use strict";r.d(t,{MU:()=>l,Ou:()=>s,w_:()=>o});var n=r(40459);let i=parseInt(n.env.NEXT_PUBLIC_CLIENT_HTTP_TIMEOUT)||2500;parseInt(n.env.SERVER_HTTP_TIMEOUT);class l extends Error{}let s=async({url:e,options:t={},timeout:r})=>{void 0===r&&(r=i);let n=new AbortController,s=setTimeout(()=>n.abort(new l(`Timeout ${r} exceeded for url: ${e}`)),r);t.signal=n.signal;try{let r=await fetch(e,t);return clearTimeout(s),r}catch(e){throw clearTimeout(s),e instanceof l&&console.error(e),e}};async function o(e){let t=await fetch(`/ajax/gifs/trending?gif_ids=${e.join(",")}`);if(!t.ok)throw Error("Failed to fetch trending status");return t.json()}},27670:(e,t,r)=>{"use strict";r.d(t,{l:()=>s});var n=r(99680),i=r(34874),l=r(2011);let s=()=>{let e,t=(0,n.c)(2),r=(0,i.fq)();return t[0]!==r?(e=new l.uK(r),t[0]=r,t[1]=e):e=t[1],e}},36119:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>p,F2:()=>u,_I:()=>f,jn:()=>h});var n=r(54568),i=r(99680),l=r(79066),s=r(34874),o=r(7620),a=r(39865);let c=(0,o.createContext)({favorites:[],setFavorites:()=>{},hasChecked:[],setHasChecked:()=>{}}),u=e=>{let t,r,l,u,f=(0,i.c)(9),{children:h}=e,[p,v]=(e=>{let{user:t}=(0,o.useContext)(a.A),r=(0,o.useState)([]),[n,i]=(0,o.useState)(!1),l=(0,o.useRef)(!1),[c,u]=r,f=(0,s.fq)();return(0,o.useEffect)(()=>{if(t){if(!l.current){l.current=!0;let r=window.localStorage.getItem(e);d(r?JSON.parse(r):[],t,e,f)}}else if(n)try{window.localStorage.setItem(e,JSON.stringify(Array.from(new Set(c))))}catch(t){console.error(`failed to set ${e} in local`)}else try{let t=window.localStorage.getItem(e);u(t?JSON.parse(t):[]),i(!0)}catch(e){}},[f,n,e,u,c,t]),r})("local-favorites");f[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],f[0]=t):t=f[0];let[w,g]=(0,o.useState)(t);return f[1]===Symbol.for("react.memo_cache_sentinel")?(r=[],f[1]=r):r=f[1],(0,o.useEffect)(m,r),f[2]!==p||f[3]!==w||f[4]!==v?(l={favorites:p,setFavorites:v,hasChecked:w,setHasChecked:g},f[2]=p,f[3]=w,f[4]=v,f[5]=l):l=f[5],f[6]!==h||f[7]!==l?(u=(0,n.jsx)(c.Provider,{value:l,children:h}),f[6]=h,f[7]=l,f[8]=u):u=f[8],u};async function d(e,t,r,n){let i=e[0];if(i)try{setTimeout(async()=>{await (0,l.Gm)(i,t.token,document.cookie,n),window.localStorage.setItem(r,JSON.stringify(e.filter(e=>e!==i))),d(e.slice(1),t,r,n)},100)}catch(e){console.error(`failed to sync favorite ${i}`,e)}}function f(e){let t,r,n=(0,i.c)(15),{user:u}=(0,o.useContext)(a.A),d=(0,s.fq)(),{favorites:f,setFavorites:h,hasChecked:p,setHasChecked:m}=(0,o.useContext)(c),v=(0,o.useRef)(!1);if(n[0]!==d||n[1]!==p||n[2]!==e||n[3]!==h||n[4]!==m||n[5]!==u?(t=()=>{let t=async function(e){if(u){let t=await (0,l.nk)(e,u.token,d);h(r=>{let n=r.includes(e);return t&&!n?[...r,e]:!t&&n?r.filter(t=>t!==e):r}),m(t=>[...t,e])}};!e||v.current||p.includes(e)||(v.current=!0,t(e))},r=[d,p,e,h,m,u],n[0]=d,n[1]=p,n[2]=e,n[3]=h,n[4]=m,n[5]=u,n[6]=t,n[7]=r):(t=n[6],r=n[7]),(0,o.useEffect)(t,r),e){let t;if(!u){let t;return n[8]!==f||n[9]!==e?(t=f.includes(e),n[8]=f,n[9]=e,n[10]=t):t=n[10],t}return n[11]!==f||n[12]!==p||n[13]!==e?(t=p.includes(e)?f.includes(e):void 0,n[11]=f,n[12]=p,n[13]=e,n[14]=t):t=n[14],t}}function h(){let e,t=(0,i.c)(5),{user:r}=(0,o.useContext)(a.A),n=(0,s.fq)(),{favorites:u,setFavorites:d}=(0,o.useContext)(c);return t[0]!==n||t[1]!==u||t[2]!==d||t[3]!==r?(e=async function(e){let t=u.includes(e);if(r)return t?t&&(await (0,l.Fy)(e,r.token,document.cookie,n),d(t=>t.filter(t=>t!==e))):(await (0,l.Gm)(e,r.token,document.cookie,n),d(t=>[...t,e])),!t;t?d(t=>t.filter(t=>t!==e)):d(t=>[...t,e])},t[0]=n,t[1]=u,t[2]=d,t[3]=r,t[4]=e):e=t[4],e}let p=c;function m(){}},40124:(e,t,r)=>{"use strict";var n=r(72660),i=r(7620),l=n.__importDefault(r(59018));t.A=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=[]);var n=l.default(e,t),s=n[0],o=n[1],a=n[2];return i.useEffect(a,r),[s,o]}},59018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7620);t.default=function(e,t){void 0===t&&(t=0);var r=n.useRef(!1),i=n.useRef(),l=n.useRef(e),s=n.useCallback(function(){return r.current},[]),o=n.useCallback(function(){r.current=!1,i.current&&clearTimeout(i.current),i.current=setTimeout(function(){r.current=!0,l.current()},t)},[t]),a=n.useCallback(function(){r.current=null,i.current&&clearTimeout(i.current)},[]);return n.useEffect(function(){l.current=e},[e]),n.useEffect(function(){return o(),a},[t]),[s,a,o]}},61223:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>h,In:()=>d});var n=r(54568),i=r(99680),l=r(26274),s=r(54713),o=r(49346);let a=s.Ay.svg.withConfig({componentId:"sc-43dd8a39-0"})(["fill:white;height:100%;"]),c=s.Ay.div.withConfig({componentId:"sc-43dd8a39-1"})(["display:flex;width:100%;height:27px;",""],(0,o.L_)((0,s.AH)(["width:unset;height:38px;cursor:pointer;"]))),u=s.Ay.svg.withConfig({componentId:"sc-43dd8a39-2"})(["display:block;height:100%;width:21px;margin-right:6px;flex-shrink:0;.shadow{fill:#000;enable-background:new;opacity:0.4;}",""],(0,o.L_)((0,s.AH)(["width:28px;"]))),d=()=>{let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(u,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 35",children:(0,n.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",children:[(0,n.jsx)("path",{fill:l.DK,d:"M0 3h4v29H0z"}),(0,n.jsx)("path",{fill:l.MU,d:"M24 11h4v21h-4z"}),(0,n.jsx)("path",{fill:l.C2,d:"M0 31h28v4H0z"}),(0,n.jsx)("path",{fill:l.aw,d:"M0 0h16v4H0z"}),(0,n.jsx)("path",{fill:l.ze,d:"M24 8V4h-4V0h-4v12h12V8"}),(0,n.jsx)("path",{className:"shadow",d:"M24 16v-4h4M16 0v4h-4"})]})}),t[0]=e):e=t[0],e},f=()=>{let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(a,{viewBox:"0 0 128 36",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("g",{children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"m22.6,12c-2,-1.9 -4.4,-2.4 -6.2,-2.4c-4.4,0 -7.3,2.6 -7.3,8c0,3.5 1.8,7.8 7.3,7.8c1.4,0 3.7,-0.3 5.2,-1.4l0,-3.5l-6.9,0l0,-6l13.3,0l0,12.1c-1.7,3.5 -6.4,5.3 -11.7,5.3c-10.7,0 -14.8,-7.2 -14.8,-14.3c0,-7.1 4.7,-14.4 14.9,-14.4c3.8,0 7.1,0.8 10.7,4.4l-4.5,4.4zm9.1,19.2l0,-27.2l7.6,0l0,27.2l-7.6,0zm20.1,-7.4l0,7.3l-7.7,0l0,-27.1l13.2,0c7.3,0 10.9,4.6 10.9,9.9c0,5.6 -3.6,9.9 -10.9,9.9l-5.5,0zm0,-6.5l5.5,0c2.1,0 3.2,-1.6 3.2,-3.3c0,-1.8 -1.1,-3.4 -3.2,-3.4l-5.5,0l0,6.7zm36.7,13.9l0,-10.3l-9.8,0l0,10.3l-7.7,0l0,-27.2l7.7,0l0,10.3l9.8,0l0,-10.3l7.6,0l0,27.2l-7.6,0zm24.2,-17.9l5.9,-9.3l8.7,0l0,0.3l-10.8,16l0,10.8l-7.7,0l0,-10.8l-10.3,-16l0,-0.3l8.7,0l5.5,9.3z",id:"svg_2"})})})}),t[0]=e):e=t[0],e},h=({onClick:e=()=>location.href="/",className:t})=>(0,n.jsxs)(c,{onClick:e,className:t,children:[(0,n.jsx)(d,{}),(0,n.jsx)(f,{})]})},62605:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(48828);function i(e){return`${n.wh}/api/v4/channels/${e}`}r(34874)}
1,76857:(e,t,r)=>{"use strict";r.d(t,{G7:()=>n,I$:()=>i});let n=["gifs","stickers","clips"],i=["gifs","stickers","clips","emoji","memes","reactions","animals","text"]},77965:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(54568),i=r(99680);let l=e=>{let t,r,l=(0,i.c)(4),s=e.color||"white";return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1804 22C18.2992 22 18.4105 21.9592 18.5145 21.8775L21.8775 18.5145C21.9592 18.4105 22 18.2992 22 18.1804C22 18.0542 21.9592 17.9391 21.8775 17.8352L16.0423 12L21.8775 6.16481C21.9592 6.06088 22 5.9458 22 5.8196C22 5.70082 21.9592 5.58946 21.8775 5.48552L18.5145 2.1225C18.4105 2.04083 18.2992 2 18.1804 2C18.0542 2 17.9391 2.04083 17.8352 2.1225L12 7.95768L6.16481 2.1225C6.06088 2.04083 5.9458 2 5.8196 2C5.70082 2 5.58946 2.04083 5.48552 2.1225L2.1225 5.48552C2.04083 5.58946 2 5.70082 2 5.8196C2 5.9458 2.04083 6.06088 2.1225 6.16481L7.95768 12L2.1225 17.8352C2.04083 17.9391 2 18.0542 2 18.1804C2 18.2992 2.04083 18.4105 2.1225 18.5145L5.48552 21.8775C5.58946 21.9592 5.70082 22 5.8196 22C5.9458 22 6.06088 21.9592 6.16481 21.8775L12 16.0423L17.8352 21.8775C17.9391 21.9592 18.0542 22 18.1804 22Z"}),l[0]=t):t=l[0],l[1]!==e||l[2]!==s?(r=(0,n.jsx)("svg",{fill:s,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:t}),l[1]=e,l[2]=s,l[3]=r):r=l[3],r}},79066:(e,t,r)=>{"use strict";r.d(t,{Fy:()=>a,Gm:()=>o,nP:()=>s,nk:()=>u});var n=r(48828),i=r(34874),l=r(16003);let s=async(e,t)=>{let r=(0,i.LW)(new URL(`${n.OT.apiUrl}user/favorites`),e),s=await (0,l.Ou)({url:r,options:{method:"GET",credentials:"same-origin",headers:{authorization:`Token ${t}`,"Content-Type":"application/json"}}});return await s.json()},o=async(e,t,r,n)=>c(e,t,r,"POST",n),a=async(e,t,r,n)=>c(e,t,r,"DELETE",n),c=async(e,t,r,n,i)=>{let s=await (0,l.Ou)({url:d("user/favorites",t,i),options:{method:n,body:`gif_id=${e}`,headers:{cookie:r,Accept:"application/json",Authorization:`Token ${t}`,"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}}});return await s.json()},u=async(e,t,r)=>{let n=await (0,l.Ou)({url:d("user/favorites/statuses",t,r),options:{method:"POST",headers:{Authorization:`Token ${t}`,"Content-Type":"application/json"},body:JSON.stringify({gif_ids:[e]})}});return(await n.json()).data.length>0};function d(e,t,r){let l,s=`${n.OT.apiUrl}${e}`;try{l=new URL(s)}catch(e){throw console.error("Invalid URL:",s),e}return(0,i.LW)(l,{api_key:r,access_token:t})}},81229:(e,t,r)=>{"use strict";r.d(t,{AU:()=>l,Bd:()=>s,lQ:()=>n,on:()=>i});var n=function(){};function i(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function l(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var s="u">typeof window},82302:(e,t,r)=>{"use strict";r.d(t,{ug:()=>l}),r(902);var n=r(82576),i=r(98062);let l=e=>{var t;let r=(0,i.Tw)(e),l=(t=r,/(^|-)(transparents?|stickers?)(-|$)/.test(t)?"stickers":t.endsWith("-clips")||t.endsWith("-with-sound")?"clips":"gifs");return[r=(0,n.Bn)(r).replace(/-/g," ").trim(),l]}},89905:e=>{e.exports={style:{fontFamily:"'Interface', 'Interface Fallback'"},className:"__className_3c4319",variable:"__variable_3c4319"}},90483:(e,t,r)=>{"use strict";r.d(t,{HS:()=>g,J4:()=>k,Q5:()=>w,TQ:()=>C,Tt:()=>x,i9:()=>m,j9:()=>y,x8:()=>_});var n=r(99680),i=r(76857),l=r(62605),s=r(48828),o=r(82302),a=r(27670),c=r(34874),u=r(902),d=r(29266),f=r(57786);let h=s.OT.apiUrl.replace("v1","v2"),p=e=>new URLSearchParams(e).toString();function m(e){let t,r=(0,n.c)(2),i=(0,a.l)();return r[0]!==i?(t=e=>i.gif(e).then(v),r[0]=i,r[1]=t):t=r[1],(0,d.Ay)(e||null,t)}function v(e){return e.data}function w(){let e,t,r,l,s=(0,n.c)(6),a=(0,u.useParams)(),c=(0,u.useSearchParams)();return(s[0]!==c?(e=c.get("type")?.toLowerCase(),t=i.I$.includes(e),s[0]=c,s[1]=e,s[2]=t):(e=s[1],t=s[2]),t)?e:(s[3]!==a.term?([,l]=a.term?(0,o.ug)(a.term):[],r=i.G7.includes(l),s[3]=a.term,s[4]=r,s[5]=l):(r=s[4],l=s[5]),r)?l:"gifs"}function g(e){let t,r=(0,n.c)(2),i=void 0===e?null:e;return r[0]!==i?(t=i?(0,l.b)(i):null,r[0]=i,r[1]=t):t=r[1],(0,f.A)(t)}function y(e){return(0,f.A)((0,l.b)(e.id),null,{fallback:{[(0,l.b)(e.id)]:e}})}let _=(e,t)=>
1(0,d.Ay)(`${h}trending/searches?${p({...void 0===t?{}:t,q:void 0===e?"":e,api_key:(0,c.fq)()})}`),x=e=>e.trim().replace(/^@/,""),C=(e,t)=>{let r=(0,c.fq)(),n=e.trimStart().startsWith("@");return(0,d.Ay)(e?`${s.OT.apiUrl}channels/search?${p({...void 0===t?{}:t,...n?{search_mode:"general"}:{},q:x(e),api_key:r})}`:null)},k=(e,t)=>(0,d.Ay)(`${s.OT.apiUrl}gifs/search/tags?${p({...void 0===t?{}:t,q:e,api_key:(0,c.fq)()})}`)},98062:(e,t,r)=>{"use strict";r.d(t,{Tw:()=>l,fG:()=>o,l2:()=>s});var n=r(68839),i=r.n(n);let l=(e="")=>{try{let t=decodeURIComponent(e);return i()(t)}catch(t){console.error(`error decoding ${e}`,t)}return e},s=(e="")=>{let t=i()(e).trim();if(!t||t.startsWith("/")||t.startsWith("#"))return"";let r=t.startsWith("//")?`https:${t}`:/^[a-z][a-z\d+\-.]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(r);if("http:"!==e.protocol&&"https:"!==e.protocol)return"";e.protocol="https:";let n=/^\/\/[^/?#]+\/(?:[?#].*)?$/i.test(t)||/^[a-z][a-z\d+\-.]*:\/\/[^/?#]+\/(?:[?#].*)?$/i.test(t)||/^[^/?#]+\/(?:[?#].*)?$/i.test(t);if("/"===e.pathname&&!n)return`${e.origin}${e.search}${e.hash}`;return e.toString()}catch{return""}},o=(e="")=>("object"==typeof e&&(e=e.getAll().map(({name:e,value:t})=>`${e}=${t}`).join("; ")),{method:"get",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest",cookie:e||("u"<typeof document?"":document?.cookie)}})},98460:(e,t,r)=>{Promise.resolve().then(r.bind(r,44112)),Promise.resolve().then(r.bind(r,4446))}},e=>{e.O(0,[1210,8373,9166,5246,3442,2668,4713,2011,2616,1798,933,8928,5319,8984,8940,8828,8280,2805,598,267,8275,6590,3983,7404,587,7730,7358],()=>e(e.s=98460)),_N_E=e.O()}]);
2//# sourceMappingURL=layout-8bade5a745dd94b4.js.map

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.