@fynd-design-engineering/fynd-one-v2 3.4.61 → 3.4.63

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 (81) hide show
  1. package/dist/accordians/dropdown.js +95 -1
  2. package/dist/accordians/index.js +391 -1
  3. package/dist/cms-listing/index.js +24 -1
  4. package/dist/filters/clear-search.js +32 -1
  5. package/dist/filters/konnect.js +165 -1
  6. package/dist/filters/show-count.js +66 -1
  7. package/dist/form/country-dropdown.css +160 -1
  8. package/dist/form/cs-gated-redirection.js +40 -1
  9. package/dist/form/download-file.js +70 -1
  10. package/dist/form/validation.css +1019 -1
  11. package/dist/form/validation.js +10611 -7
  12. package/dist/global/anchor-scroll.js +174 -1
  13. package/dist/global/auth.js +87 -1
  14. package/dist/global/chat.js +185 -1
  15. package/dist/global/console-links.js +89 -1
  16. package/dist/global/contact-popup.js +83 -2
  17. package/dist/global/css/in-page-embed.css +1043 -1
  18. package/dist/global/css/in-project-settings.css +173 -1
  19. package/dist/global/css/temp.css +89 -1
  20. package/dist/global/custom-bg-video.js +40 -1
  21. package/dist/global/footer-accordion.js +44 -1
  22. package/dist/global/lazy-loader.js +135 -1
  23. package/dist/global/loader.js +166 -2
  24. package/dist/global/media-card.js +166 -1
  25. package/dist/global/miscellaneous.js +136 -1
  26. package/dist/global/number-count.js +82 -1
  27. package/dist/global/popup-video.js +276 -1
  28. package/dist/global/progressive-scroll.js +222 -1
  29. package/dist/global/responsive-video.js +321 -1
  30. package/dist/global/style.css +1065 -1
  31. package/dist/global/video-card.js +50 -1
  32. package/dist/hacktimus/2025.js +177 -1
  33. package/dist/hacktimus/styles.css +91 -1
  34. package/dist/home/index.js +17 -1
  35. package/dist/marquee/index.js +3104 -1
  36. package/dist/marquee/marquee-swiper.js +36 -1
  37. package/dist/navigation/announcement/index.js +5169 -1
  38. package/dist/navigation/context-menu/index.js +31 -1
  39. package/dist/navigation/desktop/index.js +4603 -1
  40. package/dist/navigation/initialization.js +602 -1
  41. package/dist/navigation/main.js +4911 -1
  42. package/dist/navigation/mobile/index.js +286 -1
  43. package/dist/navigation/scroll/index.js +62 -1
  44. package/dist/navigation/secondary-navigation/index.js +437 -1
  45. package/dist/navigation/style.css +154 -1
  46. package/dist/navigation/temp.css +2 -0
  47. package/dist/navigation/theme.css +69 -1
  48. package/dist/navigation-v2/index.js +4990 -1
  49. package/dist/navigation-v2/styles.css +233 -1
  50. package/dist/others/feature-detail.js +75 -0
  51. package/dist/others/feature-detail.js.map +7 -0
  52. package/dist/others/geolocation.js +50 -1
  53. package/dist/others/hero-aniamtion.js +53 -1
  54. package/dist/others/hero-india-animation-2.js +70 -1
  55. package/dist/others/hero-india-animation.js +93 -1
  56. package/dist/others/home-solution-tab.js +115 -1
  57. package/dist/others/storefront-chat/index.js +487 -1
  58. package/dist/others/storefront-chat/styles.css +107 -1
  59. package/dist/playbook-2026/hero-reveal.js +47 -1
  60. package/dist/playbook-2026/index.js +536 -1
  61. package/dist/playbook-2026/styles.css +110 -1
  62. package/dist/posthog-and-ga/attributes.js +190 -1
  63. package/dist/posthog-and-ga/main.js +528 -1
  64. package/dist/progressive-scroll/index.js +147 -1
  65. package/dist/quick-fix/reload.js +22 -1
  66. package/dist/seo/schema.js +465 -1
  67. package/dist/slider/freescroll.js +34 -1
  68. package/dist/test/sample.js +15 -1
  69. package/dist/testimonials/index.js +2654 -1
  70. package/dist/timeline/index.js +160 -1
  71. package/dist/timeline/style.css +42 -1
  72. package/dist/tracking/custom-id.js +75 -1
  73. package/dist/tracking/fill-form-fields.js +238 -1
  74. package/dist/tracking/fill-form-fields.js.map +2 -2
  75. package/dist/tracking/form-tracker.js +146 -1
  76. package/dist/tracking/page-categories.js +20 -1
  77. package/dist/tracking/user-journey.js +839 -1
  78. package/dist/tracking/utm-links.js +194 -1
  79. package/dist/utils/sample.js +17 -1
  80. package/dist/validations/localhost.js +221 -1
  81. package/package.json +1 -1
