@tanay-wispr/webflow-package 4.5.0 → 4.5.1

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 e=await(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"}})();console.log("Platform: "+e),window.userPlatform=e;function d(){return new Promise(t=>{let r=0,i=50;function o(){if(r>=i){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{let n=posthog.get_distinct_id();setTimeout(()=>t(!0),50)}catch(n){console.error("Error getting distinct ID:",n),setTimeout(o,100)}else setTimeout(o,100)}o()})}await d();let l="download-vs-getstarted",a=(posthog.get_property("$override_feature_flags")||{})[l]||posthog.getFeatureFlag(l);window.useGetStarted=a==="get-started",posthog.capture("$feature_flag_called",{$feature_flag:l,$feature_flag_response:a}),console.log("Get Started exp:",window.useGetStarted),window.useGetStarted&&["app-download","mac-download","windows-download","download-btn"].forEach(r=>{document.querySelectorAll(`[${r}]`).forEach(o=>{o.removeAttribute(r),o.hasAttribute("href")&&!o.href.includes("/get-started")&&(o.href="/get-started"),o.onclick=n=>{let c=o.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:c,device_type:e}),!0}})});let s={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"},u={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:e}),!0)}),document.querySelectorAll("[download-btn]").forEach(function(t){t.onclick=()=>{let r=t.getAttribute("cta_location")||"page";return posthog.capture("app_download",{device_type:e,source:r,"$feature/download-vs-getstarted":a}),!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:e}),!0)):(t.href=s.Windows,e==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=u.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:e}),!0)):e==="mac_m1"||e==="mac_intel"?(t.href=s[e],t.onclick=()=>(setTimeout(()=>{window.location.href=u[e]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),i=t.id,o=i==="nav-download"?"nav":i==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";if(window.useGetStarted){var n=t.querySelector("svg");n&&n.remove(),r&&r.forEach(function(c){c.innerText="Get Started"}),t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:o,device_type:e}),!0)}else if(e==="mac_m1"||e==="mac_intel")(o==="nav"||o==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=s[e],t.onclick=()=>(posthog.capture("app_download",{device_type:e,source:o,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=u[e]},5e3),!0);else if(e==="Windows")(o==="nav"||o==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=s.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:e,source:o,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=u.Windows},5e3),!0);else{var n=t.querySelector("svg");n&&n.remove(),r&&r.forEach(function(f){f.innerText="Get Started"}),t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:o,device_type:e}),!0)}})});})();
1
+ "use strict";(()=>{document.addEventListener("DOMContentLoaded",async()=>{let p=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"}},g=(t,r,a=30)=>{let e="";if(a){let f=new Date;f.setTime(f.getTime()+a*24*60*60*1e3),e="; expires="+f.toUTCString()}let{hostname:c}=window.location,n=c.split("."),d=n.length>1?"."+n[n.length-2]+"."+n[n.length-1]:c;document.cookie=t+"="+encodeURIComponent(r)+e+"; path=/; domain="+d+"; SameSite=Lax"},o=await p();console.log("Platform: "+o),window.userPlatform=o;function m(){return new Promise(t=>{let r=0,a=50;function e(){if(r>=a){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 m();let l="download-vs-getstarted",i=(posthog.get_property("$override_feature_flags")||{})[l]||posthog.getFeatureFlag(l);window.useGetStarted=i==="get-started";let w=window.useGetStarted?"get-started":"control";g("variant",w,30),posthog.capture("$feature_flag_called",{$feature_flag:l,$feature_flag_response:i}),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=c=>{let n=e.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:n,device_type:o}),!0}})});let s={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"},u={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":i}),!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=s.Windows,o==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=u.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=s[o],t.onclick=()=>(setTimeout(()=>{window.location.href=u[o]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),a=t.id,e=a==="nav-download"?"nav":a==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";if(window.useGetStarted){var c=t.querySelector("svg");c&&c.remove(),r&&r.forEach(function(n){n.innerText="Get Started"}),t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0)}else if(o==="mac_m1"||o==="mac_intel")(e==="nav"||e==="footer")&&r.forEach(function(n){n.innerText="Download for free"}),t.href=s[o],t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":i}),setTimeout(()=>{window.location.href=u[o]},5e3),!0);else if(o==="Windows")(e==="nav"||e==="footer")&&r.forEach(function(n){n.innerText="Download for free"}),t.href=s.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":i}),setTimeout(()=>{window.location.href=u.Windows},5e3),!0);else{var c=t.querySelector("svg");c&&c.remove(),r&&r.forEach(function(d){d.innerText="Get Started"}),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.5.0",
3
+ "version": "4.5.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },