@hifilabs/pixel 0.14.4 → 0.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1 -1
- package/dist/browser.min.js +1 -1
- package/package.json +1 -1
package/dist/browser.js
CHANGED
package/dist/browser.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ArtistPixel=(()=>{var je=Object.defineProperty;var Ue=(h,b,y)=>b in h?je(h,b,{enumerable:!0,configurable:!0,writable:!0,value:y}):h[b]=y;var K=(h,b,y)=>(Ue(h,typeof b!="symbol"?b+"":b,y),y);(function(){let h="0.14.
|
|
1
|
+
var ArtistPixel=(()=>{var je=Object.defineProperty;var Ue=(h,b,y)=>b in h?je(h,b,{enumerable:!0,configurable:!0,writable:!0,value:y}):h[b]=y;var K=(h,b,y)=>(Ue(h,typeof b!="symbol"?b+"":b,y),y);(function(){let h="0.14.4";function b(t){let e="desktop";/ipad|tablet|android(?!.*mobile)/i.test(t)?e="tablet":/mobile|iphone|android.*mobile|blackberry|iemobile/i.test(t)&&(e="mobile");let n="Unknown";/edg/i.test(t)?n="Edge":/opr|opera/i.test(t)?n="Opera":/firefox/i.test(t)?n="Firefox":/chrome/i.test(t)?n="Chrome":/safari/i.test(t)&&(n="Safari");let o="Unknown";return/iphone|ipad/i.test(t)?o="iOS":/android/i.test(t)?o="Android":/windows/i.test(t)?o="Windows":/mac os/i.test(t)?o="macOS":/linux/i.test(t)?o="Linux":/cros/i.test(t)&&(o="ChromeOS"),{device_type:e,browser:n,os:o}}let y=null;function Kt(){if(!y)try{y=b(navigator.userAgent)}catch{y={device_type:"desktop",browser:"Unknown",os:"Unknown"}}return y}let s=document.currentScript,Y=s?.dataset.artistId,J=s?.dataset.projectId,X=J?Yt(J):void 0;function Yt(t){return!t||t.startsWith("release_")||t.startsWith("merch_")||t.startsWith("link_")||t.startsWith("custom_")?t:`custom_${t}`}let Q=s?.dataset.emulator==="true",ht=s?.dataset.debug==="true",Z=parseInt(s?.dataset.heartbeatInterval||"120000",10),bt=s?.dataset.heartbeat!=="false",vt=s?.dataset.source,_t=s?.dataset.endpoint,w=window.__artistPixelConfig||{},D=s?.dataset.metaPixelId||w.metaPixelId,E=s?.dataset.tiktokPixelId||w.tiktokPixelId,u=s?.dataset.googleAdsId||w.googleAdsId,kt=s?.dataset.googleAdsConversionLabel||w.googleAdsConversionLabel,M=s?.dataset.googleTagManagerId||w.googleTagManagerId,m=s?.dataset.googleAnalyticsId||w.googleAnalyticsId,x={pageview:(s?.dataset.forwardPageview??w.forwardPageview)!=="false",purchase:(s?.dataset.forwardPurchase??w.forwardPurchase)!=="false",addToCart:(s?.dataset.forwardAddToCart??w.forwardAddToCart)!=="false",lead:(s?.dataset.forwardLead??w.forwardLead)!=="false",custom:(s?.dataset.forwardCustom||w.forwardCustom||"").split(",").filter(Boolean)},O=!!(D||E||u||M||m),tt=s?.dataset.consentUi==="true",Jt=s?.dataset.consentStyle||"brutalist",Xt=s?.dataset.primaryColor,Qt=s?.dataset.bannerPosition||"bottom",xt=s?.dataset.excludePages?.split(",").filter(Boolean)||[],It=s?.dataset.trackFileDownloads==="true",Zt=s?.dataset.hashRouting==="true";function te(){if(vt)return vt;let t=typeof window.dataLayer<"u"&&Array.isArray(window.dataLayer),e=typeof window.gtag=="function";return t&&e?"gtm":"pixel"}let H="pixel";if(!Y){P(" Error: data-artist-id attribute is required");return}let Ct="session_id",et="session_timestamp",St="attribution",G="fan_id_hash",nt="visitor_id",V="artistPixel_consent",ee=365*24*60*60*1e3,ne=30*24*60*60*1e3,ae=60*60*1e3,I="balance_";function oe(t){let e=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp("^"+e+"$")}function ie(t){if(xt.length===0)return!1;try{let e=new URL(t,window.location.origin).pathname;return xt.some(n=>oe(n).test(e))}catch{return!1}}let re=[".pdf",".zip",".tar",".gz",".rar",".7z",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".mp3",".wav",".flac",".aac",".ogg",".mp4",".mov",".avi",".mkv",".webm",".exe",".dmg",".pkg",".deb",".rpm",".csv",".json",".xml",".txt"];function Pt(t){try{let e=new URL(t,window.location.origin).pathname.toLowerCase();return re.some(n=>e.endsWith(n))}catch{return!1}}function se(t,e){try{let o=new URL(t,window.location.origin).pathname.split("/").pop()||"unknown",c=o.includes(".")?o.split(".").pop():"unknown";a("File download tracked:",{url:t,fileName:o,fileExtension:c});let d=C({event_name:"custom",metadata:{event_type:"file_download",file_url:t,file_name:o,file_extension:c,link_text:e?.textContent?.trim().substring(0,100)||""}});S(d)}catch(n){P("Failed to track file download:",n)}}let ce="https://e.os.xyz",Et="https://us-central1-artist-os-distro.cloudfunctions.net/ingestEvents",T=_t||(Q?"http://localhost:5001/artist-os-distro/us-central1/ingestEvents":ce),j=null,p=null,f=null,g=null,L={},at={},v=[],ot=null,_="session",A=null,it=0,rt=0,R=0,U=!0,st=0,ct=!1,de=2*60*1e3,Tt=Date.now(),q=!1,le=!ht,a=(...t)=>{ht&&console.log("[artistPixel]",...t)},P=(...t)=>{le||console.error("[artistPixel]",...t)},dt={base:`
|
|
2
2
|
:host {
|
|
3
3
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4
4
|
position: fixed;
|