@@ -1 +1,147 @@
1
- "use strict";(()=>{var l=window.gsap,s=window.ScrollTrigger;l.registerPlugin(s);function g(t,e,o){let r=document.querySelector(e);if(!r){console.warn(o);return}let c=document.querySelectorAll(t);if(c.length===0){console.warn(`Warning: No elements found with attribute ${t}`);return}c.forEach(n=>r.appendChild(n))}function y(){g("[fynd-sticky-source]","[fynd-sticky-target]","Warning: No element found with attribute fynd-sticky-target"),g("[fynd-scroll-source]","[fynd-scroll-target]","Warning: No element found with attribute fynd-scroll-target")}function m(){l.registerPlugin(s);let t,e,o;localStorage.setItem("lastVisitedSection","null");function r(n){clearTimeout(t);let i=document.querySelectorAll("[fynd-scroll-source]"),f=i.length,u=i[0].getAttribute("fynd-scroll-source"),d=i[f-1].getAttribute("fynd-scroll-source"),a=document.querySelector(`[fynd-scroll-source="${n}"]`)?.getAttribute("fynd-scroll-source")||null;if(e=localStorage.getItem("lastVisitedSection"),!(parseInt(a)===parseInt(d)&&parseInt(e)===parseInt(d))){if(parseInt(a)===parseInt(u)&&parseInt(e)===parseInt(u))return;t=setTimeout(()=>{S(n),localStorage.setItem("lastVisitedSection",n)},50)}}document.querySelectorAll("[fynd-scroll-source]").forEach(n=>{s.create({trigger:n,start:"top 50%",end:"bottom 50%",onEnter:()=>{r(n.getAttribute("fynd-scroll-source"))},onEnterBack:()=>{r(n.getAttribute("fynd-scroll-source"))},onLeave:()=>{r(n.getAttribute("fynd-scroll-source"))},onLeaveBack:()=>{r(n.getAttribute("fynd-scroll-source"))}})})}function S(t){let e=document.querySelectorAll("[fynd-sticky-source]");l.killTweensOf(e),l.set(e,{opacity:0});let o=document.querySelector(`[fynd-sticky-source="${t}"]`);o&&l.to(o,{opacity:1,duration:.5,ease:"power1.out"})}function b(){let t=document.querySelectorAll("[fynd-scroll-container]");l.to(t,{opacity:1,duration:.5,ease:"power2.out",delay:.5})}function E(){document.querySelectorAll("[fynd-sticky-bg]").forEach(t=>{let e=t.getAttribute("fynd-sticky-bg");e&&/^#([0-9A-F]{3}){1,2}$/i.test(e)?t.style.backgroundColor=e:console.warn(`Invalid hex color: ${e} for element`,t)})}function p(){let e=document.querySelector("[fynd-sticky-bg]")?.getAttribute("fynd-sticky-bg")||null;document.querySelectorAll("[fynd-card-bg-mobile]").forEach(o=>{e&&/^#([0-9A-F]{3}){1,2}$/i.test(e)?o.style.backgroundColor=e:console.warn(`Invalid hex color: ${e} for element`,o)})}function k(){window.innerWidth>991?(E(),y(),m(),b()):p()}document.addEventListener("DOMContentLoaded",k);})();
1
+ "use strict";
2
+ (() => {
3
+ // bin/live-reload.js
4
+ if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
+ new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
+ "change",
7
+ () => location.reload()
8
+ );
9
+ } else {
10
+ }
11
+
12
+ // src/progressive-scroll/index.ts
13
+ var gsap = window.gsap;
14
+ var ScrollTrigger = window.ScrollTrigger;
15
+ gsap.registerPlugin(ScrollTrigger);
16
+ function moveElements(sourceSelector, targetSelector, warningMessage) {
17
+ const target = document.querySelector(targetSelector);
18
+ if (!target) {
19
+ console.warn(warningMessage);
20
+ return;
21
+ }
22
+ const sources = document.querySelectorAll(sourceSelector);
23
+ if (sources.length === 0) {
24
+ console.warn(`Warning: No elements found with attribute ${sourceSelector}`);
25
+ return;
26
+ }
27
+ sources.forEach((source) => target.appendChild(source));
28
+ }
29
+ function initScrollBlocks() {
30
+ moveElements(
31
+ "[fynd-sticky-source]",
32
+ "[fynd-sticky-target]",
33
+ "Warning: No element found with attribute fynd-sticky-target"
34
+ );
35
+ moveElements(
36
+ "[fynd-scroll-source]",
37
+ "[fynd-scroll-target]",
38
+ "Warning: No element found with attribute fynd-scroll-target"
39
+ );
40
+ }
41
+ function initProgressiveScroll() {
42
+ gsap.registerPlugin(ScrollTrigger);
43
+ let timeout;
44
+ let lastVisitedSection;
45
+ let currentSection;
46
+ localStorage.setItem("lastVisitedSection", "null");
47
+ function debouncedScrollTrigger(attributeValue) {
48
+ clearTimeout(timeout);
49
+ const scrollSections = document.querySelectorAll("[fynd-scroll-source]");
50
+ const sectionCount = scrollSections.length;
51
+ const startSection = scrollSections[0].getAttribute("fynd-scroll-source");
52
+ const endSection = scrollSections[sectionCount - 1].getAttribute("fynd-scroll-source");
53
+ let currentSection2 = document.querySelector(`[fynd-scroll-source="${attributeValue}"]`)?.getAttribute("fynd-scroll-source") || null;
54
+ lastVisitedSection = localStorage.getItem("lastVisitedSection");
55
+ if (parseInt(currentSection2) === parseInt(endSection) && parseInt(lastVisitedSection) === parseInt(endSection)) {
56
+ return;
57
+ } else if (parseInt(currentSection2) === parseInt(startSection) && parseInt(lastVisitedSection) === parseInt(startSection)) {
58
+ return;
59
+ } else {
60
+ timeout = setTimeout(() => {
61
+ updateStickyImage(attributeValue);
62
+ localStorage.setItem("lastVisitedSection", attributeValue);
63
+ }, 50);
64
+ }
65
+ }
66
+ const sections = document.querySelectorAll("[fynd-scroll-source]");
67
+ sections.forEach((section) => {
68
+ ScrollTrigger.create({
69
+ trigger: section,
70
+ start: "top 50%",
71
+ end: "bottom 50%",
72
+ // Add an end position
73
+ // markers: true,
74
+ onEnter: () => {
75
+ debouncedScrollTrigger(section.getAttribute("fynd-scroll-source"));
76
+ },
77
+ onEnterBack: () => {
78
+ debouncedScrollTrigger(section.getAttribute("fynd-scroll-source"));
79
+ },
80
+ onLeave: () => {
81
+ debouncedScrollTrigger(section.getAttribute("fynd-scroll-source"));
82
+ },
83
+ onLeaveBack: () => {
84
+ debouncedScrollTrigger(section.getAttribute("fynd-scroll-source"));
85
+ }
86
+ });
87
+ });
88
+ }
89
+ function updateStickyImage(identifier) {
90
+ const stickyImages = document.querySelectorAll("[fynd-sticky-source]");
91
+ gsap.killTweensOf(stickyImages);
92
+ gsap.set(stickyImages, { opacity: 0 });
93
+ const activeImage = document.querySelector(
94
+ `[fynd-sticky-source="${identifier}"]`
95
+ );
96
+ if (activeImage) {
97
+ gsap.to(activeImage, {
98
+ opacity: 1,
99
+ duration: 0.5,
100
+ // Smooth transition for the active image
101
+ ease: "power1.out"
102
+ });
103
+ }
104
+ }
105
+ function getScrollContainer() {
106
+ const scrollContainer = document.querySelectorAll("[fynd-scroll-container]");
107
+ gsap.to(scrollContainer, {
108
+ opacity: 1,
109
+ duration: 0.5,
110
+ ease: "power2.out",
111
+ delay: 0.5
112
+ });
113
+ }
114
+ function dynamiColorDesktop() {
115
+ document.querySelectorAll("[fynd-sticky-bg]").forEach((element) => {
116
+ let bgColor = element.getAttribute("fynd-sticky-bg");
117
+ if (bgColor && /^#([0-9A-F]{3}){1,2}$/i.test(bgColor)) {
118
+ element.style.backgroundColor = bgColor;
119
+ } else {
120
+ console.warn(`Invalid hex color: ${bgColor} for element`, element);
121
+ }
122
+ });
123
+ }
124
+ function dynamicColorMobile() {
125
+ const bgColorElement = document.querySelector("[fynd-sticky-bg]");
126
+ const bgColor = bgColorElement?.getAttribute("fynd-sticky-bg") || null;
127
+ document.querySelectorAll("[fynd-card-bg-mobile]").forEach((element) => {
128
+ if (bgColor && /^#([0-9A-F]{3}){1,2}$/i.test(bgColor)) {
129
+ element.style.backgroundColor = bgColor;
130
+ } else {
131
+ console.warn(`Invalid hex color: ${bgColor} for element`, element);
132
+ }
133
+ });
134
+ }
135
+ function handleResize() {
136
+ if (window.innerWidth > 991) {
137
+ dynamiColorDesktop();
138
+ initScrollBlocks();
139
+ initProgressiveScroll();
140
+ getScrollContainer();
141
+ } else {
142
+ dynamicColorMobile();
143
+ }
144
+ }
145
+ document.addEventListener("DOMContentLoaded", handleResize);
146
+ })();
147
+ //# sourceMappingURL=index.js.map
@@ -1 +1,22 @@
1
- "use strict";(()=>{function o(){let e=sessionStorage.getItem("pageLoaded");(!e||e==="false")&&(sessionStorage.setItem("pageLoaded","true"),window.location.reload())}document.addEventListener("DOMContentLoaded",o);})();
1
+ "use strict";
2
+ (() => {
3
+ // bin/live-reload.js
4
+ if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
+ new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
+ "change",
7
+ () => location.reload()
8
+ );
9
+ } else {
10
+ }
11
+
12
+ // src/quick-fix/reload.ts
13
+ function handleOneTimeReload() {
14
+ const loaded = sessionStorage.getItem("pageLoaded");
15
+ if (!loaded || loaded === "false") {
16
+ sessionStorage.setItem("pageLoaded", "true");
17
+ window.location.reload();
18
+ }
19
+ }
20
+ document.addEventListener("DOMContentLoaded", handleOneTimeReload);
21
+ })();
22
+ //# sourceMappingURL=reload.js.map
@@ -1 +1,465 @@
1
- "use strict";(()=>{var c=class{constructor(){this.baseUrl="https://www.fynd.com",this.organizationData={"@type":"Organization","@id":`${this.baseUrl}#organization`,name:"Fynd",url:this.baseUrl,logo:"https://cdn.prod.website-files.com/67a9c8e5f2c74ac8c2c9b88b/67ee6819577f1aeb4e6ae5c9_Fynd.avif",sameAs:["https://www.linkedin.com/company/fynd-shopsense","https://x.com/FyndCommerce","https://www.instagram.com/fyndcommerce/"],description:"Fynd is an AI-powered unified commerce platform enabling brands to manage end-to-end retail operations."}}generateWebsiteSchema(){return{"@type":"WebSite","@id":`${this.baseUrl}#website`,url:this.baseUrl,name:"Fynd",description:"AI-powered unified commerce platform",publisher:{"@id":`${this.baseUrl}#organization`},potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${this.baseUrl}/search?q={search_term_string}`},"query-input":"required name=search_term_string"}}}generateBreadcrumbSchema(e){return{"@type":"BreadcrumbList",itemListElement:e.map((t,a)=>({"@type":"ListItem",position:a+1,name:t.name,item:t.url}))}}generateWebPageSchema(e){let t={"@type":"WebPage","@id":e.url,url:e.url,name:e.title,description:e.description||"",isPartOf:{"@id":`${this.baseUrl}#website`}};return e.mainEntity&&(t.mainEntity=e.mainEntity),t}generateSoftwareSchema(e,t){let a={"E-commerce Platform Software":"D2C brand managers, digital commerce heads, and marketing teams launching or scaling multi-channel storefronts","Omnichannel Retail Software":"Retail operations managers, franchise leads, and store teams seeking unified POS, self-checkout, and in-store analytics","E-commerce Fulfillment and Logistics Software":"Supply chain heads, logistics managers, warehouse leads managing inventory, delivery, and returns","Retail AI Automation Platform":"Product owners, CX leads, marketers, and developers adopting AI for cataloging, personalization, creative workflows, or customer support"},r=e.category||"RetailSoftware",i;a[r]?i=a[r]:e.audience?i=e.audience:i="Retail Business Teams";let n={"@type":"SoftwareApplication","@id":`${e.url}#software`,name:e.name,applicationCategory:r,operatingSystem:"Web",audience:{"@type":"Audience",audienceType:i},url:e.url,description:e.description,manufacturer:{"@id":`${this.baseUrl}#organization`}};return e.features&&e.features.length>0&&(n.featureList=e.features),t&&(t.price&&(n.offers={"@type":"Offer",price:t.price,priceCurrency:t.currency||"USD",availability:t.availability||"https://schema.org/InStock",validFrom:new Date().toISOString()}),t.ratingValue&&t.reviewCount&&(n.aggregateRating={"@type":"AggregateRating",ratingValue:t.ratingValue,reviewCount:t.reviewCount}),t.availability&&(n.availability=t.availability)),n}generateProductSchema(e){let t={"@type":"Product",name:e.name,url:e.url,description:e.description,brand:{"@id":`${this.baseUrl}#organization`}};return e.ratingValue&&e.reviewCount&&(t.aggregateRating={"@type":"AggregateRating",ratingValue:e.ratingValue,reviewCount:e.reviewCount}),t}generateBookSchema(e){let t={"@type":"Book","@id":`${e.url}#book`,name:e.name,description:e.description,bookFormat:"https://schema.org/EBook",author:{"@type":"Person",name:e.author||"Fynd Team"},publisher:{"@id":`${this.baseUrl}#organization`}};return e.isbn&&(t.isbn=e.isbn),e.price!==void 0&&(t.offers={"@type":"Offer",price:e.price||"0",priceCurrency:e.currency||"USD",availability:e.availability||"https://schema.org/InStock"}),t}generateFAQSchema(e){return!e||e.length===0?null:{"@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))}}generateArticleSchema(e){return{"@type":"Article",headline:e.title,description:e.description,image:e.image,author:{"@type":"Person",name:e.author||"Fynd Team"},publisher:{"@id":`${this.baseUrl}#organization`},datePublished:e.publishDate,dateModified:e.modifyDate||e.publishDate,mainEntityOfPage:{"@type":"WebPage","@id":e.url}}}generateSchema(e){let t=[];t.push(this.organizationData),t.push(this.generateWebsiteSchema());let a=this.generateWebPageSchema({url:e.url||window.location.href,title:e.title||document.title,description:e.description||document.querySelector('meta[name="description"]')?.content,mainEntity:e.mainEntity});switch(t.push(a),e.breadcrumbs&&t.push(this.generateBreadcrumbSchema(e.breadcrumbs)),e.pageType){case"solution":if(e.solutionData){let r=this.generateSoftwareSchema(e.solutionData);if(t.push(r),a.mainEntity={"@id":`${e.solutionData.url}#software`},e.asProduct&&e.productData){let i=this.generateProductSchema(e.productData);i.offers||i.aggregateRating?t.push(i):console.warn("\u{1F50D} Fynd Schema: Product schema requires offers, aggregateRating, or review. Skipping...")}}break;case"article":e.articleData&&t.push(this.generateArticleSchema(e.articleData));break;case"product":if(e.productData){let r=this.generateProductSchema(e.productData);r.offers||r.aggregateRating?t.push(r):console.warn("\u{1F50D} Fynd Schema: Product schema requires offers, aggregateRating, or review. Skipping...")}break;case"ebook":if(e.ebookData){let r=this.generateBookSchema(e.ebookData);t.push(r),a.mainEntity={"@id":`${e.ebookData.url}#book`}}break}if(e.faqs){let r=this.generateFAQSchema(e.faqs);r&&t.push(r)}return{"@context":"https://schema.org","@graph":t}}injectSchema(e){let t=document.querySelector('script[data-schema="fynd"]');t&&t.remove();let a=document.createElement("script");a.type="application/ld+json",a.setAttribute("data-schema","fynd"),a.textContent=JSON.stringify(e,null,2),document.head.appendChild(a)}},o=class{static safeJsonParse(e,t,a){try{return JSON.parse(e)}catch(r){return console.warn(`\u{1F50D} Fynd Schema: Failed to parse JSON${a?` for ${a}`:""}:`,{jsonString:e,error:r instanceof Error?r.message:r}),t}}static getRandomRating(){let e=["4.5","4.6","4.7","4.8","4.9"];return e[Math.floor(Math.random()*e.length)]}static getRandomReviewCount(){return Math.floor(Math.random()*81+120).toString()}static getConfigFromDataAttributes(){let e=document.body,t={url:"",title:"",description:"",pageType:"default"};switch(t.url=window.location.href,t.title=document.title,t.description=document.querySelector('meta[name="description"]')?.content,t.pageType=e.dataset.pageType||"default",window.location.pathname.includes("/solutions/")?t.pageType="solution":t.asProduct=e.dataset.asProduct==="true",e.dataset.breadcrumbs?t.breadcrumbs=this.safeJsonParse(e.dataset.breadcrumbs,this.generateBreadcrumbsFromURL(),"breadcrumbs"):t.breadcrumbs=this.generateBreadcrumbsFromURL(),t.pageType){case"solution":t.solutionData={name:e.dataset.solutionName||document.title,url:t.url,description:t.description||"",features:e.dataset.features?this.safeJsonParse(e.dataset.features,[],"features"):[],audience:e.dataset.audience,category:e.dataset.category},t.asProduct&&(t.productData={name:t.solutionData.name,url:t.solutionData.url,description:t.solutionData.description,ratingValue:e.dataset.ratingValue||this.getRandomRating(),reviewCount:e.dataset.reviewCount||this.getRandomReviewCount(),price:e.dataset.price,currency:e.dataset.currency,availability:e.dataset.availability});break;case"article":t.articleData={title:t.title,url:t.url,description:t.description||"",author:e.dataset.author,publishDate:e.dataset.publishDate||new Date().toISOString(),modifyDate:e.dataset.modifyDate,image:e.dataset.image||document.querySelector('meta[property="og:image"]')?.content};break;case"product":t.productData={name:e.dataset.productName||document.title,url:t.url,description:t.description||"",ratingValue:e.dataset.ratingValue||this.getRandomRating(),reviewCount:e.dataset.reviewCount||this.getRandomReviewCount(),price:e.dataset.price,currency:e.dataset.currency,availability:e.dataset.availability};break;case"ebook":t.ebookData={name:e.dataset.ebookName||document.title,url:t.url,description:t.description||"",author:e.dataset.author,isbn:e.dataset.isbn,bookFormat:"EBook",price:e.dataset.price||"0",currency:e.dataset.currency||"USD",availability:e.dataset.availability||"https://schema.org/InStock"};break}return t.faqs=this.extractFAQsFromPage(),t}static extractFAQsFromPage(){let e=[];return document.querySelectorAll('[fynd-faq-element="wrapper"]').forEach(a=>{let r=a.querySelector('[fynd-faq-element="toggle"]'),i=a.querySelector('[fynd-faq-element="content"]');if(r&&i){let n=r.querySelector('div[class*="title"], div[data-text-style], .accordian-title'),m=n?(n.textContent||"").trim():"",u=i.querySelector('.richtext, [class*="richtext"], .rich-text, [class*="rich-text"]'),d=u?(u.textContent||"").trim():(i.textContent||"").trim();m&&d&&e.push({question:m,answer:d})}}),e.length>0?e:null}static generateBreadcrumbsFromURL(){let e=window.location.pathname.split("/").filter(r=>r),t=[{name:"Home",url:"https://www.fynd.com"}],a="https://www.fynd.com";return e.forEach(r=>{a+=`/${r}`,t.push({name:r.charAt(0).toUpperCase()+r.slice(1).replace("-"," "),url:a})}),t}};document.addEventListener("DOMContentLoaded",function(){try{let s=new c,e=o.getConfigFromDataAttributes(),t=s.generateSchema(e);s.injectSchema(t),document.querySelector('script[data-schema="fynd"]')||console.error(" Fynd Schema: Schema script NOT found in DOM")}catch(s){console.error(" Fynd Schema: Error during initialization:",s)}});window.FyndSchema={generator:c,configManager:o};})();
1
+ "use strict";
2
+ (() => {
3
+ // bin/live-reload.js
4
+ if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
+ new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
+ "change",
7
+ () => location.reload()
8
+ );
9
+ } else {
10
+ }
11
+
12
+ // src/seo/schema.ts
13
+ var FyndSchemaGenerator = class {
14
+ constructor() {
15
+ this.baseUrl = "https://www.fynd.com";
16
+ this.organizationData = {
17
+ "@type": "Organization",
18
+ "@id": `${this.baseUrl}#organization`,
19
+ name: "Fynd",
20
+ url: this.baseUrl,
21
+ logo: `https://cdn.prod.website-files.com/67a9c8e5f2c74ac8c2c9b88b/67ee6819577f1aeb4e6ae5c9_Fynd.avif`,
22
+ sameAs: [
23
+ "https://www.linkedin.com/company/fynd-shopsense",
24
+ "https://x.com/FyndCommerce",
25
+ "https://www.instagram.com/fyndcommerce/"
26
+ ],
27
+ description: "Fynd is an AI-powered unified commerce platform enabling brands to manage end-to-end retail operations."
28
+ };
29
+ }
30
+ // Generate base website schema
31
+ generateWebsiteSchema() {
32
+ return {
33
+ "@type": "WebSite",
34
+ "@id": `${this.baseUrl}#website`,
35
+ url: this.baseUrl,
36
+ name: "Fynd",
37
+ description: "AI-powered unified commerce platform",
38
+ publisher: { "@id": `${this.baseUrl}#organization` },
39
+ potentialAction: {
40
+ "@type": "SearchAction",
41
+ target: {
42
+ "@type": "EntryPoint",
43
+ urlTemplate: `${this.baseUrl}/search?q={search_term_string}`
44
+ },
45
+ "query-input": "required name=search_term_string"
46
+ }
47
+ };
48
+ }
49
+ // Generate breadcrumb schema
50
+ generateBreadcrumbSchema(breadcrumbs) {
51
+ return {
52
+ "@type": "BreadcrumbList",
53
+ itemListElement: breadcrumbs.map((item, index) => ({
54
+ "@type": "ListItem",
55
+ position: index + 1,
56
+ name: item.name,
57
+ item: item.url
58
+ }))
59
+ };
60
+ }
61
+ // Generate WebPage schema
62
+ generateWebPageSchema(pageData) {
63
+ const schema = {
64
+ "@type": "WebPage",
65
+ "@id": pageData.url,
66
+ url: pageData.url,
67
+ name: pageData.title,
68
+ description: pageData.description || "",
69
+ isPartOf: { "@id": `${this.baseUrl}#website` }
70
+ };
71
+ if (pageData.mainEntity) {
72
+ schema.mainEntity = pageData.mainEntity;
73
+ }
74
+ return schema;
75
+ }
76
+ // Updated method signature - add optional productData parameter
77
+ generateSoftwareSchema(solutionData, productData) {
78
+ const categoryAudienceMap = {
79
+ "E-commerce Platform Software": "D2C brand managers, digital commerce heads, and marketing teams launching or scaling multi-channel storefronts",
80
+ "Omnichannel Retail Software": "Retail operations managers, franchise leads, and store teams seeking unified POS, self-checkout, and in-store analytics",
81
+ "E-commerce Fulfillment and Logistics Software": "Supply chain heads, logistics managers, warehouse leads managing inventory, delivery, and returns",
82
+ "Retail AI Automation Platform": "Product owners, CX leads, marketers, and developers adopting AI for cataloging, personalization, creative workflows, or customer support"
83
+ };
84
+ const applicationCategory = solutionData.category || "RetailSoftware";
85
+ let audienceType;
86
+ if (categoryAudienceMap[applicationCategory]) {
87
+ audienceType = categoryAudienceMap[applicationCategory];
88
+ } else if (solutionData.audience) {
89
+ audienceType = solutionData.audience;
90
+ } else {
91
+ audienceType = "Retail Business Teams";
92
+ }
93
+ const schema = {
94
+ "@type": "SoftwareApplication",
95
+ "@id": `${solutionData.url}#software`,
96
+ name: solutionData.name,
97
+ applicationCategory,
98
+ operatingSystem: "Web",
99
+ audience: {
100
+ "@type": "Audience",
101
+ audienceType
102
+ },
103
+ url: solutionData.url,
104
+ description: solutionData.description,
105
+ manufacturer: { "@id": `${this.baseUrl}#organization` }
106
+ };
107
+ if (solutionData.features && solutionData.features.length > 0) {
108
+ schema.featureList = solutionData.features;
109
+ }
110
+ if (productData) {
111
+ if (productData.price) {
112
+ schema.offers = {
113
+ "@type": "Offer",
114
+ price: productData.price,
115
+ priceCurrency: productData.currency || "USD",
116
+ availability: productData.availability || "https://schema.org/InStock",
117
+ validFrom: (/* @__PURE__ */ new Date()).toISOString()
118
+ };
119
+ }
120
+ if (productData.ratingValue && productData.reviewCount) {
121
+ schema.aggregateRating = {
122
+ "@type": "AggregateRating",
123
+ ratingValue: productData.ratingValue,
124
+ reviewCount: productData.reviewCount
125
+ };
126
+ }
127
+ if (productData.availability) {
128
+ schema.availability = productData.availability;
129
+ }
130
+ }
131
+ return schema;
132
+ }
133
+ // Generate Product schema (only for actual product pages, not solutions)
134
+ generateProductSchema(productData) {
135
+ const schema = {
136
+ "@type": "Product",
137
+ name: productData.name,
138
+ url: productData.url,
139
+ description: productData.description,
140
+ brand: { "@id": `${this.baseUrl}#organization` }
141
+ };
142
+ if (productData.ratingValue && productData.reviewCount) {
143
+ schema.aggregateRating = {
144
+ "@type": "AggregateRating",
145
+ ratingValue: productData.ratingValue,
146
+ reviewCount: productData.reviewCount
147
+ };
148
+ }
149
+ return schema;
150
+ }
151
+ // Generate Book schema for ebook pages
152
+ generateBookSchema(ebookData) {
153
+ const schema = {
154
+ "@type": "Book",
155
+ "@id": `${ebookData.url}#book`,
156
+ name: ebookData.name,
157
+ description: ebookData.description,
158
+ bookFormat: "https://schema.org/EBook",
159
+ author: {
160
+ "@type": "Person",
161
+ name: ebookData.author || "Fynd Team"
162
+ },
163
+ publisher: { "@id": `${this.baseUrl}#organization` }
164
+ };
165
+ if (ebookData.isbn) {
166
+ schema.isbn = ebookData.isbn;
167
+ }
168
+ if (ebookData.price !== void 0) {
169
+ schema.offers = {
170
+ "@type": "Offer",
171
+ price: ebookData.price || "0",
172
+ priceCurrency: ebookData.currency || "USD",
173
+ availability: ebookData.availability || "https://schema.org/InStock"
174
+ };
175
+ }
176
+ return schema;
177
+ }
178
+ // Generate FAQ schema
179
+ generateFAQSchema(faqs) {
180
+ if (!faqs || faqs.length === 0) return null;
181
+ return {
182
+ "@type": "FAQPage",
183
+ mainEntity: faqs.map((faq) => ({
184
+ "@type": "Question",
185
+ name: faq.question,
186
+ acceptedAnswer: {
187
+ "@type": "Answer",
188
+ text: faq.answer
189
+ }
190
+ }))
191
+ };
192
+ }
193
+ // Generate Article schema for blog posts
194
+ generateArticleSchema(articleData) {
195
+ return {
196
+ "@type": "Article",
197
+ headline: articleData.title,
198
+ description: articleData.description,
199
+ image: articleData.image,
200
+ author: {
201
+ "@type": "Person",
202
+ name: articleData.author || "Fynd Team"
203
+ },
204
+ publisher: { "@id": `${this.baseUrl}#organization` },
205
+ datePublished: articleData.publishDate,
206
+ dateModified: articleData.modifyDate || articleData.publishDate,
207
+ mainEntityOfPage: {
208
+ "@type": "WebPage",
209
+ "@id": articleData.url
210
+ }
211
+ };
212
+ }
213
+ // Main method to generate complete schema based on page type
214
+ generateSchema(pageConfig) {
215
+ const graph = [];
216
+ graph.push(this.organizationData);
217
+ graph.push(this.generateWebsiteSchema());
218
+ const webPageSchema = this.generateWebPageSchema({
219
+ url: pageConfig.url || window.location.href,
220
+ title: pageConfig.title || document.title,
221
+ description: pageConfig.description || document.querySelector('meta[name="description"]')?.content,
222
+ mainEntity: pageConfig.mainEntity
223
+ });
224
+ graph.push(webPageSchema);
225
+ if (pageConfig.breadcrumbs) {
226
+ graph.push(this.generateBreadcrumbSchema(pageConfig.breadcrumbs));
227
+ }
228
+ switch (pageConfig.pageType) {
229
+ case "solution":
230
+ if (pageConfig.solutionData) {
231
+ const softwareSchema = this.generateSoftwareSchema(
232
+ pageConfig.solutionData
233
+ );
234
+ graph.push(softwareSchema);
235
+ webPageSchema.mainEntity = { "@id": `${pageConfig.solutionData.url}#software` };
236
+ if (pageConfig.asProduct && pageConfig.productData) {
237
+ const productSchema = this.generateProductSchema(pageConfig.productData);
238
+ if (productSchema.offers || productSchema.aggregateRating) {
239
+ graph.push(productSchema);
240
+ } else {
241
+ console.warn("\u{1F50D} Fynd Schema: Product schema requires offers, aggregateRating, or review. Skipping...");
242
+ }
243
+ }
244
+ }
245
+ break;
246
+ case "article":
247
+ if (pageConfig.articleData) {
248
+ graph.push(this.generateArticleSchema(pageConfig.articleData));
249
+ }
250
+ break;
251
+ case "product":
252
+ if (pageConfig.productData) {
253
+ const productSchema = this.generateProductSchema(pageConfig.productData);
254
+ if (productSchema.offers || productSchema.aggregateRating) {
255
+ graph.push(productSchema);
256
+ } else {
257
+ console.warn("\u{1F50D} Fynd Schema: Product schema requires offers, aggregateRating, or review. Skipping...");
258
+ }
259
+ }
260
+ break;
261
+ case "ebook":
262
+ if (pageConfig.ebookData) {
263
+ const bookSchema = this.generateBookSchema(pageConfig.ebookData);
264
+ graph.push(bookSchema);
265
+ webPageSchema.mainEntity = { "@id": `${pageConfig.ebookData.url}#book` };
266
+ }
267
+ break;
268
+ }
269
+ if (pageConfig.faqs) {
270
+ const faqSchema = this.generateFAQSchema(pageConfig.faqs);
271
+ if (faqSchema) graph.push(faqSchema);
272
+ }
273
+ return {
274
+ "@context": "https://schema.org",
275
+ "@graph": graph
276
+ };
277
+ }
278
+ // Inject schema into page
279
+ injectSchema(schema) {
280
+ const existingScript = document.querySelector('script[data-schema="fynd"]');
281
+ if (existingScript) {
282
+ existingScript.remove();
283
+ }
284
+ const script = document.createElement("script");
285
+ script.type = "application/ld+json";
286
+ script.setAttribute("data-schema", "fynd");
287
+ script.textContent = JSON.stringify(schema, null, 2);
288
+ document.head.appendChild(script);
289
+ }
290
+ };
291
+ var PageConfigManager = class {
292
+ // Helper method to safely parse JSON
293
+ static safeJsonParse(jsonString, fallback, context) {
294
+ try {
295
+ return JSON.parse(jsonString);
296
+ } catch (error) {
297
+ console.warn(`\u{1F50D} Fynd Schema: Failed to parse JSON${context ? ` for ${context}` : ""}:`, {
298
+ jsonString,
299
+ error: error instanceof Error ? error.message : error
300
+ });
301
+ return fallback;
302
+ }
303
+ }
304
+ // Helper method to generate random rating
305
+ static getRandomRating() {
306
+ const ratings = ["4.5", "4.6", "4.7", "4.8", "4.9"];
307
+ return ratings[Math.floor(Math.random() * ratings.length)];
308
+ }
309
+ // Helper method to generate random review count
310
+ static getRandomReviewCount() {
311
+ return Math.floor(Math.random() * (200 - 120 + 1) + 120).toString();
312
+ }
313
+ static getConfigFromDataAttributes() {
314
+ const body = document.body;
315
+ const config = {
316
+ url: "",
317
+ title: "",
318
+ description: "",
319
+ pageType: "default"
320
+ };
321
+ config.url = window.location.href;
322
+ config.title = document.title;
323
+ config.description = document.querySelector(
324
+ 'meta[name="description"]'
325
+ )?.content;
326
+ config.pageType = body.dataset.pageType || "default";
327
+ if (window.location.pathname.includes("/solutions/")) {
328
+ config.pageType = "solution";
329
+ } else {
330
+ config.asProduct = body.dataset.asProduct === "true";
331
+ }
332
+ if (body.dataset.breadcrumbs) {
333
+ config.breadcrumbs = this.safeJsonParse(
334
+ body.dataset.breadcrumbs,
335
+ this.generateBreadcrumbsFromURL(),
336
+ "breadcrumbs"
337
+ );
338
+ } else {
339
+ config.breadcrumbs = this.generateBreadcrumbsFromURL();
340
+ }
341
+ switch (config.pageType) {
342
+ case "solution":
343
+ config.solutionData = {
344
+ name: body.dataset.solutionName || document.title,
345
+ url: config.url,
346
+ description: config.description || "",
347
+ features: body.dataset.features ? this.safeJsonParse(body.dataset.features, [], "features") : [],
348
+ audience: body.dataset.audience,
349
+ category: body.dataset.category
350
+ };
351
+ if (config.asProduct) {
352
+ config.productData = {
353
+ name: config.solutionData.name,
354
+ url: config.solutionData.url,
355
+ description: config.solutionData.description,
356
+ ratingValue: body.dataset.ratingValue || this.getRandomRating(),
357
+ reviewCount: body.dataset.reviewCount || this.getRandomReviewCount(),
358
+ price: body.dataset.price,
359
+ currency: body.dataset.currency,
360
+ availability: body.dataset.availability
361
+ };
362
+ }
363
+ break;
364
+ case "article":
365
+ config.articleData = {
366
+ title: config.title,
367
+ url: config.url,
368
+ description: config.description || "",
369
+ author: body.dataset.author,
370
+ publishDate: body.dataset.publishDate || (/* @__PURE__ */ new Date()).toISOString(),
371
+ modifyDate: body.dataset.modifyDate,
372
+ image: body.dataset.image || document.querySelector('meta[property="og:image"]')?.content
373
+ };
374
+ break;
375
+ case "product":
376
+ config.productData = {
377
+ name: body.dataset.productName || document.title,
378
+ url: config.url,
379
+ description: config.description || "",
380
+ ratingValue: body.dataset.ratingValue || this.getRandomRating(),
381
+ reviewCount: body.dataset.reviewCount || this.getRandomReviewCount(),
382
+ price: body.dataset.price,
383
+ currency: body.dataset.currency,
384
+ availability: body.dataset.availability
385
+ };
386
+ break;
387
+ // In the switch statement, add this case:
388
+ case "ebook":
389
+ config.ebookData = {
390
+ name: body.dataset.ebookName || document.title,
391
+ url: config.url,
392
+ description: config.description || "",
393
+ author: body.dataset.author,
394
+ isbn: body.dataset.isbn,
395
+ bookFormat: "EBook",
396
+ price: body.dataset.price || "0",
397
+ currency: body.dataset.currency || "USD",
398
+ availability: body.dataset.availability || "https://schema.org/InStock"
399
+ };
400
+ break;
401
+ }
402
+ config.faqs = this.extractFAQsFromPage();
403
+ return config;
404
+ }
405
+ static extractFAQsFromPage() {
406
+ const faqs = [];
407
+ const faqWrappers = document.querySelectorAll(
408
+ '[fynd-faq-element="wrapper"]'
409
+ );
410
+ faqWrappers.forEach((wrapper) => {
411
+ const toggle = wrapper.querySelector('[fynd-faq-element="toggle"]');
412
+ const content = wrapper.querySelector('[fynd-faq-element="content"]');
413
+ if (toggle && content) {
414
+ const questionDiv = toggle.querySelector(
415
+ 'div[class*="title"], div[data-text-style], .accordian-title'
416
+ );
417
+ const questionText = questionDiv ? (questionDiv.textContent || "").trim() : "";
418
+ const richTextDiv = content.querySelector(
419
+ '.richtext, [class*="richtext"], .rich-text, [class*="rich-text"]'
420
+ );
421
+ const answerText = richTextDiv ? (richTextDiv.textContent || "").trim() : (content.textContent || "").trim();
422
+ if (questionText && answerText) {
423
+ faqs.push({
424
+ question: questionText,
425
+ answer: answerText
426
+ });
427
+ }
428
+ }
429
+ });
430
+ return faqs.length > 0 ? faqs : null;
431
+ }
432
+ static generateBreadcrumbsFromURL() {
433
+ const pathSegments = window.location.pathname.split("/").filter((segment) => segment);
434
+ const breadcrumbs = [{ name: "Home", url: "https://www.fynd.com" }];
435
+ let currentPath = "https://www.fynd.com";
436
+ pathSegments.forEach((segment) => {
437
+ currentPath += `/${segment}`;
438
+ breadcrumbs.push({
439
+ name: segment.charAt(0).toUpperCase() + segment.slice(1).replace("-", " "),
440
+ url: currentPath
441
+ });
442
+ });
443
+ return breadcrumbs;
444
+ }
445
+ };
446
+ document.addEventListener("DOMContentLoaded", function() {
447
+ try {
448
+ const schemaGenerator = new FyndSchemaGenerator();
449
+ const pageConfig = PageConfigManager.getConfigFromDataAttributes();
450
+ const schema = schemaGenerator.generateSchema(pageConfig);
451
+ schemaGenerator.injectSchema(schema);
452
+ const injectedScript = document.querySelector('script[data-schema="fynd"]');
453
+ if (!injectedScript) {
454
+ console.error(" Fynd Schema: Schema script NOT found in DOM");
455
+ }
456
+ } catch (error) {
457
+ console.error(" Fynd Schema: Error during initialization:", error);
458
+ }
459
+ });
460
+ window.FyndSchema = {
461
+ generator: FyndSchemaGenerator,
462
+ configManager: PageConfigManager
463
+ };
464
+ })();
465
+ //# sourceMappingURL=schema.js.map