PageSourceSearch

https://news.kiwistand.com/assets/AnalyticsConsent-Dhul02x2.js

js kiwistand.com collected 2026-09-25 20:21:03 UTC 2,737 bytes, 1 lines download raw bytes

1import{r as i,j as e}from"./ui-vendor-DZW5S97P.js";import{l as u}from"./main-CW_lzEEO.js";import"./react-vendor-CykwZ3JM.js";import"./wallet-vendor-BnZsR9b0.js";function m(){const[r,n]=i.useState(!1),[t,c]=i.useState(window.innerWidth>=641);i.useEffect(()=>{(async()=>{if(u()||localStorage.getItem("anon-mode")==="true")return;const d=window.sdk?await window.sdk.isInMiniApp():!1,a=localStorage.getItem("kiwi-analytics-consent");if(d){o();return}a===null?(n(!0),o()):a==="false"||o()})().catch(console.error);const s=()=>{c(window.innerWidth>=641)};return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]);const o=()=>{window.gtag&&window.gtag("consent","update",{analytics_storage:"granted"}),window.posthog&&typeof window.posthog.init=="function"&&window.posthog.init("phc_F3mfkyH5tKKSVxnMbJf0ALcPA98s92s3Jw8a7eqpBGw",{api_host:"https://eu.i.posthog.com",person_profiles:"identified_only"})},l=()=>{localStorage.setItem("kiwi-analytics-consent","true"),n(!1),window.dispatchEvent(new Event("analyticsConsentChange"))},p=()=>{localStorage.setItem("kiwi-analytics-consent","false"),n(!1),window.dispatchEvent(new Event("analyticsConsentChange")),window.gtag&&window.gtag("consent","update",{analytics_storage:"denied"}),window.posthog&&window.posthog.opt_out_capturing()};return r?e.jsx("div",{style:{position:"fixed",bottom:t?0:"calc(45px + env(safe-area-inset-bottom, 0px))",left:0,right:0,backgroundColor:"var(--background-color0)",borderTop:"var(--border)",padding:"12px 15px",zIndex:1e3,boxShadow:"0 -2px 5px rgba(0, 0, 0, 0.05)"},children:e.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",display:"flex",flexDirection:t?"row":"column",alignItems:t?"center":"flex-start",justifyContent:"space-between",gap:t?"0":"10px"},children:[e.jsx("div",{children:e.jsxs("p",{style:{margin:0,fontSize:"14px",color:"var(--text-primary)"},children:["We use analytics cookies to improve our site. You can opt out if you prefer. See our ",e.jsx("a",{href:"/privacy-policy",children:"Privacy Policy"}),"."]})}),e.jsxs("div",{style:{display:"flex",gap:"10px",width:t?"auto":"100%",justifyContent:t?"flex-end":"space-between"},children:[e.jsx("button",{onClick:p,className:"analytics-consent-decline",style:{backgroundColor:"var(--bg-white)",color:"var(--text-primary)",border:"var(--border-thin)",padding:"8px 12px",cursor:"pointer",fontSize:"14px",borderRadius:"2px"},children:"Opt Out"}),e.jsx("button",{onClick:l,className:"analytics-consent-accept",style:{backgroundColor:"var(--button-primary-bg)",color:"var(--button-primary-text)",border:"1px solid var(--button-primary-bg)",padding:"8px 12px",cursor:"pointer",fontSize:"14px",borderRadius:"2px"},children:"Continue"})]})]})}):null}export{m as default};

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.