1"use strict";(self.webpackChunkokx_nav=self.webpackChunkokx_nav||[]).push([[8648],{77250:(e,n,t)=>{t.d(n,{A:()=>m});var o=t(89379),r=t(41594),i=t(25613),a=t(68899),c=t(9698),d=t(32096),s=t.n(d),l=t(13734),u=t(19919),h=s().StickyComponent;const m=function(e){var n=e.className,t=void 0===n?"":n,d=e.children,s=e.id,m=void 0===s?"":s,f=e.refresh,v=e.position,x=void 0===v?"fixed":v,p=e.throttleTime,g=void 0===p?50:p,k=e.containerId,b=void 0===k?"risk-banner-root":k,y=e.sort,C=void 0===y?-1:y,T=(0,r.useRef)({}),A=(0,i.A)(function(){var e,n=(0,c.xM)().media,t=["sm","md"].includes(n),o=!!document.querySelector("#headerContainer .header-wrap.header-wrap-home"),r=t||o,i=document.querySelector("#headerContainer .header-wrap"),d=document.documentElement.scrollTop,s=document.getElementById(b),u=((null===(e=T.current)||void 0===e?void 0:e.getBoundingClientRect())||{height:0}).height;s&&(s.style.height="".concat(u,"px"));var h=function(){var e=0,n=function(e){var n=0;return document.querySelectorAll(e).forEach(function(e){n+=e.getBoundingClientRect().height}),n},t=n(".okx-sticky-top"),o=n(".static-banner");return r&&(e=Math.max(o+t-d,t)),{headerTop:e,stickyTop:t,staticTop:o}}(),m=h.headerTop,f=h.stickyTop,v=0;i&&(v=i.getBoundingClientRect().height,(0,l.r1)(r?m:0));var p=r?v+m:f;document.documentElement.style.setProperty("--global-header-height","".concat(p,"px")),"static"!==x&&a.A.trigger("global_risky_banner_fixed",{top:p,fixedTop:p})},g);return(0,r.useEffect)(function(){A()},[f]),(0,r.useEffect)(function(){document.addEventListener("scroll",A),window.addEventListener("resize",A)},[]),"static"===x?(0,u.jsx)("div",{className:"static-banner",ref:function(e){T.current=e},children:d}):(0,u.jsx)(h,(0,o.A)((0,o.A)({isTop:!0,id:m,className:t,position:"fixed",ref:function(e){T.current=e},sort:C},e),{},{children:d}))}},48648:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var o,r=t(89379),i=t(92901),a=t(23029),c=(t(41594),t(75206)),d=t.n(c),s=t(21259),l=t(63039),u=t(68899),h=t(9698),m=t(13734),f=t(77250),v=t(19919),x=function(e){var n=s.A.locale,t=e.id,o=void 0===t?"":t,r=e.headBanner,i=void 0===r?{}:r,a=e.ACTIVITY_ID,c=e.destory,d=i.title,x=void 0===d?"":d,p=i.backgroundColor,g=void 0===p?"":p,k=i.fontColor,b=i.linkTitle,y=i.cnLink,C=i.enLink,T="zh_CN"===n?y:C;T=(0,l.CZ)(T||"");var A=b?"":"hide-link";return(0,v.jsx)(f.A,{id:"headerBannerContainer",className:"home-header-banner-container",style:{backgroundColor:g,color:k},sort:-2,children:(0,v.jsx)("div",{className:"okg-container",children:(0,v.jsxs)("div",{className:"app-box",children:[(0,v.jsxs)("div",{className:"text-box",children:[(0,v.jsx)("span",{className:"banner-text",children:x}),(0,v.jsx)("a",{className:"banner-href ".concat(A),target:"_blank",href:T,style:{color:k},rel:"noreferrer",children:b})]}),(0,v.jsx)("button",{type:"button",id:"headerBannerClose",className:"banner-close",onClick:function(){var e=document.querySelector("#headerContainer .header-wrap").clientHeight,n=(0,h.xM)().media,t=0;["sm","md"].includes(n)&&(t=e),u.A.trigger("global_risky_banner_fixed",{top:t,fixedTop:e}),(0,m.r1)(0),localStorage.setItem(a,o),c()},children:(0,v.jsx)("i",{className:"icon okx-header-footer-close close-icon"})})]})})})},p=(0,i.A)(function e(){(0,a.A)(this,e)});o=p,p.container=null,p.root=null,p.show=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.destroy(),o.container=document.createElement("div"),o.container.id="risk-banner-root",o.container.className="nav-banner-container";var n=document.getElementById("headerContainer");n&&(document.body.insertBefore(o.container,n),o.root=d().createRoot(o.container),o.root.render((0,v.jsx)(x,(0,r.A)({destory:o.destroy,ACTIVITY_ID:e.ACTIVITY_ID||""},e))))},p.destroy=function(){o.container&&(o.root&&o.root.unmount(),o.container.remove(),o.container=null,o.root=null)}}}]); 2//# sourceMappingURL=https://static-daily.okg.com/crash/okfe/okx-nav/common/8648.5bbcb0c1.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.