1(globalThis.webpackChunkv2||=[]).push([[6364],{636364(e,t,a){"use strict";a.d(t,{TickerMarquee:()=>v});var r=a(13896),n=a(810790);let o=function(e){return e.NEUTRAL="neutro",e.RISE="positivo",e.FALL="negativo",e}({});function i(e){return(0,n.jsx)("span",{children:(0,n.jsx)("a",{href:e.link,target:"_blank",children:(0,n.jsxs)("div",{className:"relative hover:bg-neutral-200 hover:cursor-pointer bg-neutral-100 font-semibold text-wl-neutral-950 flex flex-nowrap items-left gap-2 !px-4 !py-2 text-xs leading-4 !border-r !border-wl-neutral-400",children:[(0,n.jsx)("span",{className:"w-max flex flex-nowrap",children:e.label}),(0,n.jsx)("span",{className:"w-max flex flex-nowrap font-normal",children:e.quotation}),(0,n.jsx)("span",{className:{neutro:"text-wl-neutral-400 font-semi-bold",positivo:"text-wl-asset-rise font-semi-bold",negativo:"text-wl-asset-down font-semi-bold"}[e.variationType],children:e.variationValue})]})})})}var c=a(951609),s=a(851521),l=a(941089),u=a(797334),d=a(265292),h=a(340968),m=a(327223);class g{static B3_SYMBOLS=["IBOV","IFIX","MGLU3","PETR4","VALE3","ITUB4","ABEV3","GGBR4"];static CURRENCY_SYMBOL="usd";static CRYPTO_SYMBOLS=["bitcoin"];static ORDERED_ITEMS=[{provider:"quoteService",symbol:"IBOV",customName:"Ibovespa",securityType:"index"},{provider:"currencyService",symbol:"USD",customName:"DOLAR",securityType:"currency"},{provider:"criptoService",symbol:"BTC",customName:"BITCOIN",securityType:"currency"},{provider:"quoteService",symbol:"IFIX",customName:null,securityType:"index"},{provider:"quoteService",symbol:"MGLU3",customName:null,securityType:"quote"},{provider:"quoteService",symbol:"PETR4",customName:null,securityType:"quote"},{provider:"quoteService",symbol:"VALE3",customName:null,securityType:"quote"},{provider:"quoteService",symbol:"ITUB4",customName:null,securityType:"quote"},{provider:"quoteService",symbol:"ABEV3",customName:null,securityType:"quote"},{provider:"quoteService",symbol:"GGBR4",customName:null,securityType:"quote"}];static async getData(e){const t=await this.fetchFromBlob(e);return t&&t.length>0?t:this.fetchFromApi(e)}static async fetchFromBlob(e){const t=await h.L.getBlob({enabled:!0,duration:e.marketCacheDuration});return t?t.data.map(this.mapBlobItemToTickerItem).filter(e=>null!==e):null}static async fetchFromApi(e){const[t,a,r]=await Promise.all([l.K.getIntradayLastQuote({symbols:this.B3_SYMBOLS},{enabled:!0,duration:e.marketCacheDuration}),u.P.getIntradayCurrency(this.CURRENCY_SYMBOL,{enabled:!0,duration:e.cryptoCacheDuration}),d.d.getCriptoLast(this.CRYPTO_SYMBOLS,{enabled:!0,duration:e.cryptoCacheDuration})]),n=new Array;return this.ORDERED_ITEMS.forEach(e=>{if("quoteService"===e.provider){const a=t?.result?.find(t=>t.symbol===e.symbol),r=this.mapIntradayItemToTickerItem(a,e.customName,e.securityType);r&&n.push(r)}else if("currencyService"===e.provider){const t=this.mapCurrencyItemToTickerItem(a?.result?.[0],e.customName);t&&n.push(t)}else if("criptoService"===e.provider){const t=this.mapCriptoItemToTickerItem(r?.result?.[0],e.customName);t&&n.push(t)}}),n}static mapBlobItemToTickerItem(e){if(!e)return null;const t="b3"===e.type&&["IBOV","IFIX"].includes(e.symbol),a="currency"===e.type;return{label:"IBOV"===e.symbol?"Ibovespa":"USD"===e.symbol?"DOLAR":"BITCOIN"===e.symbol.toUpperCase()?"BITCOIN":e.symbol,quotation:t?`${(0,m.lq)(e.value)}pts`:`R$${a?(0,m.$J)(e.value,2):(0,m.vv)(e.value.toString(),2)}`,variationType:0===e.change?o.NEUTRAL:e.change>0?o.RISE:o.FALL,variationValue:(0,m.l9)(e.change),link:"currency"===e.type?"/cotacoes/cambio/moeda/dolar/":`/${e.symbol}`}}static mapIntradayItemToTickerItem(e,t,a){if(!e)return null;const r={quote:e=>`R$${(0,m.$J)(e,2)}`,index:e=>`${(0,m.lq)(e)}pts`,default:e=>(0,m.$J)(e,2)};return{label:t||e.symbol,quotation:r[a](e.price),variationType:0===e.change?o.NEUTRAL:e.change>0?o.RISE:o.FALL,variationValue:(0,m.l9)(e.change),link:`/${e.symbol}`}}static mapCurrencyItemToTickerItem(e,t){return e?{label:t||e.symbol,quotation:`R$${(0,m.$J)(e.bid,2)}`,variationType:0===e.change?o.NEUTRAL:e.change>0?o.RISE:o.FALL,variationValue:(0,m.l9)(e.change),link:"/cotacoes/cambio/moeda/dolar/"}:null}static mapCriptoItemToTickerItem(e,t){return e?{label:t||e.symbol,quotation:`R$${(0,m.vv)(e.price.toString(),2)}`,variationType:0===e.change?o.NEUTRAL:e.change>0?o.RISE:o.FALL,variationValue:(0,m.l9)(e.change),link:`/${e.symbol}`}:null}}var p=a(648283),y=a(441862);const f=37e4,v=()=>{const[e,t]=(0,c.useState)([]),[a,o]=(0,c.useState)(!0),[l,u]=(0,c.useState)(!1),d=(0,p.f)(),h=document.querySelector('[data-ds-component="simulator-xp"]'),m=(0,y.qX)(f);(0,c.useEffect)(()=>{d&&g.getData({marketCacheDuration:m,cryptoCacheDuration:f}).then(t)},[d,m]),(0,c.useEffect)(()=>{setTimeout(function(){u(!0)},400)},[e.length<0]);const v=(0,c.useRef)(null),S=(0,c.useRef)(null),b="z-10 absolute text-white hover:!text-wl-action-link-hover hover:bg-neutral-200 hover:cursor-pointer bg-neutral-100 items-left gap-1 !px-3 !py-2 w-9.5 h-8",C="z-10 absolute text-white hover:!text-wl-action-link-hover hover:bg-neutral-200 hover:cursor-pointer bg-neutral-100 items-left gap-1 !px-3 !py-2 w-9.5 h-8";return(0,n.jsx)(n.Fragment,{children:l&&(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{ref:S,className:h?C:b,onClick:()=>{o(!0),S.current.style.zIndex="10",v.current.style.zIndex="11"},"aria-label":"Play",children:(0,n.jsx)("div",{className:"size-3.5",children:(0,n.jsx)(r.A,{type:"play-fill"})})}),(0,n.jsx)("button",{ref:v,className:h?C:b,onClick:()=>{o(!1),v.current.style.zIndex="10",S.current.style.zIndex="11"},"aria-label":"Pause",children:(0,n.jsx)("div",{className:"size-3.5",children:(0,n.jsx)(r.A,{type:"pause-fill"})})}),(0,n.jsxs)("div",{className:"marquee relative overflow-hidden w-full h-8",children:[(0,n.jsx)(s.A,{play:a,speed:25,autoFill:!0,
1children:e.map(e=>(0,n.jsx)(i,{label:e.label,quotation:e.quotation,variationType:e.variationType,variationValue:e.variationValue,link:e.link},e.label))}),(0,n.jsx)("div",{className:"marqueeone absolute w-full left-full h-8 flex flex-nowrap justify-between"})]})]})})}},327223(e,t,a){"use strict";a.d(t,["$J",0,(e,t=2)=>{if(null===e)return null;const a=parseFloat(e.toString().replace(",",".")),r=Math.pow(10,t);return(Math.floor(a*r)/r).toFixed(t).replace(".",",")},"l9",0,e=>null===e?null:`${e>0?"+":""}${e.toFixed(2)+"%"}`,"lq",0,e=>{if(null===e)return null;const t=parseFloat(e.toString().replace(",",".")),a=Math.pow(10,0);return(Math.floor(t*a)/a).toString().replace(/\d(?=(?:\d{3})+$)/g,"$&.")},"vv",0,(e,t=2)=>parseFloat(e.toString().replace(",",".")).toLocaleString("pt-BR",{minimumFractionDigits:t})])},648283(e,t,a){"use strict";var r=a(951609);a.d(t,["f",0,()=>{const[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t("visible"===document.visibilityState);const e=()=>{t("visible"===document.visibilityState)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),e}])},441862(e,t,a){"use strict";var r=a(951609),n=a(834510);a.d(t,["qX",0,(e=37e4)=>{const{cacheConfig:t}=((e={})=>{const{defaultTTL:t=37e4,autoCalculate:a=!0}=e,[o,i]=(0,r.useState)(null),[c,s]=(0,r.useState)(!1),[l,u]=(0,r.useState)(null),d=(0,r.useCallback)(()=>{s(!0),u(null);try{const e=n.q.createMarketBasedCacheConfig({defaultTTL:t});i(e)}catch(e){const a=e instanceof Error?e.message:"Unknown error";u(a),i({enabled:!0,duration:t})}finally{s(!1)}},[t]);return(0,r.useEffect)(()=>{a&&d()},[d,a]),{cacheConfig:o,isLoading:c,error:l,recalculate:d,formatDuration:n.q.formatDuration}})({defaultTTL:e,autoCalculate:!0});return t?.duration??e}])},834510(e,t,a){"use strict";a.d(t,{q:()=>n});var r=a(307531);class n{static _isInvalidating=!1;static _lastKnownSignature=null;static SIGNATURE_STORAGE_KEY="market_cache_signature";static getMarketHoursConfig(){try{const e=window.InfoMoneyPage?.market_hours;return e?"boolean"!=typeof e.enabled||"string"!=typeof e.open_time||"string"!=typeof e.close_time?(console.warn("MarketCacheService: Invalid market_hours structure"),null):(this.checkAndInvalidateOnConfigChange(),e):(console.warn("MarketCacheService: market_hours not found in window.InfoMoneyPage"),null)}catch(e){return console.warn("MarketCacheService: Failed to get market config from window",e),null}}static generateMarketSignature(){const e=this.getMarketHoursConfig();return e?{enabled:e.enabled,open_time:e.open_time,close_time:e.close_time,timezone:e.timezone||"America/Sao_Paulo"}:null}static checkAndInvalidateOnConfigChange(){if(!this._isInvalidating){this._isInvalidating=!0;try{const e=this.generateMarketSignature(),t=this.getLastKnownSignature();if(!e)return;
1this.isSignatureDirty(t,e)&&(console.log("MarketCacheService: Configuration changed, invalidating market data cache"),this.invalidateMarketDataCache(),this.saveCurrentSignature(e)),this._lastKnownSignature=e}catch(e){console.warn("MarketCacheService: Error checking config changes",e)}finally{this._isInvalidating=!1}}}static getLastKnownSignature(){if(this._lastKnownSignature)return this._lastKnownSignature;try{const e=localStorage.getItem(this.SIGNATURE_STORAGE_KEY);if(e){const t=JSON.parse(e);return this._lastKnownSignature=t,t}}catch(e){console.warn("MarketCacheService: Error reading signature from localStorage",e)}return null}static saveCurrentSignature(e){try{localStorage.setItem(this.SIGNATURE_STORAGE_KEY,JSON.stringify(e)),this._lastKnownSignature=e}catch(e){console.warn("MarketCacheService: Error saving signature to localStorage",e)}}static invalidateMarketDataCache(){try{r._.clearAll(),console.log("MarketCacheService: Cache cleared via CacheService.clearAll()")}catch(e){console.warn("MarketCacheService: Error using CacheService, falling back to manual cleanup",e)}}static calculateMarketBasedTTL(e={}){const{defaultTTL:t=37e4}=e,a=this.getMarketHoursConfig();return a&&a.enabled?this.calculateMarketStatus(a.open_time,a.close_time,a.timezone)?t:this.calculateTTLUntilMarketOpen(a.open_time,a.timezone):t}static calculateMarketStatus(e,t,a){try{const r=a||"America/Sao_Paulo",n=new Date,o=new Date(n.toLocaleString("en-US",{timeZone:r})),i=o.getDay();if(0===i||6===i)return!1;const[c,s]=e.split(":").map(Number),[l,u]=t.split(":").map(Number),d=new Date(o.getFullYear(),o.getMonth(),o.getDate(),c,s),h=new Date(o.getFullYear(),o.getMonth(),o.getDate(),l,u);return o>=d&&o<h}catch(e){return console.warn("MarketCacheService: Error calculating market status, assuming closed",e),!1}}static calculateTTLUntilMarketOpen(e,t){try{const a=t||"America/Sao_Paulo",r=new Date,n=new Date(r.toLocaleString("en-US",{timeZone:a})),[o,i]=e.split(":").map(Number);let c=new Date(n.getFullYear(),n.getMonth(),n.getDate(),o,i);c<=n&&(c=this.getNextBusinessDay(c,o,i));const s=c.getTime()-n.getTime();return Math.max(s,0)}catch(e){return console.warn("MarketCacheService: Error calculating TTL, using default fallback",e),37e4}}static getNextBusinessDay(e,t,a){const r=new Date(e);r.setDate(r.getDate()+1),r.setHours(t,a,0,0);const n=r.getDay();return 0===n?r.setDate(r.getDate()+1):6===n&&r.setDate(r.getDate()+2),r}static createMarketBasedCacheConfig(e={}){return{enabled:!0,duration:this.calculateMarketBasedTTL(e)}}static formatDuration(e){const t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return t>0?`${t}h ${a}m`:`${a}m`}static debugTTL(e={}){const{defaultTTL:t=37e4}=e,a=this.getMarketHoursConfig(),r=this.calculateMarketBasedTTL(e),n=this.isMarketOpen();console.group("MarketCacheService Debug"),console.log("Market Config:",a),console.log("Default TTL:",this.formatDuration(t)),console.log("Calculated TTL:",this.formatDuration(r)),console.log("TTL Difference:",this.formatDuration(r-t)),console.log("Feature Flag Enabled:",a?.enabled??!1),console.log("Market Currently Open (calculated locally):",n),console.log("Market Open (from backend):",a?.is_open??"not provided"),console.log("Timezone:",a?.timezone??"unknown"),console.log("Current Time (local):",(new Date).toLocaleString()),a?.timezone&&console.log(`Current Time (${a.timezone}):`,(new Date).toLocaleString("en-US",{timeZone:a.timezone})),console.groupEnd()}static isMarketOpen(){const e=this.getMarketHoursConfig();return!(!e||!e.enabled)&&this.calculateMarketStatus(e.open_time,e.close_time,e.timezone)}static isMarketHoursEnabled(){const e=this.getMarketHoursConfig();return e?.enabled??!1}static isSignatureDirty(e,t){return!e||!t||e.enabled!==t.enabled||e.open_time!==t.open_time||e.close_time!==t.close_time||e.timezone!==t.timezone}static forceConfigurationCheck(){try{const e=this.generateMarketSignature(),t=this.getLastKnownSignature();
1return e?this.isSignatureDirty(t,e)?(console.log("MarketCacheService: Force check detected changes, invalidating cache"),this.invalidateMarketDataCache(),this.saveCurrentSignature(e),!0):(console.log("MarketCacheService: Force check - no changes detected"),!1):(console.warn("MarketCacheService: Cannot force check - no current signature available"),!1)}catch(e){return console.warn("MarketCacheService: Error in force configuration check",e),!1}}static clearConfigurationCache(){try{this._lastKnownSignature=null,localStorage.removeItem(this.SIGNATURE_STORAGE_KEY),console.log("MarketCacheService: Configuration cache cleared")}catch(e){console.warn("MarketCacheService: Error clearing configuration cache",e)}}static getConfigurationStatus(){const e=this.generateMarketSignature(),t=this.getLastKnownSignature();return{hasMemoryCache:null!==this._lastKnownSignature,hasStorageCache:(()=>{try{return null!==localStorage.getItem(this.SIGNATURE_STORAGE_KEY)}catch{return!1}})(),currentSignature:e,lastKnownSignature:t,configurationChanged:this.isSignatureDirty(t,e),cacheStats:r._.getStats()}}static clearExpiredCache(){try{r._.clearExpired(),console.log("MarketCac
1heService: Expired cache cleared via CacheService")}catch(e){console.warn("MarketCacheService: Error clearing expired cache",e)}}static getCacheStats(){try{return r._.getStats()}catch(e){return console.warn("MarketCacheService: Error getting cache stats",e),{totalItems:0,expiredItems:0,totalSize:0}}}}},265292(e,t,a){"use strict";a.d(t,{d:()=>o});var r=a(75116),n=a(307531);class o{static config=r.A.getConfig();static async getIntradayCripto(e,t){const a=`cripto_intraday_${e}`;if(t?.enabled){const e=n._.get(a);if(e)return e}try{const r=await fetch(`${o.config.url}cryptocurrency/quote/intraday/${e}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":o.config.subscriptionKey}});if(!r.ok)throw new Error("Response was not ok. Status: "+r.status);const i=200!==r.status?null:await r.json();return t?.enabled&&i&&n._.set(a,i,t.duration),i}catch(e){return console.error("CriptoService.getIntradayCripto: Error in fetching data:",e),null}}static async getIntradayLeaderboard(e,t){const a="cripto_leaderboard",i={...e};if(t?.enabled){const e=n._.get(a,i);if(e)return e}try{const c=r.A.getParams(e),s=await fetch(`${o.config.url}cryptocurrency/quote/intraday/leaderboard?${c}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":o.config.subscriptionKey}});if(!s.ok)throw new Error("Response was not ok. Status: "+s.status);const l=200!==s.status?null:await s.json();return t?.enabled&&l&&n._.set(a,l,t.duration,i),l}catch(e){return console.error("CriptoService.getIntradayLeaderboardCripto: Error in fetching data:",e),null}}static async getCriptoLast(e,t){const a="cripto_last",r={symbols:[...e].sort()};if(t?.enabled){const e=n._.get(a,r);if(e)return e}try{const i=e.map(e=>`Symbols=${e}`).join("&"),c=await fetch(`${o.config.url}cryptocurrency/quote/intraday/last?${i}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":o.config.subscriptionKey}});if(!c.ok)throw new Error("Response was not ok. Status: "+c.status);const s=200!==c.status?null:await c.json();return t?.enabled&&s&&n._.set(a,s,t.duration,r),s}catch(e){return console.error("CriptoService.getCriptoLast: Error in fetching data:",e),null}}static clearCache(){n._.clearAll()}static clearExpiredCache(){n._.clearExpired()}static removeCacheItem(e,t,a){let r;switch(e){case"intraday":r=`cripto_intraday_${t}`;break;case"leaderboard":r="cripto_leaderboard";break;case"last":r="cripto_last";break;default:return void console.warn("CriptoService.removeCacheItem: Unknown method:",e)}n._.remove(r,a)}static getCacheStats(){return n._.getStats()}}},797334(e,t,a){"use strict";a.d(t,{P:()=>o});var r=a(75116),n=a(307531);class o{static async getDaily(e,t,a){const o=`currency_daily_${e}`,i={...t};if(a?.enabled){const e=n._.get(o,i);if(e)return e}try{const c=r.A.getConfig(),s=r.A.getParams(t),l=await fetch(`${c.url}currency/quote/daily/${e}?${s}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":c.subscriptionKey}});if(!l.ok)throw new Error("Response was not ok. Status: "+l.status);const u=200!==l.status?null:await l.json();return a?.enabled&&u&&n._.set(o,u,a.duration,i),u}catch(e){return console.error("CurrencyService.getDaily: Error in fetching data:",e),null}}static async getIntradayCurrency(e,t){const a=`currency_intraday_${e}`;if(t?.enabled){const e=n._.get(a);if(e)return e}try{const o=r.A.getConfig(),i=await fetch(`${o.url}currency/quote/intraday/${e}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":o.subscriptionKey}});if(!i.ok)throw new Error("Response was not ok. Status: "+i.status);const c=200!==i.status?null:await i.json();return t?.enabled&&c&&n._.set(a,c,t.duration),c}catch(e){return console.error("CurrencyService.getIntradayCurrency: Error in fetching data:",e),null}}static async getCurrencyChart(e,t,a){const o=`currency_chart_${e}`,i={...t};if(a?.enabled){const e=n._.get(o,i);if(e)return e}try{const c=r.A.getConfig(),s=r.A.getParams(t),l=await fetch(`${c.url}currency/quote/daily/chart/${e}?${s}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":c.subscriptionKey}});if(!l.ok)throw new Error("Response was not ok. Status: "+l.status);const u=200!==l.status?null:await l.json();return a?.enabled&&u&&n._.set(o,u,a.duration,i),u}catch(e){return console.error("CurrencyService.getCurrencyChart: Error in fetching data:",e),null}}static async getCurrencyLast(e,t){const a="currency_last",o={symbols:[...e].sort()};if(t?.enabled){const e=n._.get(a,o);if(e)return e}try{const i=r.A.getConfig(),c=e.map(e=>`Symbols=${e}`).join("&"),s=await fetch(`${i.url}currency/quote/intraday/last?${c}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.subscriptionKey}});if(!s.ok)throw new Error("Response was not ok. Status: "+s.status);const l=200!==s.status?null:await s.json();return t?.enabled&&l&&n._.set(a,l,t.duration,o),l}catch(e){return console.error("CurrencyService.getCurrencyLast: Error in fetching data:",e),null}}static clearCache(){n._.clearAll()}static clearExpiredCache(){n._.clearExpired()}static removeCacheItem(e,t,a){let r;switch(e){case"daily":r=`currency_daily_${t}`;break;case"intraday":r=`currency_intraday_${t}`;break;case"chart":r=`currency_chart_${t}`;break;case"last":r="currency_last";break;default:return void console.warn("CurrencyService.removeCacheItem: Unknown method:",e)}n._.remove(r,a)}static getCacheStats(){return n._.getStats()}}},851521(e,t,a){var r=a(951609);function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r);!function(e){if("undefined"==typeof window)return;const t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}('.rfm-marquee-container {\n overflow-x: hidden;\n display: flex;\n flex-direction: row;\n position: relative;\n width: var(--width);\n transform: var(--transform);\n}\n.rfm-marquee-container:hover div {\n animation-play-state: var(--pause-on-hover);\n}\n.rfm-marquee-container:active div {\n animation-play-state: var(--pause-on-click);\n}\n\n.rfm-overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.rfm-overlay::before, .rfm-overlay::after {\n background: linear-gradient(to right, var(--gradient-color), rgba(255, 255, 255, 0));\n content: "";\n height: 100%;\n position: absolute;\n width: var(--gradient-width);\n z-index: 2;\n pointer-events: none;\n touch-action: none;\n}\n.rfm-overlay::after {\n right: 0;\n top: 0;\n transform: rotateZ(180deg);\n}\n.rfm-overlay::before {\n left: 0;\n top: 0;\n}\n\n.rfm-marquee {\n flex: 0 0 auto;\n min-width: var(--min-width);\n z-index: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n animation: scroll var(--duration) linear var(--delay) var(--iteration-count);\n animation-play-state: var(--play);\n animation-delay: var(--delay);\n animation-direction: var(--direction);\n}\n@keyframes scroll {\n 0% {\n transform: translateX(0%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n\n.rfm-initial-child-container {\n flex: 0 0 auto;\n display: flex;\n min-width: auto;\n flex-direction: row;\n align-items: center;\n}\n\n.rfm-child {\n transform: var(--transform);\n}');const i=r.forwardRef(function({style:e={},className:t="",autoFill:a=!1,play:n=!0,pauseOnHover:i=!1,pauseOnClick:c=!1,direction:s="left",speed:l=50,delay:u=0,loop:d=0,gradient:h=!1,gradientColor:m="white",gradientWidth:g=200,onFinish:p,onCycleComplete:y,onMount:f,children:v},S){const[b,C]=r.useState(0),[w,k]=r.useState(0),[T,_]=r.useState(1),[E,I]=r.useState(!1),M=r.useRef(null),x=S||M,A=r.useRef(null),L=r.useCallback(()=>
1{if(A.current&&x.current){const e=x.current.getBoundingClientRect(),t=A.current.getBoundingClientRect();let r=e.width,n=t.width;"up"!==s&&"down"!==s||(r=e.height,n=t.height),_(a&&r&&n&&n<r?Math.ceil(r/n):1),C(r),k(n)}},[a,x,s]);r.useEffect(()=>{if(E&&(L(),A.current&&x.current)){const e=new ResizeObserver(()=>L());return e.observe(x.current),e.observe(A.current),()=>{e&&e.disconnect()}}},[L,x,E]),r.useEffect(()=>{L()},[L,v]),r.useEffect(()=>{I(!0)},[]),r.useEffect(()=>{"function"==typeof f&&f()},[]);const D=r.useMemo(()=>a?w*T/l:w<b?b/l:w/l,[a,b,w,T,l]),R=r.useMemo(()=>Object.assign(Object.assign({},e),{"--pause-on-hover":!n||i?"paused":"running","--pause-on-click":!n||i&&!c||c?"paused":"running","--width":"up"===s||"down"===s?"100vh":"100%","--transform":"up"===s?"rotate(-90deg)":"down"===s?"rotate(90deg)":"none"}),[e,n,i,c,s]),$=r.useMemo(()=>({"--gradient-color":m,"--gradient-width":"number"==typeof g?`${g}px`:g}),[m,g]),N=r.useMemo(()=>({"--play":n?"running":"paused","--direction":"left"===s?"normal":"reverse","--duration":`${D}s`,"--delay":`${u}s`,"--iteration-count":d?`${d}`:"infinite","--min-width":a?"auto":"100%"}),[n,s,D,u,d,a]),q=r.useMemo(()=>({"--transform":"up"===s?"rotate(90deg)":"down"===s?"rotate(-90deg)":"none"}),[s]),O=r.useCallback(e=>[...Array(Number.isFinite(e)&&e>=0?e:0)].map((e,t)=>o.default.createElement(r.Fragment,{key:t},r.Children.map(v,e=>o.default.createElement("div",{style:q,className:"rfm-child"},e)))),[q,v]);return E?o.default.createElement("div",{ref:x,style:R,className:"rfm-marquee-container "+t},h&&o.default.createElement("div",{style:$,className:"rfm-overlay"}),o.default.createElement("div",{className:"rfm-marquee",style:N,onAnimationIteration:y,onAnimationEnd:p},o.default.createElement("div",{className:"rfm-initial-child-container",ref:A},r.Children.map(v,e=>o.default.createElement("div",{style:q,className:"rfm-child"},e))),O(T-1)),o.default.createElement("div",{className:"rfm-marquee",style:N},O(T))):null});t.A=i}}]);
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.