PageSourceSearch

https://chicute.com/_next/static/chunks/4066.a556d636925b05b2.js

js chicute.com collected 2026-09-26 21:13:30 UTC 2,634 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4066],{94066:function(e,t,n){n.r(t),n.d(t,{default:function(){return l},resetCustomerAccountExtensionCache:function(){return c}});var r=n(85893),o=n(67294);let a=null,i=null;function s(e){return e.id||e.handle||null}function l(e){let{target:t,domainSlug:n,bearerToken:l,context:c}=e,[u,f]=(0,o.useState)([]),[d,m]=(0,o.useState)({}),[h,p]=(0,o.useState)({});(0,o.useEffect)(()=>{n&&l&&(function(e,t){if(a)return Promise.resolve(a);if(i)return i;let n={"Content-Type":"application/json"};return t&&(n.Authorization="Bearer ".concat(t)),i=fetch("/api/apps/customer-account-extensions?domainSlug=".concat(encodeURIComponent(e)),{headers:n}).then(e=>{if(!e.ok)throw Error("extensions fetch failed: ".concat(e.status));return e.json()}).then(e=>a=e.extensions||[]).catch(()=>(i=null,[]))})(n,l).then(e=>{f(e.filter(e=>e.target===t))})},[n,t,l]),(0,o.useEffect)(()=>{if(!u.length)return;let e=new Set(u.map(s).filter(Boolean));function t(t){let n=t.data;if(!n||"APP_BRIDGE_RESIZE"!==n.type||!e.has(n.extensionId)||!Array.from(document.querySelectorAll('.customer-account-extension-slot iframe[data-extension-id="'.concat(n.extensionId,'"]'))).some(e=>e.contentWindow===t.source))return;let r=Number(n.height);if(!Number.isFinite(r))return;let o=Math.min(4e3,Math.max(40,Math.ceil(r)));p(e=>e[n.extensionId]===o?e:{...e,[n.extensionId]:o})}return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[u]);let x=JSON.stringify(c||{});return 0===u.filter((e,t)=>!d[t]).length?null:(0,r.jsx)("div",{className:"customer-account-extension-slot","data-target":t,children:u.map((e,o)=>{if(d[o])return null;let a=s(e),i=function(e,t){let n,{target:r,domainSlug:o,context:a}=t;if(!e.iframeUrl)return"";try{n=new URL(e.iframeUrl,window.location.origin)}catch(t){return e.iframeUrl}n.searchParams.set("target",r),o&&n.searchParams.set("domainSlug",o);let i=s(e);for(let[e,t]of(i&&n.searchParams.set("extensionId",i),Object.entries(a||{})))null!=t&&""!==t&&n.searchParams.set(e,String(t));return n.toString()}(e,{target:t,domainSlug:n,context:c});return(0,r.jsx)("div",{className:"my-2",children:(0,r.jsx)("iframe",{src:i,"data-extension-id":a||void 0,title:e.appName||"Extension ".concat(o),style:{width:"100%",border:"none",display:"block",height:"".concat(a&&h[a]||120,"px"),transition:"height 120ms ease-out"},scrolling:"no",sandbox:"allow-scripts allow-forms allow-popups allow-top-navigation-by-user-activation",loading:"lazy",onError:()=>m(e=>({...e,[o]:!0}))})},"".concat(e.appId,"-").concat(o,"-").concat(x))})})}function c(){a=null,i=null}}}]);

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.