@tanay-wispr/webflow-package 4.8.8 → 4.8.10

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.
Files changed (2) hide show
  1. package/dist/global.js +1 -1
  2. package/package.json +1 -1
package/dist/global.js CHANGED
@@ -1 +1 @@
1
- "use strict";(()=>{document.addEventListener("DOMContentLoaded",async()=>{let f=async()=>{try{let t=await navigator.userAgentData.getHighEntropyValues(["architecture","platform"]);return t.platform==="macOS"?t.architecture==="arm"?"mac_m1":"mac_intel":t.platform}catch{let{userAgent:t}=navigator;return t.includes("Macintosh")?"mac_intel":t.includes("Windows")?"Windows":t.includes("Linux")?"Linux":/iPhone|iPad|iPod/.test(t)?"iOS":/Android/.test(t)?"Android":"Unknown"}},p=(t,r,n=30)=>{let e="";if(n){let u=new Date;u.setTime(u.getTime()+n*24*60*60*1e3),e="; expires="+u.toUTCString()}let{hostname:c}=window.location,a=c.split("."),_=a.length>1?"."+a[a.length-2]+"."+a[a.length-1]:c;document.cookie=t+"="+encodeURIComponent(r)+e+"; path=/; domain="+_+"; SameSite=Lax"},g=()=>{let r=document.cookie.split(";").find(n=>n.trim().startsWith("trial_promo="));return r&&r.trim().split("=")[1]==="3mo"},o=await f();console.log("Platform: "+o),window.userPlatform=o;let m=g();console.log("Next Play User:",m);function w(){return new Promise(t=>{let r=0,n=50;function e(){if(r>=n){console.warn("PostHog not fully ready after max attempts, proceeding with limited functionality"),t(!1);return}if(r++,typeof posthog<"u"&&typeof posthog.getFeatureFlag=="function"&&posthog.get_distinct_id&&typeof posthog.get_distinct_id=="function")try{setTimeout(()=>t(!0),50)}catch(c){console.error("Error getting distinct ID:",c),setTimeout(e,100)}else setTimeout(e,100)}e()})}await w();let l="download-vs-getstarted",d=(posthog.get_property("$override_feature_flags")||{})[l]||posthog.getFeatureFlag(l);window.useGetStarted=!0;let h=window.useGetStarted?"get-started":"control";p("variant",h,30),posthog.capture("$feature_flag_called",{$feature_flag:l,$feature_flag_response:"get-started"}),console.log("Get Started exp:",window.useGetStarted),window.useGetStarted&&["app-download","mac-download","windows-download","download-btn"].forEach(r=>{document.querySelectorAll(`[${r}]`).forEach(e=>{e.removeAttribute(r),e.hasAttribute("href")&&!e.href.includes("/get-started")&&(e.href="/get-started"),e.onclick=()=>{let c=e.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:c,device_type:o}),!0}})});let i={mac_m1:"https://dl.wisprflow.ai/mac-apple/latest",mac_intel:"https://dl.wisprflow.ai/mac-intel/latest",Windows:"https://wispr-packages.s3.us-west-2.amazonaws.com/wispr-flow/win32/x64/Wispr+Flow+Setup.exe"},s={mac_m1:"/congratulations-mac",mac_intel:"/congratulations-mac",Windows:"/congratulations-windows"};document.querySelectorAll("[nav-link]").forEach(function(t){t.onclick=()=>(posthog.capture("nav_click",{nav_item:t.getAttribute("nav-link")}),!0)}),document.querySelectorAll("[cta]").forEach(function(t){t.onclick=()=>(posthog.capture("cta_click",{title:t.innerText,cta_location:t.getAttribute("cta_location"),cta_type:t.getAttribute("cta_type"),device_type:o}),!0)}),document.querySelectorAll("[download-btn]").forEach(function(t){t.onclick=()=>{let r=t.getAttribute("cta_location")||"page";return posthog.capture("app_download",{device_type:o,source:r,"$feature/download-vs-getstarted":d}),!0}}),document.querySelectorAll("[web-demo-open]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_open",{title:t.innerText,device_type:window.userPlatform,source:t.getAttribute("cta_location")}),!0)}),document.querySelectorAll("[web-demo-close]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_close",{device_type:window.userPlatform}),!0)}),document.querySelectorAll("[windows-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):(t.href=i.Windows,o==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=s.Windows},5e3),!0)))}),document.querySelectorAll("[mac-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?(t.href=i[o],t.onclick=()=>(setTimeout(()=>{window.location.href=s[o]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),n=t.id,e=n==="nav-download"?"nav":n==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=i[o],t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":d}),setTimeout(()=>{window.location.href=s[o]},5e3),!0)):o==="Windows"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=i.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":d}),setTimeout(()=>{window.location.href=s.Windows},5e3),!0)):(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0))})});})();
1
+ "use strict";(()=>{document.addEventListener("DOMContentLoaded",async()=>{let f=async()=>{try{let t=await navigator.userAgentData.getHighEntropyValues(["architecture","platform"]);return t.platform==="macOS"?t.architecture==="arm"?"mac_m1":"mac_intel":t.platform}catch{let{userAgent:t}=navigator;return t.includes("Macintosh")?"mac_intel":t.includes("Windows")?"Windows":t.includes("Linux")?"Linux":/iPhone|iPad|iPod/.test(t)?"iOS":/Android/.test(t)?"Android":"Unknown"}},p=(t,r,n=30)=>{let e="";if(n){let d=new Date;d.setTime(d.getTime()+n*24*60*60*1e3),e="; expires="+d.toUTCString()}let{hostname:c}=window.location,a=c.split("."),_=a.length>1?"."+a[a.length-2]+"."+a[a.length-1]:c;document.cookie=t+"="+encodeURIComponent(r)+e+"; path=/; domain="+_+"; SameSite=Lax"},g=()=>{let r=document.cookie.split(";").find(n=>n.trim().startsWith("trial_promo="));return r&&r.trim().split("=")[1]==="3mo"},o=await f();console.log("Platform: "+o),window.userPlatform=o;let m=g();console.log("Next Play User:",m);function w(){return new Promise(t=>{let r=0,n=50;function e(){if(r>=n){console.warn("PostHog not fully ready after max attempts, proceeding with limited functionality"),t(!1);return}if(r++,typeof posthog<"u"&&typeof posthog.getFeatureFlag=="function"&&posthog.get_distinct_id&&typeof posthog.get_distinct_id=="function")try{setTimeout(()=>t(!0),50)}catch(c){console.error("Error getting distinct ID:",c),setTimeout(e,100)}else setTimeout(e,100)}e()})}await w();let l="download-vs-getstarted",u=(posthog.get_property("$override_feature_flags")||{})[l]||posthog.getFeatureFlag(l);window.useGetStarted=!0;let h=window.useGetStarted?"get-started":"control";p("variant",h,30),posthog.capture("$feature_flag_called",{$feature_flag:l,$feature_flag_response:"get-started"}),console.log("Get Started exp:",window.useGetStarted),window.useGetStarted&&["mac-download","windows-download","download-btn"].forEach(r=>{document.querySelectorAll(`[${r}]`).forEach(e=>{e.removeAttribute(r),e.hasAttribute("href")&&!e.href.includes("/get-started")&&(e.href="/get-started"),e.onclick=()=>{let c=e.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:c,device_type:o}),!0}})});let i={mac_m1:"https://dl.wisprflow.ai/mac-apple/latest",mac_intel:"https://dl.wisprflow.ai/mac-intel/latest",Windows:"https://wispr-packages.s3.us-west-2.amazonaws.com/wispr-flow/win32/x64/Wispr+Flow+Setup.exe"},s={mac_m1:"/congratulations-mac",mac_intel:"/congratulations-mac",Windows:"/congratulations-windows"};document.querySelectorAll("[nav-link]").forEach(function(t){t.onclick=()=>(posthog.capture("nav_click",{nav_item:t.getAttribute("nav-link")}),!0)}),document.querySelectorAll("[cta]").forEach(function(t){t.onclick=()=>(posthog.capture("cta_click",{title:t.innerText,cta_location:t.getAttribute("cta_location"),cta_type:t.getAttribute("cta_type"),device_type:o}),!0)}),document.querySelectorAll("[download-btn]").forEach(function(t){t.onclick=()=>{let r=t.getAttribute("cta_location")||"page";return posthog.capture("app_download",{device_type:o,source:r,"$feature/download-vs-getstarted":u}),!0}}),document.querySelectorAll("[web-demo-open]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_open",{title:t.innerText,device_type:window.userPlatform,source:t.getAttribute("cta_location")}),!0)}),document.querySelectorAll("[web-demo-close]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_close",{device_type:window.userPlatform}),!0)}),document.querySelectorAll("[windows-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):(t.href=i.Windows,o==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=s.Windows},5e3),!0)))}),document.querySelectorAll("[mac-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?(t.href=i[o],t.onclick=()=>(setTimeout(()=>{window.location.href=s[o]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),n=t.id,e=n==="nav-download"?"nav":n==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";window.useGetStarted?(t.href="https://wisprflow.onelink.me/PguH/lw5h199m",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=i[o],t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":u}),setTimeout(()=>{window.location.href=s[o]},5e3),!0)):o==="Windows"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=i.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":u}),setTimeout(()=>{window.location.href=s.Windows},5e3),!0)):(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0))})});})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanay-wispr/webflow-package",
3
- "version": "4.8.8",
3
+ "version": "4.8.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },