PageSourceSearch

https://us.fusionmap.com/_next/static/chunks/pages/profile-c65bbdf29a92ef51.js

js fusionmap.com collected 2026-10-01 02:00:30 UTC 28,186 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="ec8eb9a7-189d-46ec-9e48-f373d8264cf1",e._sentryDebugIdIdentifier="sentry-dbid-ec8eb9a7-189d-46ec-9e48-f373d8264cf1")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4063],{5146:()=>{},8172:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return t(17646)}])},17646:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>R});var a=t(37876),l=t(77328),r=t.n(l),i=t(48230),n=t.n(i),o=t(67468),c=t(77815);t(58296);var d=t(14232),u=t(84412),m=t(39149),p=t(10841),x=t.n(p),h=t(97685),f=t(77582),b=t(31985),j=t(56276),g=t(85428),y=t(90953),N=t(32937),v=t(80856);function w({modalId:e,title:s,handleClose:t,handleFileChange:l,handleUpload:r,handleDelete:i,isUploading:n,isDeleting:o,profileImageUrl:c,preview:u,selectedFile:p}){let x=(0,d.useRef)(null),h=()=>{x.current&&(x.current.value=""),t()};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"checkbox",id:e,className:"modal-toggle"}),(0,a.jsxs)("div",{className:"modal",children:[(0,a.jsxs)("div",{className:"modal-box text-black w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-lg font-bold flex items-center border-b border-black/10 pb-4 justify-between",children:[(0,a.jsx)("span",{children:s}),(0,a.jsx)("label",{htmlFor:e,className:"cursor-pointer hover:bg-black/10 rounded-full p-2",onClick:h,children:(0,a.jsx)(m.fUT,{})})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsxs)("form",{className:"flex flex-col items-center",children:[(0,a.jsx)("input",{ref:x,type:"file",accept:"image/*",onChange:l,className:"hidden",id:`profilePicInput-${e}`,required:!p}),(0,a.jsxs)("label",{htmlFor:`profilePicInput-${e}`,className:"file-uploader-box w-full",children:[(0,a.jsx)(m.v4w,{size:18,className:"opacity-50"}),(0,a.jsx)("span",{className:"opacity-50 mt-1",children:"Upload a picture"}),(0,a.jsx)("span",{className:"opacity-50 text-xs",children:"Max: 1 MB"})]}),u&&(0,a.jsx)("img",{src:u,alt:"Preview",className:"w-32 h-32 rounded-full object-cover mt-4"}),(0,a.jsx)("button",{type:"button",onClick:r,className:"btn btn-primary tt-blue-button mt-4 w-full",disabled:n,children:n?"Uploading...":"Upload"}),c&&!u&&(0,a.jsx)("button",{type:"button",onClick:i,className:"btn bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 mt-4 w-full",disabled:o,children:o?"Deleting...":"Delete Current Image"})]})})]}),(0,a.jsx)("label",{className:"modal-backdrop",htmlFor:e,onClick:h})]})]})}function k({modalId:e,firstname:s,surname:t,email:l,preview:r,profileImageUrl:i,isDeleting:n,handleClose:o,handleFileChange:c,handleEdit:u,handleDelete:p,setFirstname:x,setSurname:h,setEmail:f}){let b=(0,d.useRef)(null),j=()=>{b.current&&(b.current.value=""),o()};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"checkbox",id:e,className:"modal-toggle"}),(0,a.jsxs)("div",{className:"modal",children:[(0,a.jsxs)("div",{className:"modal-box text-black w-full max-w-lg",children:[(0,a.jsxs)("div",{className:"text-lg font-bold flex items-center border-b border-black/10 pb-4 justify-between",children:[(0,a.jsx)("span",{className:"flex items-center gap-2",children:"Edit Profile"}),(0,a.jsx)("label",{htmlFor:e,className:"cursor-pointer hover:bg-black/10 rounded-full p-2",onClick:j,children:(0,a.jsx)(m.fUT,{})})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsxs)("form",{onSubmit:u,method:"POST",className:"flex flex-col w-full space-y-4",children:[(0,a.jsxs)("div",{className:"flex justify-between w-full",children:[(0,a.jsx)("input",{required:!0,value:s,onChange:e=>x(e.target.value),placeholder:"Firstname",type:"text",className:"input  w-[48%]"}),(0,a.jsx)("input",{required:!0,value:t,onChange:e=>h(e.target.value),placeholder:"Surname",type:"text",className:"input  w-[48%]"})]}),(0,a.jsx)("input",{required:!0,value:l,onChange:e=>f(e.target.value),placeholder:"E-Mail",type:"email",className:"input  w-full"}),(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("input",{ref:b,type:"file",accept:"image/*",onChange:c,className:"hidden",id:`profilePicInput-${e}`}),(0,a.jsxs)("label",{htmlFor:`profilePicInput-${e}`,className:"file-uploader-box w-full flex flex-col items-center justify-center border border-dashed border-gray-300 p-4 rounded-lg cursor-pointer",children:[(0,a.jsx)(m.v4w,{size:18,className:"opacity-50"}),(0,a.jsx)("span",{className:"opacity-50 mt-1",children:"Update profile picture"}),(0,a.jsx)("span",{className:"opacity-50 text-xs",children:"Max: 1 MB"})]}),r&&(0,a.jsx)("img",{src:r,alt:"Preview",className:"w-32 h-32 rounded-full object-cover mt-4 mx-auto"}),i&&!r&&(0,a.jsx)("button",{type:"button",onClick:p,className:"btn bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 mt-4 w-full",disabled:n,children:n?"Deleting...":"Delete Current Image"})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",className:"btn btn-primary tt-blue-button w-full",children:"Save Changes"})})]})})]}),(0,a.jsx)("label",{className:"modal-backdrop",htmlFor:e,onClick:j})]})]})}var _=t(8135);t(5146);
1var C=function(e,s){return(C=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var t in s)s.hasOwnProperty(t)&&(e[t]=s[t])})(e,s)};function P(e){var s,t,a,l,r,i,n,o,c=e.className,u=e.counterClockwise,m=e.dashRatio,p=e.pathRadius,x=e.strokeWidth,h=e.style;return(0,d.createElement)("path",{className:c,style:Object.assign({},h,(t=(s={pathRadius:p,dashRatio:m,counterClockwise:u}).counterClockwise,a=s.dashRatio,r=(1-a)*(l=2*Math.PI*s.pathRadius),{strokeDasharray:l+"px "+l+"px",strokeDashoffset:(t?-r:r)+"px"})),d:(n=(i={pathRadius:p,counterClockwise:u}).pathRadius,"\n      M 50,50\n      m 0,-"+n+"\n      a "+n+","+n+" "+(o=+!!i.counterClockwise)+" 1 1 0,"+2*n+"\n      a "+n+","+n+" "+o+" 1 1 0,-"+2*n+"\n    "),strokeWidth:x,fillOpacity:0})}var S=function(e){function s(){this.constructor=t}function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype=null===e?Object.create(e):(s.prototype=e.prototype,new s),t.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},t.prototype.getPathRadius=function(){return 50-this.props.strokeWidth/2-this.getBackgroundPadding()},t.prototype.getPathRatio=function(){var e=this.props,s=e.value,t=e.minValue,a=e.maxValue;return(Math.min(Math.max(s,t),a)-t)/(a-t)},t.prototype.render=function(){var e=this.props,s=e.circleRatio,t=e.className,a=e.classes,l=e.counterClockwise,r=e.styles,i=e.strokeWidth,n=e.text,o=this.getPathRadius(),c=this.getPathRatio();return(0,d.createElement)("svg",{className:a.root+" "+t,style:r.root,viewBox:"0 0 100 100","data-test-id":"CircularProgressbar"},this.props.background?(0,d.createElement)("circle",{className:a.background,style:r.background,cx:50,cy:50,r:50}):null,(0,d.createElement)(P,{className:a.trail,counterClockwise:l,dashRatio:s,pathRadius:o,strokeWidth:i,style:r.trail}),(0,d.createElement)(P,{className:a.path,counterClockwise:l,dashRatio:c*s,pathRadius:o,strokeWidth:i,style:r.path}),n?(0,d.createElement)("text",{className:a.text,style:r.text,x:50,y:50},n):null)},t.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},t}(d.Component),$=t(68346);function E(e){return(0,a.jsxs)("div",{className:"col-span-1 md:col-span-2 lg:col-span-2 rounded-lg text-left w-full",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 sm:grid-cols-3 md:grid-cols-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("div",{className:"w-20 h-20",children:(0,a.jsx)(S,{value:e.alertsCount/e.userLimit*100,text:`${e.alertsCount} / ${e.userLimit}`,styles:{path:{stroke:"url(#gradient)",transition:"stroke-dashoffset 0.5s ease 0s",strokeWidth:8},text:{fill:"#fff",fontSize:"18px"}}})}),(0,a.jsx)("p",{className:"mt-2 text-xs",children:"Alerts"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("div",{className:"w-20 h-20",children:(0,a.jsx)(S,{value:e.measurementsCount/e.userLimit*100,text:`${e.measurementsCount} / ${e.userLimit}`,styles:{path:{stroke:"url(#gradient)",transition:"stroke-dashoffset 0.5s ease 0s",strokeWidth:8},text:{fill:"#fff",fontSize:"18px"}}})}),(0,a.jsx)("p",{className:"mt-2 text-xs",children:"Measurements"})]}),Object.entries(e.notesCount).map(([s,t])=>{let l=s===v.$$.default?"Notes":s===v.$$.scan?"iOS Scans":s===v.$$.luma?"3D Notes":s;return(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("div",{className:"w-20 h-20",children:(0,a.jsx)(S,{value:t/e.userLimit*100,text:`${t} / ${e.userLimit}`,styles:{path:{stroke:"url(#gradient)",transition:"stroke-dashoffset 0.5s ease 0s",strokeWidth:8},text:{fill:"#fff",fontSize:"18px"}}})}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-2",children:[(0,a.jsx)("p",{className:"text-xs",children:l}),"luma"==s&&(0,a.jsx)("div",{className:"tooltip","data-tip":"Notes created with our Video-to-3D feature",children:(0,a.jsx)($.Q9E,{className:"opacity-50"})})]})]},s)})]}),(0,a.jsx)("svg",{width:"0",height:"0",children:(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"rgba(59, 130, 246, 0.9)"}),(0,a.jsx)("stop",{offset:"100%",stopColor:"rgba(71, 127, 247, 0.4)"})]})})})]})}function A({modalId:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"checkbox",id:e,className:"modal-toggle"}),(0,a.jsxs)("div",{className:"modal",children:[(0,a.jsxs)("div",{className:"modal-box text-black w-full max-w-lg",children:[(0,a.jsxs)("div",{className:"text-lg font-bold flex items-center border-b border-black/10 pb-4 justify-between",children:[(0,a.jsx)("span",{className:"flex items-center gap-2",children:"Delete Account"}),(0,a.jsx)("label",{htmlFor:e,className:"cursor-pointer hover:bg-black/10 rounded-full p-2",children:(0,a.jsx)(m.fUT,{})})]}),(0,a.jsxs)("p",{className:"mt-5",children:[" To request account deleti
1on, please contact:\xa0",(0,a.jsx)("a",{className:"text-blue-500 cursor-pointer",href:"mailto:[email protected]",children:"[email protected]"})]})]}),(0,a.jsx)("label",{className:"modal-backdrop",htmlFor:e})]})]})}var F=t(21034);let R=()=>{let e=(0,F.u)(),[s,t]=(0,d.useState)(""),[l,i]=(0,d.useState)(""),[p,C]=(0,d.useState)(""),[P,S]=(0,d.useState)(!1),[$,R]=(0,d.useState)(),M=`${e?.user?.first_name?.trim().charAt(0)??""}${e?.user?.surname?.trim().charAt(0)??""}`.toUpperCase(),[D,I]=(0,d.useState)(""),[L,T]=(0,d.useState)(!1),[U,O]=(0,d.useState)(null),[q,z]=(0,d.useState)(""),[Y,W]=(0,d.useState)(!1),[B,V]=(0,d.useState)(!1),[G,J]=(0,d.useState)(!1),[K,Z]=(0,d.useState)({}),[X,Q]=(0,d.useState)(0),[H,ee]=(0,d.useState)(0),[es,et]=(0,d.useState)(!0),ea=async e=>{let s=e.target.files?.[0];if(s){if(!["image/jpeg","image/png","image/jpg"].includes(s.type))return void alert("Please select a valid image file (JPG, JPEG, PNG).");if(s.size>1048576)return void alert("File size exceeds 1MB.");O(s),z(URL.createObjectURL(s))}},el=async()=>{if(U){W(!0);try{let s=await (0,g.V6)(U);I(s),O(null),h.Ay.success("Profile picture sucessfully updated"),e.refetch({query:{disableCookieCache:!0}}),setTimeout(()=>{window.location.reload()},1e3)}catch{h.Ay.error("Error uploading image")}finally{W(!1)}}},er=async()=>{V(!0);try{await (0,g.vS)(),e.refetch({query:{disableCookieCache:!0}}),O(null),I(""),h.Ay.success("Profile picture deleted"),setTimeout(()=>{window.location.reload()},1e3)}catch{h.Ay.error("Failed to delete image")}finally{V(!1)}},ei=async t=>{if(t.preventDefault(),s.length<=1||l.length<=1)return void h.Ay.error("Please check your inputs");if(!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(p))return void h.Ay.error("Please check your E-Mail");try{await (0,g.Tk)(s,l,p),h.Ay.success("Profile sucessfully updated"),U?await el():setTimeout(()=>{window.location.reload()},1e3),e.refetch({query:{disableCookieCache:!0}})}catch{h.Ay.error("Failed to update profile")}},en=async()=>{J(!0);try{await (0,f.r)()}catch{J(!1),h.Ay.error("Failed to log out")}},eo=async()=>{try{let e=await (0,g.DA)(),s={[v.$$.default]:0,[v.$$.luma]:0,[v.$$.scan]:0};e.userCount.notes.forEach(e=>{e&&"object"==typeof e&&"category"in e&&"string"===e.category&&"notecount"in e&&(s[e.category]+=Number(e.notecount))}),Z(s),Q(e.userCount.alerts),ee(e.userCount.measurements)}catch{Z({[v.$$.default]:0,[v.$$.luma]:0,[v.$$.scan]:0}),Q(0),ee(0),h.Ay.error("Failed to load user statistics.")}finally{et(!1)}};return((0,d.useEffect)(()=>{e?.user?.email&&(t(e.user.first_name),i(e.user.surname),C(e.user.email),R(e.user.properties),I(e.user.profile_image),eo())},[e?.user]),es)?(0,a.jsx)("div",{className:"flex justify-center items-center min-h-screen",children:(0,a.jsx)("span",{className:"loading loading-spinner"})}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex mx-auto flex-col py-2 min-h-screen background-gradient",children:[(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:"FusionMap - Admin"})}),(0,a.jsx)(c.A,{}),(0,a.jsx)(h.l$,{}),(0,a.jsxs)("main",{className:"subpage-container",children:[(0,a.jsxs)("div",{className:"subpage-content flex flex-col desktop:grid desktop:grid-cols-3 gap-8",children:[(0,a.jsxs)("div",{className:"col-span-1 w-full bg-white/10 p-6 rounded-lg text-left items-center justify-center flex flex-col",children:[(0,a.jsx)("label",{htmlFor:"uploadpic-modal",className:"cursor-pointer text-lg font-bold text-white",children:(0,a.jsxs)("div",{className:"relative w-24 h-24",onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:[D?(0,a.jsx)("img",{src:D,alt:"Profile",className:"w-full h-full rounded-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full backdrop-blur-sm bg-white/20 rounded-full flex items-center justify-center text-4xl font-semibold ",children:M}),L&&(0,a.jsx)("div",{className:`absolute inset-0 bg-black/50 rounded-full flex items-center justify-center transition-opacity duration-300 ${L?"opacity-100":"opacity-0"}`,children:(0,a.jsx)("span",{className:"text-lg font-bold text-white",children:"Edit"})}),(0,a.jsx)("div",{className:"absolute bottom-0 right-0 p-1 bg-white rounded-full",children:(0,a.jsx)(_.z$h,{className:"text-black"})})]})}),(0,a.jsx)("div",{}),(0,a.jsx)("span",{className:"mt-3 font-bold text-lg",children:e?.user?.name}),e?.user?.is_developer&&(0,a.jsx)("span",{className:"badge badge-neutral p-4 mt-2",children:"Developer"}),(0,a.jsx)("span",{children:(0,a.jsxs)("button",{onClick:en,disabled:G,className:"mt-8 btn btn-sm",children:[(0,a.jsx)(m.qBV,{}),"\xa0",G?"Logging out...":"Log out"]})})]}),(0,a.jsxs)("div",{className:"col-span-1 md:col-span-2 lg:col-span-2 bg-white/10 p-10 rounded-lg text-left w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between border-b border-b-white/10 pb-4",children:[(0,a.jsx)("span",{className:"font-bold",children:"E-Mail"}),(0,a.jsx)("span",{children:e?.user?.email})]}),$?.login_method==="login"&&(0,a.jsxs)("div",{className:"flex justify-between border-b border-b-white/10 py-4",children:[(0,a.jsx)("span",{className:"font-bold",children:"Password"}),(0,a.jsx)("span",{children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)(u.Z7+"/forgotten-password"),children:(0,a.jsx)("button",{className:"btn btn-sm",children:"Change password"})})})]}),(0,a.jsxs)("div",{className:"flex justify-between border-b border-b-white/10 py-4",children:[(0,a.jsx)("span",{className:"font-bold",children:"Edit"}),(0,a.jsx)("span",{children:(0,a.jsx)("label",{htmlFor:"edituser-modal",className:"btn btn-sm",children:"Edit profile"})})]}),e&&e.user&&e.user.properties.expiry_date&&(0,a.jsxs)("div",{className:"flex justify-between border-b border-b-white/10 py-4",children:[(0,a.jsx)("span",{className:"font-bold",children:"Expiry date"}),e?.user?.properties.expiry_date&&(0,a.jsxs)("span",{children:[new Date(e.user.properties.expiry_date).toLocaleDateString(),(0,g.Iv)(e.user.properties.expiry_date)&&` (${(0,g.Iv)(e.user.properties.expiry_date)})`]})]}),(0,a.jsxs)("div",{className:"flex justify-between py-4",children:[(0,a.jsx)("span",{className:"font-bold",children:"Account"}),(0,a.jsx)("span",{children:(0,a.jsx)("label",{htmlFor:"deleteaccount-modal",className:"btn btn-sm",children:"Delete account"})})]}),(0,b.HE)()&&(0,b.KR)()&&(0,a.jsxs)("div",{onClick:()=>(0,b.XM)(),className:"flex justify-between py-4 border-t border-t-white/10",children:[(0,a.jsxs)("span",{className:"font-bold flex items-center gap-1",children:[(0,a.jsx)(m.owP,{})," Scanner"]}),(0,a.jsx)("span",{children:(0,a.jsx)("button",{className:"btn btn-sm",children:"Open Scanner"})})]})]}),(0,a.jsx)("div",{}),(0,a.jsx)(E,{alertsCount:X,measurementsCount:H,notesCount:K,userLimit:100}),(0,a.jsx)("div",{}),(0,a.jsxs)("div",{className:"col-span-1  md:col-span-2 lg:col-span-2 bg-white/10 p-10 rounded-lg text-left w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between border-b border-b-white/10 pb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-bold",children:" Stripe Payment Billing"}),(0,a.jsx)("span",{className:"text-gray-300 text-sm",style:{display:"block"},children:"Manage subscriptions, change payment methods and view invoices here"}),(0,a.jsxs)("div",{className:"flex items-center text-gray-300 text-[11px] mt-1",children:["Powered by   ",(0,a.jsx)("img",{className:"bg-white ml-1 p-1",style:{borderRadius:"3px"},src:"/images/stripe.svg",alt:"Stripe logo",width:34})]})]}
1),(0,a.jsx)("a",{href:u.no.stripe_billing_page,target:"_blank",rel:"noreferrer",children:(0,a.jsx)("button",{className:"btn btn-sm flex items-center justify-center flex-wrap!",children:(0,a.jsxs)("span",{className:"flex flex-row flex-wrap items-center justify-center",children:["Manage in\xa0",(0,a.jsx)("img",{src:"/images/stripe.svg",alt:"Stripe logo",width:32})]})})})]}),(0,a.jsxs)("div",{className:"flex justify-between border-b-white/10 py-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-bold",style:{display:"block"},children:"Premium Layers"}),(0,a.jsxs)("span",{className:"text-gray-300 text-sm",style:{display:"block"},children:["Access to premium and AI layers",(0,b.KR)()&&". Premium layer purchases are only available on our web version."]})]}),(0,a.jsx)("div",{className:"flex justify-end self-end text-right",children:e?.user?.customer_data[u.no.premium_layers_product_id]&&e.user?.customer_data[u.no.premium_layers_product_id]?.status!=="basic"?(0,a.jsxs)("div",{className:"flex flex-col gap-2 self-end justify-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 self-end",children:[(0,a.jsx)("div",{className:"circle green pulse"}),"Subscribed"]}),e.user?.customer_data[u.no.premium_layers_product_id]?.cancel_at_period_end?(0,a.jsxs)("span",{children:["Expiration date: ",x()(e.user?.customer_data[u.no.premium_layers_product_id]?.next_billing_date).utc().format("M/D/YYYY")]}):(0,a.jsxs)("span",{children:["Next billing date: ",x()(e.user?.customer_data[u.no.premium_layers_product_id]?.next_billing_date).utc().format("M/D/YYYY")]})]}):(0,a.jsx)("div",{className:"flex flex-col gap-2 self-end justify-end",children:(0,b.KR)()?(0,a.jsx)("div",{}):(0,a.jsx)("div",{onClick:()=>S(!0),className:"btn btn-sm custom-width-btn ml-auto",children:"Subscribe"})})})]})]})]}),(0,b.KR)()&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"bg-white/10 p-10 rounded-lg text-left w-full",children:(0,a.jsxs)("ul",{className:"text-gray-400 webview-legal",children:[(0,a.jsx)("li",{className:"mb-2",children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)("https://fusionmap.com/cookie-policy"),children:"Cookie Policy"})}),(0,a.jsx)("li",{className:"mb-2",children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)("https://fusionmap.com/privacy-policy"),children:"Privacy Policy"})}),(0,a.jsx)("li",{className:"mb-2",children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)("https://fusionmap.com/terms-of-use"),children:"Terms of Use"})}),(0,a.jsx)("li",{className:"mb-2",children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)("https://fusionmap.com/copyright"),children:"Copyright"})}),(0,a.jsx)("li",{className:"mb-2",children:(0,a.jsx)(n(),{href:"javascript:void(0);",onClick:()=>(0,b.tL)("https://fusionmap.com/"),children:"Visit website"})})]})})}),(0,a.jsx)(w,{modalId:"uploadpic-modal",title:"Upload Profile Picture",handleClose:()=>{z(""),O(null)},handleFileChange:ea,handleUpload:el,handleDelete:er,isUploading:Y,isDeleting:B,profileImageUrl:D,preview:q,selectedFile:U}),(0,a.jsx)(k,{modalId:"edituser-modal",firstname:s,surname:l,email:p,preview:q,profileImageUrl:D,isDeleting:B,handleClose:()=>{z(""),O(null)},handleFileChange:ea,handleEdit:ei,handleDelete:er,setFirstname:t,setSurname:i,setEmail:C}),(0,a.jsx)(A,{modalId:"deleteaccount-modal"})]}),(0,a.jsx)(y.A,{open:P,onClose:()=>S(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",className:"mx-auto stripe-modal self-center flex w-full",BackdropProps:{style:{backgroundColor:"rgba(0, 0, 0, 0.8)"}},children:(0,a.jsx)(N.A,{component:"div",className:"bg-white justify-center w-[440px] self-center mx-auto rounded-xl",children:(0,a.jsx)(j.A,{closeModal:()=>S(!1),setPremium:()=>window.location.reload()})})})]}),(0,a.jsx)(o.A,{})]})}},45105:(e,s,t)=>{e.exports=t(13209)},56276:(e,s,t)=>{"use strict";t.d(s,{A:()=>b});var a=t(37876),l=t(14232),r=t(22427),i=t(61902),n=t(39149),o=t(84412),c=t(23323),d=t(97685),u=t(80856),m=t(85428),p=t(21034);let x=(0,r.c)(o.no?.stripe_publishable_key),h={mode:"subscription",currency:"usd",amount:4500,setup_future_usage:"off_session",payment_method_types:["card"]};function f(e){let s=(0,i.useStripe)(),t=(0,p.u)(),r=(0,i.useElements)(),[,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[j,g]=(0,l.useState)(!1),[y,N]=(0,l.useState)(!1),[v,w]=(0,l.useState)("monthly"),[k,_]=(0,l.useState)(""),[C,P]=(0,l.useState)(),S=async a=>{if(a.preventDefault(),!s||!r)return;let{error:l}=await r.submit();if(l)return void x(l.message);b(!0);try{let a,l=(await (0,c.x)("/stripe/subscribe",{method:"POST",json:{priceId:o.no.premium_layers_monthly_price_id,promoId:C?.promo_id}})).clientSecret;if(null!=l)({error:a}=await s.confirmPayment({elements:r,clientSecret:l,confirmParams:{return_url:`${window.location.origin}/map`},redirect:"if_required"}));else{if((C?.percent_off==100||C?.amount_off==h.amount)&&C?.duration=="forever")return void setTimeout(()=>{t?.refetch({query:{disableCookieCache:!0}}),N(!0),e.setPremium(u.Jr.premium),b(!1)},5e3);d.oR.error("Error while processing your order"),b(!1);return}a?(d.oR.error(a.message),b(!1)):setTimeout(()=>{t?.refetch({query:{disableCookieCache:!0}}),N(!0),e.setPremium(u.Jr.premium),b(!1)},5e3)}catch{d.oR.error("Unexpected error"),b(!1)}},$=async()=>{g(!0);try{let e=await (0,c.x)("/stripe/coupon",{params:{promoCode:k}});P({...e.promotion_code.coupon,promo_id:e.promotion_code.id}),d.oR.success("Coupon applied")}catch(e){d.oR.error(e instanceof Error?e.message:"Something went wrong. Please try again")}g(!1)};return(0,a.jsx)(a.Fragment,{children:y?(0,a.jsxs)("div",{className:"p-6 justify-center flex flex-col items-center text-black",children:[(0,a.jsx)(n.mcb,{size:40,color:"#4CAF50",className:"mt-2 animate-jump-in"}),(0,a.jsx)("span",{className:"text-xl text-green-700 mt-3",style:{color:"#4CAF50"},children:"Payment Successful!"}),(0,a.jsx)("span",{className:"opacity-60 text-sm mt-2 text-center",children:"You can easily cancel this subscription anytime in your profile"}),(0,a.jsx)("div",{className:"flex justify-end mt-8 w-full",children:(0,a.jsx)("div",{className:"btn w-full",onClick:()=>{f||e.closeModal()},children:"Close"})})]}):(0,a.jsxs)("div",{className:"px-6 pt-6 flex flex-col",children:[(0,a.jsx)(d.l$,{}),(0,a.jsxs)("div",{className:"tabs tabs-box flex w-full mb-5 gap-4",children:[(0,a.jsx)("a",{className:`tab flex-1 ${"monthly"===v?"tab-active-layers":""}`,onClick:()=>w("monthly"),children:(0,a.jsx)("span",{className:"text-xs desktop:text-sm",children:"Monthly"})}),(0,a.jsx)("a",{className:`tab flex-1 cursor-default ${"annually"===v?"tab-active-layers":""}`,children:(0,a.jsxs)("span",{className:"text-xs desktop:text-sm flex items-center gap-2",children:["Annually",(0,a.jsx)("div",{className:"bg-[#d0e2ff] text-[#002d9c] text-[11px] py-[2px] px-1 font-bold rounded-xl shadow",children:"Coming soon"})]})})]}),(0,a.jsxs)("form",{onSubmit:S,className:"text-black",children:[(C?.percent_off!=100&&C?.amount_off!=h.amount||C?.duration!="forever")&&(0,a.jsx)(i.PaymentElement,{}),(0,a.jsx)("div",{className:"flex flex-row justify-center w-full",children:!C&&(0,a.jsxs)("div",{className:"flex items-center mt-3 w-full gap-1",children:[(0,a.jsx)("input",{type:"text",value:k,onChange:e=>_(e.target.value),placeholder:"Enter coupon code",className:"input select-bordered w-full"}),(0,a.jsx)("button",{className:"btn tt-blue-button",type:"button",onClick:$,children:j?(0,a.jsx)("span",{className:"loading loading-spinner loading-sm"}):(0,a.jsx)(a.Fragment,{children:"Apply"})})]})}),(C?.percent_off==100||C?.amount_off==h.amount)&&C?.duration=="forever"&&(0,a.jsx)("div",{className:"rounded-md bg-tt-blue/10 opacity-70 w-full py-3 px-2 flex items-center justify-center gap-2 text-sm mb-3 text-center",children:(0,a.jsxs)("span",{children:["You've applied a ",(0,a.jsx)("b",{children:"100% discount"}),". No credit card required. Activate premium features by clicking the subscribe button below"]})}),(C?.percent_off==100||C?.amount_off==h.amount)&&C?.duration==="once"&&(0,a.jsx)("div",{className:"rounded-md bg-tt-blue/10 opacity-70 w-full py-3 px-2 flex items-center justify-center gap-2 text-sm mb-3 text-center",children:(0,a.jsx)("span",{children:"You applied a 100% discount for the first month. Please provide your credit card information for future payments."})}),(0,a.jsxs)("div",{className:"rounded-lg border p-3 flex flex-col text-black my-5 text-[14px] bg-gray-200/10 border-black/10",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,a.jsx)("span",{children:"Premium plan"}),(0,a.jsxs)("span",{children:["$",(h.amount/100).toFixed(2)," billed monthly"]})]}),C&&(0,a.jsxs)("div",{className:"flex flex-row justify-between pb-1 text-green-600 mt-2",children:[(0,a.jsx)("span",{children:"Coupon"}),(0,a.jsxs)("span",{children:[" - $",(0,m.GF)(h.amount,C)," (-",(0,m.F$)(h.amount,C),"%) "]})]}),(0,a.jsx)("div",{className:"mt-2 flex flex-row justify-between border-b pb-1 border-black/10"}),(0,a.jsxs)("div",{className:"font-bold flex justify-between mt-2",children:[(0,a.jsx)("span",{children:"Total"}),(0,a.jsxs)("span",{children:["$",(0,m.Qn)(h.amount,C)," including tax"]})]})]}),(0,a.jsxs)("div",{className:"flex justify-between mt-2 w-full",children:[(0,a.jsx)("button",{className:"btn tt-blue-button w-9/12",type:"submit",disabled:!s||f,children:f?(0,a.jsx)("span",{className:"loading loading-spinner loading-sm"}):(0,a.jsx)(a.Fragment,{children:"Subscribe to Premium Layers"})}),(0,a.jsx)("div",{className:"btn",onClick:()=>{f||e.closeModal()},children:"Cancel"})]})]}),(0,a.jsx)("a",{href:"https://stripe.com",target:"_blank",className:"w-full flex justify-center my-3",rel:"noreferrer",children:(0,a.jsxs)("div",{className:"flex items-center opacity-60 text-black text-[11px]",children:["Secure payment gateway powered by\xa0\xa0",(0,a.jsx)("img",{src:"/images/stripe.svg",alt:"Stripe logo",width:30})]})})]})})}let b=function(e){return(0,a.jsx)("div",{className:"App",children:(0,a.jsx)(i.Elements,{stripe:x,options:h,children:(0,a.jsx)(f,{setPremium:e.setPremium,closeModal:e.closeModal})})})}},58296:()=>{}},e=>{e.O(0,[3371,2901,6695,7671,1967,5260,5856,9930,636,6593,8792],()=>e(e.s=8172)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.