(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[80],{692:(e,a,t)=>{"use strict";t.d(a,{Gq:()=>o,Jz:()=>s,kI:()=>l});let r={newsletter:{maxRequests:5,windowMs:36e5},feedback:{maxRequests:3,windowMs:36e5},contact:{maxRequests:2,windowMs:36e5},popularFeatures:{maxRequests:10,windowMs:36e5}};function s(e){let a=r[e],t=Date.now();try{let r=localStorage.getItem("rateLimit_".concat(e)),s=r?JSON.parse(r):{count:0,windowStart:t};return t-s.windowStart>a.windowMs&&(s.count=0,s.windowStart=t),s.count>=a.maxRequests}catch(e){return console.warn("Rate limiting check failed:",e),!1}}function o(e){let a=r[e],t="rateLimit_".concat(e),s=Date.now();try{let e=localStorage.getItem(t),r=e?JSON.parse(e):{count:0,windowStart:s};s-r.windowStart>a.windowMs?(r.count=1,r.windowStart=s):r.count+=1,localStorage.setItem(t,JSON.stringify(r))}catch(e){console.warn("Failed to record submission:",e)}}function l(e){let a=r[e],t=Date.now();try{let r=localStorage.getItem("rateLimit_".concat(e)),s=r?JSON.parse(r):{count:0,windowStart:t};if(t-s.windowStart>a.windowMs)return a.maxRequests;return Math.max(0,a.maxRequests-s.count)}catch(e){return console.warn("Failed to get remaining submissions:",e),a.maxRequests}}},3199:(e,a,t)=>{"use strict";t.d(a,{default:()=>c});var r=t(5155),s=t(4812),o=t(8418),l=t(3720),i=t(2115),n=t(6877);function c(){let e=(0,o.j)(),{formData:a,isSubmitting:t,isSubmitted:c,error:d,successMessage:u}=(0,o.G)(e=>e.feedback),[m,p]=(0,i.useState)(null),[f,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{a.email||(p(null),h(!1))},[a.email]),(0,i.useEffect)(()=>{n.xs.start()},[]),(0,i.useEffect)(()=>{c&&u?n.xs.submit(!0):d&&n.xs.submit(!1,d)},[c,u,d]),(0,i.useEffect)(()=>{if(d||u){let a=setTimeout(()=>{e((0,s.oI)())},8e3);return()=>clearTimeout(a)}},[d,u,e]),c&&u)?(0,r.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,r.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-2xl p-8 text-center",children:[(0,r.jsx)("div",{className:"text-6xl mb-4",children:"\uD83C\uDF89"}),(0,r.jsx)("h3",{className:"text-2xl font-bold text-green-800 mb-2",children:"Thank You!"}),(0,r.jsx)("p",{className:"text-green-700 mb-6",children:u}),(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"px-6 py-3 bg-green-600 text-white rounded-xl hover:bg-green-700 transition-colors",children:"Submit Another Feedback"})]})}):(0,r.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,r.jsxs)("form",{onSubmit:t=>{if(t.preventDefault(),a.email&&(0,l.B9)(a.email)){h(!0);let e=(0,l.e2)(a.email);if(e){p(e),console.error("Email validation failed:",e,"for email:",a.email);return}p(null)}e((0,s.Wz)(a))},className:"bg-white rounded-3xl p-8 shadow-xl",children:[(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{id:"feature-request",title:"Feature Request",description:"Suggest new features or improvements",icon:"\uD83D\uDCA1"},{id:"bug-report",title:"Bug Report",description:"Report issues or technical problems",icon:"\uD83D\uDC1B"},{id:"general-feedback",title:"General Feedback",description:"Share your thoughts and experiences",icon:"\uD83D\uDCAC"}].map(t=>(0,r.jsxs)("button",{type:"button",onClick:()=>{e((0,s.g$)(t.id)),n.xs.type(t.id)},className:"p-6 rounded-2xl border-2 transition-all text-center ".concat(a.type===t.id?"border-purple-500 bg-purple-50":"border-gray-200 hover:border-gray-300"),children:[(0,r.jsx)("div",{className:"text-3xl mb-3",children:t.icon}),(0,r.jsx)("h3",{className:"font-bold text-gray-900 mb-1",children:t.title}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:t.description})]},t.id))})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name (Optional)"}),(0,r.jsx)("input",{type:"text",value:a.name||"",onChange:a=>e((0,s.aX)({name:a.target.value})),placeholder:"Your name",className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email (Optional)"}),(0,r.jsx)("input",{type:"email",value:a.email||"",onChange:a=>{let t=a.target.value;e((0,s.aX)({email:t})),f&&t?p((0,l.e2)(t)):t||p(null)},onBlur:()=>{h(!0),a.email&&p((0,l.e2)(a.email))},placeholder:"your@email.com",className:"w-full px-4 py-3 border rounded-xl focus:outline-none focus:ring-2 focus:border-transparent ".concat(m&&f?"border-red-300 focus:ring-red-500":"border-gray-300 focus:ring-purple-500")}),m&&f&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-600",children:m})]})]}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-4",children:"How would you rate FrameTimeSync?"}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[[1,2,3,4,5].map(t=>(0,r.jsx)("button",{type:"button",onClick:()=>{e((0,s.wm)(t)),n.xs.rating(t)},className:"text-3xl transition-colors ".concat(a.rating&&a.rating>=t?"text-yellow-400":"text-gray-300 hover:text-yellow-200"),children:t===a.rating?"⭐":"☆"},t)),a.rating&&(0,r.jsxs)("span",{className:"ml-3 text-sm text-gray-600",children:[a.rating," out of 5 stars"]})]})]}),(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsxs)("div",{className:"bg-blue-50 rounded-2xl p-6",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("span",{className:"text-blue-600 mr-2",children:"\uD83D\uDCA1"}),(0,r.jsx)("h3",{className:"font-semibold text-gray-900",children:"Select feature which you would most use"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:[{id:"saved-locations",label:"Saved Locations"},{id:"7-day-weather-forecast",label:"7-Day Weather Forecast"},{id:"push-notifications",label:"Push Notifications"},{id:"offline-mode",label:"Offline Mode"},{id:"share-location-with-friends",label:"Share Location with Friends"},{id:"moon-phase-info",label:"Moon Phase Info"},{id:"photography-calendar",label:"Photography Calendar"},{id:"advanced-weather-details",label:"Advanced Weather Details"}].map(t=>(0,r.jsx)("button",{type:"button",onClick:()=>{var a;return a=t.id,void(e((0,s.kP)(a)),n.xs.feature(a))},className:"px-4 py-2 rounded-full text-sm font-medium transition-colors ".concat(a.popularFeatures.includes(t.id)?"bg-blue-600 text-white":"bg-white text-blue-600 border border-blue-200 hover:bg-blue-100"),children:t.label},t.id))})]})}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"What specific feature or improvement would you like to see?"}),(0,r.jsx)("textarea",{value:a.specificFeatureRequest||"",onChange:a=>e((0,s.aX)({specificFeatureRequest:a.target.value})),placeholder:"Describe your idea in detail. What problem would this solve for your photography workflow?",rows:4,className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none"})]}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"What type of photography do you do most?"}),(0,r.jsxs)("select",{value:a.photographyStyle||"",onChange:a=>{e((0,s.VH)(a.target.value)),n.xs.style(a.target.value)},className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent",children:[(0,r.jsx)("option",{value:"",children:"Select your primary photography style"}),[{value:"landscape",label:"Landscape Photography"},{value:"portrait",label:"Portrait Photography"},{value:"street",label:"Street Photography"},{value:"wildlife",label:"Wildlife Photography"},{value:"macro",label:"Macro Photography"},{value:"architectural",label:"Architectural Photography"},{value:"astrophotography",label:"Astrophotography"},{value:"sports",label:"Sports Photography"},{value:"wedding",label:"Wedding Photography"},{value:"travel",label:"Travel Photography"},{value:"other",label:"Other"}].map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Any additional thoughts or suggestions?"}),(0,r.jsx)("textarea",{value:a.additionalThoughts||"",onChange:a=>e((0,s.aX)({additionalThoughts:a.target.value})),placeholder:"Share any other feedback, ideas, or experiences with the app...",rows:4,className:"w-full px-4 py-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none"})]}),d&&(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4",children:(0,r.jsx)("p",{className:"text-red-800 text-sm",children:d})})}),(0,r.jsx)("button",{type:"submit",disabled:t||f&&!!m,className:"w-full py-4 px-6 rounded-2xl font-semibold text-lg transition-all ".concat(t||f&&m?"bg-gray-400 cursor-not-allowed":"bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 shadow-lg hover:shadow-xl"," text-white"),children:t?(0,r.jsxs)("span",{className:"flex items-center justify-center",children:[(0,r.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Sending Feedback..."]}):"Send Feedback \uD83D\uDE80"})]})})}},3720:(e,a,t)=>{"use strict";t.d(a,{B9:()=>s,e2:()=>o});let r=/^[a-zA-Z0-9]([a-zA-Z0-9._%-]*[a-zA-Z0-9])?@[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/;function s(e){return!!e&&"string"==typeof e&&r.test(e.trim())}function o(e){return e&&""!==e.trim()?s(e)?null:"Please enter a valid email address":"Email is required"}},4812:(e,a,t)=>{"use strict";t.d(a,{Ay:()=>x,VH:()=>h,Wz:()=>i,aX:()=>u,g$:()=>m,kP:()=>f,oI:()=>b,wm:()=>p});var r=t(5317),s=t(692),o=t(1990),l=t(7039);let i=(0,o.zD)("feedback/submit",async(e,a)=>{let{rejectWithValue:t}=a;try{if((0,s.Jz)("feedback")){let e=(0,s.kI)("feedback");return t("Too many feedback submissions. You can send ".concat(e," more feedback in the next hour. Please try again later."))}let a={...e,submittedAt:r.Dc.now(),isProcessed:!1,source:"landing-page-feedback"},o=await (0,r.gS)((0,r.rJ)(l.db,"feedback"),a);return(0,s.Gq)("feedback"),{id:o.id,message:"Thank you for your feedback! We appreciate your input."}}catch(e){return t(e instanceof Error?e.message:"Failed to submit feedback")}}),n=(0,o.zD)("feedback/submitPopularFeature",async(e,a)=>{let{feature:t,email:o}=e,{rejectWithValue:i}=a;try{if((0,s.Jz)("popularFeatures")){let e=(0,s.kI)("popularFeatures");return i("Too many feature requests. You can submit ".concat(e," more requests in the next hour."))}let e={feature:t,submittedAt:r.Dc.now(),userEmail:o,source:"feedback-form-popular-features"},a=await (0,r.gS)((0,r.rJ)(l.db,"popular-feature-requests"),e);return(0,s.Gq)("popularFeatures"),{id:a.id,feature:t,message:"Feature request noted! We'll consider it for future updates."}}catch(e){return i(e instanceof Error?e.message:"Failed to submit feature request")}}),c=(0,o.zD)("feedback/fetchPopularFeaturesCount",async(e,a)=>{let{rejectWithValue:t}=a;try{let e=await (0,r.GG)((0,r.rJ)(l.db,"popular-feature-requests")),a={"saved-locations":0,"7-day-weather-forecast":0,"push-notifications":0,"offline-mode":0,"share-location-with-friends":0,"moon-phase-info":0,"photography-calendar":0,"advanced-weather-details":0};return e.docs.forEach(e=>{let t=e.data();t.feature&&a.hasOwnProperty(t.feature)&&a[t.feature]++}),a}catch(e){return t(e instanceof Error?e.message:"Failed to fetch popular features")}}),d=(0,o.Z0)({name:"feedback",initialState:{formData:{type:"general-feedback",popularFeatures:[]},isSubmitting:!1,isSubmitted:!1,isSubmittingPopularFeature:!1,error:null,successMessage:null,popularFeaturesCount:{"saved-locations":0,"7-day-weather-forecast":0,"push-notifications":0,"offline-mode":0,"share-location-with-friends":0,"moon-phase-info":0,"photography-calendar":0,"advanced-weather-details":0}},reducers:{updateFormData:(e,a)=>{e.formData={...e.formData,...a.payload},(e.error||e.successMessage)&&(e.error=null,e.successMessage=null)},setFeedbackType:(e,a)=>{e.formData.type=a.payload},setRating:(e,a)=>{e.formData.rating=a.payload},togglePopularFeature:(e,a)=>{let t=a.payload,r=e.formData.popularFeatures.indexOf(t);r>-1?e.formData.popularFeatures.splice(r,1):e.formData.popularFeatures.push(t)},setPhotographyStyle:(e,a)=>{e.formData.photographyStyle=a.payload},clearMessages:e=>{e.error=null,e.successMessage=null},resetForm:e=>{e.formData={type:"general-feedback",popularFeatures:[]},e.isSubmitting=!1,e.isSubmitted=!1,e.isSubmittingPopularFeature=!1,e.error=null,e.successMessage=null}},extraReducers:e=>{e.addCase(i.pending,e=>{e.isSubmitting=!0,e.error=null,e.successMessage=null}).addCase(i.fulfilled,(e,a)=>{e.isSubmitting=!1,e.isSubmitted=!0,e.successMessage=a.payload.message,e.formData={type:"general-feedback",popularFeatures:[]}}).addCase(i.rejected,(e,a)=>{e.isSubmitting=!1,e.error=a.payload}).addCase(n.pending,e=>{e.isSubmittingPopularFeature=!0}).addCase(n.fulfilled,(e,a)=>{e.isSubmittingPopularFeature=!1,e.popularFeaturesCount[a.payload.feature]++}).addCase(n.rejected,(e,a)=>{e.isSubmittingPopularFeature=!1,e.error=a.payload}).addCase(c.fulfilled,(e,a)=>{e.popularFeaturesCount=a.payload})}}),{updateFormData:u,setFeedbackType:m,setRating:p,togglePopularFeature:f,setPhotographyStyle:h,clearMessages:b,resetForm:g}=d.actions,x=d.reducer},6556:(e,a,t)=>{Promise.resolve().then(t.t.bind(t,6874,23)),Promise.resolve().then(t.t.bind(t,3063,23)),Promise.resolve().then(t.bind(t,3199))},6877:(e,a,t)=>{"use strict";t.d(a,{Qu:()=>c,tN:()=>u,xs:()=>d});var r=t(1906),s=t(7039);let o=(e,a)=>{if(s.z){let t={page_title:document.title,page_location:window.location.pathname,timestamp:Date.now(),...a};(0,r.$s)(s.z,e,t)}},l=e=>{o("form_start",{form_type:e,event_category:"form"})},i=(e,a,t)=>{o(a?"form_success":"form_error",{form_type:e,error_message:t,event_category:"form"})},n=(e,a,t)=>{o("validation_error"===e?"form_validation_error":"form_field_".concat(e),{field_name:a,form_type:t,event_category:"form"})},c={start:()=>{o("contact_form_start"),l("contact")},submit:(e,a)=>{i("contact",e,a),e?o("contact_form_success"):o("contact_form_error",{error_message:a})},field:(e,a)=>n(e,a,"contact"),inquiryType:e=>{o("inquiry_type_select",{inquiry_type:e})}},d={start:()=>{o("feedback_form_start"),l("feedback")},submit:(e,a)=>{i("feedback",e,a),e?o("feedback_form_success"):o("feedback_form_error",{error_message:a})},field:(e,a)=>n(e,a,"feedback"),type:e=>{o("feedback_type_select",{feedback_type:e})},rating:e=>{o("rating_submit",{rating_value:e,rating_context:"feedback_form",event_category:"feedback"}),o("rating_click",{rating_value:e})},feature:e=>{o("feature_selection",{feature_name:e,selection_context:"feedback_form",event_category:"engagement"}),o("popular_feature_select",{feature_name:e})},style:e=>{o("photography_style_select",{photography_style:e})}},u={subscribe:(e,a)=>{i("newsletter",e,a),e?o("newsletter_subscribe",{success:!0}):o("newsletter_subscribe",{success:!1,error_message:a})}}},7039:(e,a,t)=>{"use strict";let r;t.d(a,{db:()=>n,z:()=>r});var s=t(1906),o=t(3915),l=t(5317);let i=(0,o.Wp)({apiKey:"AIzaSyDuXmoACmYcS38pRnSKT7pZiB2YFAtB35w",authDomain:"frametimesync.firebaseapp.com",projectId:"frametimesync",storageBucket:"frametimesync.firebasestorage.app",messagingSenderId:"593555084950",appId:"1:593555084950:web:183fdaa8121df4f54ed4b7",measurementId:"G-80HV83B5GQ"}),n=(0,l.aU)(i);r=(0,s.P5)(i)},8418:(e,a,t)=>{"use strict";t.d(a,{G:()=>o,j:()=>s});var r=t(4540);let s=()=>(0,r.wA)(),o=r.d4}},e=>{e.O(0,[135,992,724,441,964,358],()=>e(e.s=6556)),_N_E=e.O()}]);