1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7144],{93619:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var a=n(r(64938)),i=r(85893);t.Z=(0,a.default)((0,i.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},27036:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var a=n(r(64938)),i=r(85893);t.Z=(0,a.default)((0,i.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},19572:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var a=n(r(64938)),i=r(85893);t.Z=(0,a.default)((0,i.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft")},26215:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var a=n(r(64938)),i=r(85893);t.Z=(0,a.default)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight")},45500:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var a=n(r(64938)),i=r(85893);t.Z=(0,a.default)((0,i.jsx)("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"}),"ShoppingCart")},26480:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/purchase-license",function(){return r(12907)}])},86155:function(e,t,r){"use strict";var n=r(85893),a=r(31812);t.Z=e=>{let{btnState:t,text:r,...i}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.Z,{loading:"loading"===t,disabled:"disabled"===t,...i,children:r})})}},36288:function(e,t,r){"use strict";var n=r(85893),a=r(5616),i=r(15861),o=r(7982),l=r(50135),s=r(87109),d=r(69368),c=r(69661),u=r(93946),p=r(11057),x=r(98456),h=r(42761),m=r(11359),g=r(32457),b=r(73772),v=r(11163),_=r(67294);t.Z=e=>{let{users:t,handleSearchChange:r,search:y,setSelectedUsers:j,locationCount:Z,setLocationCount:k,days:C,setDays:S,selectedUsers:z,sendCredits:w,submitLoader:W,availableCredits:P}=e,F=(0,v.useRouter)(),[I,L]=(0,_.useState)(!1),M=e=>{j([e]),L(!1)},A=e=>{j(t=>t.filter(t=>t.id!==e))},R=e=>"string"!=typeof e?"":e.charAt(0).toUpperCase(),E=z.length>0&&Number(Z)>0&&Number(C)>0,H=Number(Z)>(null!=P?P:0);return(0,n.jsxs)(a.Z,{sx:{mt:4,mb:2,mx:{xs:1.5,sm:2.5},p:{xs:2,sm:3},borderRadius:"16px",background:"var(--action-hover, rgba(255, 255, 255, 0.08))"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{variant:"h6",sx:{color:"text.primary",mb:1},children:"Give Locations"}),(0,n.jsxs)(a.Z,{component:"ul",sx:{m:0,pl:2.5,color:"text.secondary"},children:[(0,n.jsx)(i.Z,{component:"li",variant:"body2",sx:{mb:.5,fontSize:"0.85rem"},children:"Give locations to clients and partners"}),(0,n.jsx)(i.Z,{component:"li",variant:"body2",sx:{fontSize:"0.85rem"},children:"Buy in bulk for you clients and partners"})]})]}),null!==P&&(0,n.jsxs)(a.Z,{sx:{border:e=>"1px solid ".concat(e.palette.divider),borderRadius:"8px",px:2,py:.75,color:"text.primary",fontSize:14,background:e=>e.palette.action.hover},children:["Location Count: ",P]})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2,alignItems:"flex-end",flexDirection:{xs:"column",lg:"row"},flexWrap:{lg:"nowrap"}},children:[(0,n.jsx)(o.d,{onClickAway:()=>L(!1),children:(0,n.jsxs)(a.Z,{sx:{position:"relative",flex:{xs:"1 1 100%",lg:"1 1 30%"}},children:[(0,n.jsx)(l.Z,{value:y,fullWidth:!0,label:"Search User",placeholder:"Choose a user to share locations with",variant:"outlined",onChange:e=>{r(e),L(!0)},onFocus:()=>L(!0),InputLabelProps:{shrink:!0},InputProps:{startAdornment:(0,n.jsx)(s.Z,{position:"start",children:(0,n.jsx)(h.Z,{color:"action"})})},sx:f,size:"small"}),I&&(null==t?void 0:t.length)>0&&(0,n.jsx)(a.Z,{sx:{position:"absolute",width:"100%",top:"100%",mt:1,maxHeight:250,overflowY:"auto",borderRadius:2,background:e=>e.palette.background.paper,zIndex:10,p:1},children:t.map(e=>{var t,r;let o=z.some(t=>t.id===e.id);return(0,n.jsxs)(a.Z,{onClick:()=>M(e),sx:{display:"flex",alignItems:"center",gap:2,p:1,borderRadius:2,cursor:"pointer","&:hover":{background:"rgba(255,255,255,0.08)"}},children:[(0,n.jsx)(d.Z,{checked:o}),(0,n.jsx)(c.Z,{children:R(null!==(r=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.email)&&void 0!==r?r:"")}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{sx:{color:"text.primary"},children:null==e?void 0:e.email}),(0,n.jsx)(i.Z,{variant:"body2",sx:{color:"text.secondary"}
1,children:(null==e?void 0:e.isIndividual)?"Individual":null==e?void 0:e.company_name})]})]},e.id)})})]})}),(0,n.jsx)(l.Z,{fullWidth:!0,label:"Location Count",placeholder:"Enter the number of Locations",variant:"outlined",value:Z,onChange:e=>k(e.target.value),InputLabelProps:{shrink:!0},type:"number",error:H,helperText:H?"You can only share up to ".concat(P):"",size:"small",sx:{...f,flex:{xs:"1 1 100%",lg:"1 1 20%"}}}),(0,n.jsx)(l.Z,{fullWidth:!0,label:"Expiry (Days)",placeholder:"Select Date",type:"number",variant:"outlined",value:C,onChange:e=>S(e.target.value),InputLabelProps:{shrink:!0},size:"small",sx:{...f,flex:{xs:"1 1 100%",lg:"1 1 20%"}}})]}),z.length>0&&(0,n.jsxs)(a.Z,{sx:{mt:2},children:[(0,n.jsx)(i.Z,{sx:{color:"text.primary",mb:1,fontSize:"0.9rem"},children:"Selected User"}),(0,n.jsx)(a.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:z.map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.5,borderRadius:2,background:e=>e.palette.action.selected,color:"text.primary"},children:[(0,n.jsx)(i.Z,{variant:"body2",sx:{fontSize:"0.85rem"},children:e.email}),(0,n.jsx)(u.Z,{size:"small",onClick:()=>A(e.id),sx:{color:"text.primary"},children:(0,n.jsx)(b.Z,{fontSize:"small"})})]},e.id))})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1.5,justifyContent:"flex-end",mt:3},children:[(0,n.jsx)(p.Z,{variant:"outlined",startIcon:(0,n.jsx)(g.Z,{}),onClick:()=>{F.push("/purchase-license/manage-share-locations")},size:"small",sx:{px:{xs:1.5,sm:2},py:{xs:.75,sm:1},fontSize:{xs:"0.8rem",sm:"0.9rem"},whiteSpace:"nowrap","& .MuiButton-startIcon svg":{fontSize:{xs:"0.9rem",sm:"1rem"}}},children:"Manage"}),(0,n.jsx)(p.Z,{variant:"contained",startIcon:(0,n.jsx)(m.Z,{}),disabled:!E||W,onClick:w,size:"small",sx:{px:{xs:1.5,sm:2},py:{xs:.75,sm:1},fontSize:{xs:"0.8rem",sm:"0.9rem"},whiteSpace:"nowrap","& .MuiButton-startIcon svg":{fontSize:{xs:"0.9rem",sm:"1rem"}}},children:W?(0,n.jsx)(x.Z,{size:16,color:"inherit"}):"Share Now"})]})]})};let f={mt:2,"& .MuiOutlinedInput-root":{borderRadius:"10px",color:"text.primary","& fieldset":{borderColor:"divider"},"&:hover fieldset":{borderColor:"primary.main"},"&.Mui-focused fieldset":{borderColor:"primary.light"}},"& .MuiOutlinedInput-input":{fontSize:{xs:"0.9rem",sm:"1rem"}},"& .MuiInputLabel-root":{fontSize:{xs:"0.85rem",sm:"0.95rem"}},"& input::placeholder":{color:"text.secondary",opacity:1,fontSize:{xs:"0.88rem",sm:"0.95rem"}},"& .MuiInputAdornment-root":{"& .MuiSvgIcon-root":{fontSize:{xs:"1rem",sm:"1.1rem"},color:"inherit"}}}},12907:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return em}});var n=r(85893),a=r(5616),i=r(15861),o=r(86886),l=r(63366),s=r(87462),d=r(67294),c=r(90512),u=r(94780),p=r(49990),x=r(98216),h=r(28628),m=r(1588),g=r(34867);function b(e){return(0,g.ZP)("MuiFab",e)}let v=(0,m.Z)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]);var _=r(90948),f=r(14136);let y=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],j=e=>{let{color:t,variant:r,classes:n,size:a}=e,i={root:["root",r,`size${(0,x.Z)(a)}`,"inherit"===t?"colorInherit":t]},o=(0,u.Z)(i,b,n);return(0,s.Z)({},n,o)},Z=(0,_.ZP)(p.Z,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,f.Z)(e)||"classes"===e,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,x.Z)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,x.Z)(r.size)],t[r.color]]}})(({theme:e,ownerState:t})=>{var r,n;return(0,s.Z)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${v.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48}
1,"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})},({theme:e,ownerState:t})=>(0,s.Z)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),k=d.forwardRef(function(e,t){let r=(0,h.i)({props:e,name:"MuiFab"}),{children:a,className:i,color:o="default",component:d="button",disabled:u=!1,disableFocusRipple:p=!1,focusVisibleClassName:x,size:m="large",variant:g="circular"}=r,b=(0,l.Z)(r,y),v=(0,s.Z)({},r,{color:o,component:d,disabled:u,disableFocusRipple:p,size:m,variant:g}),_=j(v);return(0,n.jsx)(Z,(0,s.Z)({className:(0,c.Z)(_.root,i),component:d,disabled:u,focusRipple:!p,focusVisibleClassName:(0,c.Z)(_.focusVisible,x),ownerState:v,ref:t},b,{classes:_,children:a}))});var C=r(19529),S=r(77533),z=r(93946),w=r(45500),W=r(73772),P=r(87918),F=r(78462),I=r(97212),L=r(48885),M=r(59334),A=r(67720),R=r(94054),E=r(47312),H=r(18360),N=r(18972),D=r(50135),B=r(27036),T=r(19572),Y=r(26215),$=r(11057),U=r(93619),V=e=>{let{title:t="Basic Package",features:r=[{name:"Hazard Hub",description:"Hazard scoring, profiles, lookups & data",count:10},{name:"Location Processing",description:"Geocoding, hazard and Data Completeness",count:10},{name:"User License",description:"User License for adding users in your corporate account",count:10},{name:"Location Improvement Cost",description:"Edit Locations and add Campus.",count:10}],price:o=100,billingCycle:l="Year",subtitle:s="All licenses included - Maximum value",onPurchaseClick:d}=e;return(0,n.jsxs)(a.Z,{sx:{P:2,borderRadius:"16px",display:"flex",flexDirection:"column",height:"100%",width:"100%",overflow:"hidden",background:e=>e.palette.primary.main,border:e=>"2px solid ".concat(e.palette.primary.main)},children:[(0,n.jsx)(a.Z,{sx:{px:3,py:1},children:(0,n.jsx)(i.Z,{variant:"subtitle2",sx:{color:"black",fontWeight:500},children:t})}),(0,n.jsxs)(a.Z,{sx:{borderTopRightRadius:"16px",borderTopLeftRadius:"16px",background:e=>e.palette.background.paper,px:3,py:2,display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary,mb:2,fontSize:{xs:"0.8rem",sm:"0.85rem"},lineHeight:1.4,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:5,WebkitBoxOrient:"vertical"},children:"Get full access to all RiskSphere licenses and features."}),(0,n.jsx)(a.Z,{sx:{mb:2,minHeight:275,maxHeight:450,overflowY:"auto",scrollbarWidth:"thin"},children:(0,n.jsx)(F.Z,{sx:{p:0},children:r.map((e,t)=>(0,n.jsxs)(I.ZP,{sx:{px:0,py:.8,display:"flex",alignItems:"flex-start",borderBottom:e=>t<r.length-1?"1px solid ".concat(e.palette.divider):"none"},children:[(0,n.jsx)(L.Z,{sx:{minWidth:28,mt:.3},children:(0,n.jsx)(B.Z,{sx:{fontSize:"1rem",borderRadius:"50%",color:"#4CAF50",padding:"2px",backgroundColor:"rgba(76, 175, 80, 0.1)"}})}),(0,n.jsx)(M.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:[(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.common.white,fontWeight:600,fontSize:{xs:"0.8rem",sm:"0.85rem"}},children:e.name}),(0,n.jsx)(P.Z,{label:"".concat(e.count),size:"small",sx:{background:e=>"".concat(e.palette.primary.main,"4D"),color:e=>e.palette.common.white,fontWeight:600,fontSize:{xs:"0.65rem",sm:"0.7rem"},height:20}})]}),secondary:e.description?(0,n.jsx)(i.Z,{variant:"caption",sx:{color:e=>e.palette.text.disabled,display:"block",mt:.3,fontSize:{xs:"0.65rem",sm:"0.7rem"},lineHeight:1.2},children:e.description}
1):null,sx:{m:0}})]},t))})}),(0,n.jsx)(A.Z,{}),(0,n.jsxs)(a.Z,{sx:{mb:1,py:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"baseline",gap:.5,mb:.5},children:[(0,n.jsxs)(i.Z,{variant:"h4",sx:{color:e=>e.palette.common.white,fontWeight:500,fontSize:{xs:"1.5rem",sm:"1.6rem",md:"1.8rem"}},children:["$",o]}),(0,n.jsxs)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary,fontSize:{xs:"0.8rem",sm:"0.85rem"}},children:["/ ",l]})]}),(0,n.jsx)(i.Z,{variant:"caption",sx:{color:e=>e.palette.text.disabled,fontSize:{xs:"0.7rem",sm:"0.75rem"},lineHeight:1.2},children:s})]}),(0,n.jsx)(A.Z,{}),(0,n.jsx)(a.Z,{sx:{flex:1}}),(0,n.jsxs)($.Z,{onClick:d,sx:{background:e=>e.palette.primary.main,color:e=>e.palette.common.black,fontWeight:500,py:1,mt:2,borderRadius:"8px",fontSize:{xs:"0.8rem",sm:"0.85rem"},display:"flex",alignItems:"center",justifyContent:"center","&:hover":{background:e=>e.palette.primary.dark,transform:"translateY(-2px)",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"},transition:"all 0.3s ease"},children:["Purchase",(0,n.jsx)(U.Z,{sx:{fontSize:"0.9rem"}})]})]})]})},O=r(14640),G=e=>{let{plans:t,onSelectionChange:r,resetPlanIds:o,showCustomPackages:l=!1,onBundlePurchase:s}=e,c=(0,O.useTranslations)(),u=(0,d.useRef)(null),[p,x]=(0,d.useState)(!1),[h,m]=(0,d.useState)(!1),[g,b]=(0,d.useState)({}),[v,_]=(0,d.useState)({}),[f,y]=(0,d.useState)({}),[j,Z]=(0,d.useState)({}),[k,C]=(0,d.useState)({});(0,d.useEffect)(()=>{let e={};t.forEach(t=>{t.range_year&&t.range_year.some(e=>e.end_count&&""!==e.end_count)?e[t.plan_id]="Yearly":t.range_month&&t.range_month.some(e=>e.end_count&&""!==e.end_count)&&(e[t.plan_id]="Monthly")}),b(e)},[t]),(0,d.useEffect)(()=>{if(o&&o.length>0){let e={...g},t={...v},r={...f},n={...j},a={...k};o.forEach(i=>{delete e[i],delete t[i],delete r[i],delete n[i],delete a[i]}),b(e),_(t),y(r),Z(n),C(a),$(e,t,r,n)}},[o]);let S=()=>
1{if(u.current){let{scrollLeft:e,scrollWidth:t,clientWidth:r}=u.current;x(e>0),m(e<t-r-1)}};(0,d.useEffect)(()=>(S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)),[t]);let w=e=>{if(u.current){let t="left"===e?u.current.scrollLeft-380:u.current.scrollLeft+380;u.current.scrollTo({left:t,behavior:"smooth"})}},W={PaperProps:{sx:{"& .MuiMenuItem-root":{py:{xs:.4,sm:.6},fontSize:{xs:"0.85rem",sm:"0.9rem"}},"& .MuiList-root":{paddingTop:0,paddingBottom:0},maxHeight:300}},MenuListProps:{dense:!0}},$=function(e,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;r&&r(t.map(t=>{let r=e[t.plan_id],o=n[t.plan_id];if(r&&o){if("event_cost"===t.plan_type){let e="Monthly"===r?t.range_month:t.range_year,n=((null==e?void 0:e.filter(e=>e.end_count&&""!==e.end_count))||[]).filter(e=>e.vendor_id===a[t.plan_id]&&e.hazard_id===i[t.plan_id]).find(e=>parseInt(String(e.start_count))<=parseInt(String(o.start_count))&&parseInt(String(e.end_count))>=parseInt(String(o.end_count)));if(n)return console.log("Selected Range Details:",{vendor:n.vendor_name_label,event_type:n.hazard_name_label,price:n.range_price,range:"".concat(n.start_count,"-").concat(n.end_count),cycle:r}),{plan:t,cycle:r,range:n,vendor:n.vendor_name_label,event_type:n.hazard_name_label}}return{plan:t,cycle:r,range:{...o,range_price:Number(o.range_price)}}}return null}).filter(e=>null!==e))},U=(e,t)=>{let r={...g,[e]:t},n={...v,[e]:null};b(r),_(n),$(r,n)},G=(e,t)=>{let r={...v,[e]:t};_(r),$(g,r)},q=(e,t)=>{let r={...f,[e]:t},n={...j};delete n[e],y(r),Z(n),$(g,v,r,n)},X=(e,t)=>{let r={...j,[e]:t};Z(r),$(g,v,f,r)},J=(e,t,r,n)=>{if(!t||/^\d+$/.test(t)){if(C({...k,[e]:t}),t){let a=parseInt(t,10),i="Monthly"===n?r.range_month:r.range_year,o=i&&i.length>0?i[0].price_per_user:0,l={start_count:a,end_count:a,price_per_user:o,range_price:a*parseFloat(String(o||0)),hazard_name:"",hazard_name_label:"",vendor_id:"",vendor_name_label:""},s={...v,[e]:l};_(s),$(g,s)}else{let t={...v,[e]:null};_(t),$(g,t)}}},K=(e,t)=>{if("event_cost"===e.plan_type){let r="Monthly"===t?e.range_month:e.range_year,n=(null==r?void 0:r.filter(e=>e.end_count&&""!==e.end_count))||[],a=f[e.plan_id],i=j[e.plan_id],o=null==n?void 0:n.find(e=>e.vendor_id===a&&e.hazard_id===i);if(o)return"number"==typeof o.price_per_user?o.price_per_user:parseFloat(o.price_per_user)}return 0},Q=e=>"user_cost"===e?"User count":"Location count",ee=e=>({"Hazard Hub":"Hazard scoring, profiles, lookups & data","Location Processing":"Geocoding, hazard and Data Completeness","User License":"User License for adding users in your corporate account","Location Improvement Cost":"Edit Locations and add Campus."})[e]||"",et=t.filter(e=>e.range_year&&e.range_year.length>0).flatMap(e=>{var t,r;return"event_cost"===e.plan_type?e.range_year.filter(e=>e.end_count&&""!==e.end_count).map(e=>({name:e.vendor_name_label||"",description:e.hazard_name_label||"",count:"number"==typeof e.end_count?e.end_count:parseInt(e.end_count||"0",10)})):[{name:e.plan_name||"",description:ee(e.plan_name||""),count:"number"==typeof(null===(t=e.range_year[0])||void 0===t?void 0:t.end_count)?e.range_year[0].end_count:parseInt((null===(r=e.range_year[0])||void 0===r?void 0:r.end_count)||"0",10)}]}),er=t.filter(e=>e.range_year&&e.range_year.length>0).reduce((e,t)=>{var r;if("event_cost"===t.plan_type)return e+t.range_year.filter(e=>e.end_count&&""!==e.end_count).reduce((e,t)=>{let r=t.range_price;return e+("number"==typeof r?r:parseFloat(r||"0"))},0);let n=null===(r=t.range_year[0])||void 0===r?void 0:r.range_price;return e+("number"==typeof n?n:parseFloat(n||"0"))},0);return(0,n.jsxs)(a.Z,{sx:{position:"relative"},children:[p&&(0,n.jsx)(z.Z,{onClick:()=>w("left"),sx:{position:"absolute",left:-10,top:"50%",transform:"translateY(-50%)",zIndex:10,backgroundColor:"rgba(138, 58, 117, 0.8)",color:"white","&:hover":{backgroundColor:"rgba(138, 58, 117, 1)"},boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"},children:(0,n.jsx)(T.Z,{})}),h&&(0,n.jsx)(z.Z,{onClick:()=>w("right"),sx:{position:"absolute",right:-10,top:"50%",transform:"translateY(-50%)",zIndex:10,backgroundColor:"rgba(138, 58, 117, 0.8)",color:"white","&:hover":{backgroundColor:"rgba(138, 58, 117, 1)"},boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"},children:(0,n.jsx)(Y.Z,{})}),(0,n.jsxs)(a.Z,{ref:u,onScroll:S,sx:{display:"flex",overflowX:"auto",gap:3,px:2,py:2,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:[l&&et.length>0&&(0,n.jsx)(a.Z,{sx:{minWidth:350,maxWidth:350},children:(0,n.jsx)(V,{title:"Basic Package",features:et,price:er,billingCycle:"Year",subtitle:"All licenses included - Maximum value",onPurchaseClick:()=>{let e=t.filter(e=>e.range_year&&e.range_year.length>0).flatMap(e=>"event_cost"===e.plan_type?e.range_year.filter(e=>e.end_count&&""!==e.end_count).map(t=>({plan:e,cycle:"Yearly",range:t,vendor:t.vendor_name_label,event_type:t.hazard_name_label,isBundle:!0})):[{plan:e,cycle:"Yearly",range:e.range_year[0],isBundle:!0}]);r&&r(e),s&&s()}})}),t.map(e=>{var t;let r=e.plan_id,o=g[r],l="Monthly"===o?e.range_month:e.range_year,s=(null==l?void 0:l.filter(e=>e.end_count&&""!==e.end_count))||[];return(0,n.jsx)(a.Z,{sx:{minWidth:350,maxWidth:350,display:"flex",flexDirection:"column"},children:(0,n.jsxs)(a.Z,{sx:{border:"1px solid rgba(138, 58, 117, 0.3)",borderRadius:"16px",p:3,height:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:"rgba(20, 20, 30, 0.5)",backdropFilter:"blur(10px)",transition:"all 0.3s ease","&:hover":{borderColor:"rgba(138, 58, 117, 0.6)",backgroundColor:"rgba(30, 30, 45, 0.6)"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:["free_trial"===e.plan_type&&(0,n.jsx)(P.Z,{label:"Free trial",size:"small",variant:"outlined",sx:{height:24}}),(null===(t=e.plan_name)||void 0===t?void 0:t.includes("Most"))&&(0,n.jsx)(P.Z,{label:"Most popular",size:"small",color:"primary",sx:{height:24}})]}),(0,n.jsx)(i.Z,{variant:"h6",sx:{color:e=>e.palette.text.primary,fontSize:"1.1rem",fontWeight:500,mb:1,minHeight:50,maxHeight:50,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:e.plan_name}),(0,n.jsx)(a.Z,{sx:{minHeight:225,maxHeight:350,mt:.5,mb:.5,overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:(0,n.jsx)(F.Z,{sx:{p:0},children:e.description.split("\n").filter(e=>e.trim()).map((e,t)=>(0,n.jsxs)(I.ZP,{sx:{px:0,py:.5},children:[(0,n.jsx)(L.Z,{sx:{minWidth:28,mt:.1},children:(0,n.jsx)(B.Z,{sx:{fontSize:"1rem",borderRadius:"50%",color:"#4CAF50",padding:"2px",backgroundColor:"rgba(76, 175, 80, 0.1)"}})}),(0,n.jsx)(M.Z,{primary:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary,fontSize:"0.9rem",lineHeight:1.5},children:e.replace(/^[â¢\-\*]\s*/,"")})})]},t))})}),(0,n.jsxs)(a.Z,{sx:{mt:"auto",pt:2},children:[(0,n.jsx)(A.Z,{sx:{borderColor:"rgba(138, 58, 117, 0.3)",mb:2}}),(0,n.jsx)(a.Z,{sx:{mb:2,display:"flex",flexDirection:"column",justifyContent:"center"},children:(0,n.jsx)(i.Z,{variant:"h4",sx:{color:e=>e.palette.text.primary,fontWeight:500,mb:.5},children:"event_cost"===e.plan_type?o?"$".concat(K(e,o).toFixed(2)):"$0":v[r]?"$".concat((parseInt(String(v[r].end_count)||"0")*parseFloat(String(v[r].price_per_user)||"0")).toFixed(2)):"$0"})}),(0,n.jsx)(A.Z,{sx:{borderColor:"rgba(138, 58, 117, 0.3)",mb:2}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,n.jsxs)(R.Z,{fullWidth:!0,size:"small",children:[(0,n.jsx)(E.Z,{sx:{fontSize:"0.85rem"},children:c("subscription_type")}),(0,n.jsxs)(H.Z,{value:o||"",label:c("subscription_type"),MenuProps:W,onChange:e=>U(r,e.target.value),children:[e.range_month&&e.range_month.some(e=>e.end_count&&""!==e.end_count)&&(0,n.jsx)(N.Z,{value:"Monthly",children:"Monthly"}),e.range_year&&e.range_year.some(e=>e.end_count&&""!==e.end_count)&&(0,n.jsx)(N.Z,{value:"Yearly",children:"Yearly"})]})]}
1),o&&"event_cost"!==e.plan_type&&("hurricane_kineticast"===e.plan_type||"earthquake_usgs"===e.plan_type?(0,n.jsx)(D.Z,{fullWidth:!0,size:"small",label:Q(e.plan_type),value:k[r]||"",onChange:t=>J(r,t.target.value,e,o),placeholder:"Enter count",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{fontSize:"0.85rem"}}):(0,n.jsxs)(R.Z,{fullWidth:!0,size:"small",children:[(0,n.jsx)(E.Z,{sx:{fontSize:"0.85rem"},children:Q(e.plan_type)}),(0,n.jsx)(H.Z,{value:v[r]?"".concat(v[r].start_count,"-").concat(v[r].end_count):"",label:Q(e.plan_type),MenuProps:W,onChange:e=>{let t=s.find(t=>"".concat(t.start_count,"-").concat(t.end_count)===e.target.value);t&&G(r,t)},children:s.map(e=>(0,n.jsx)(N.Z,{value:"".concat(e.start_count,"-").concat(e.end_count),children:e.end_count},"".concat(e.start_count,"-").concat(e.end_count)))})]})),"event_cost"===e.plan_type&&o&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(R.Z,{fullWidth:!0,size:"small",children:[(0,n.jsx)(E.Z,{sx:{fontSize:"0.85rem"},children:c("Vendor")}),(0,n.jsx)(H.Z,{value:f[r]||"",label:c("Vendor"),MenuProps:W,onChange:e=>q(r,e.target.value),children:Array.from(new Set(s.map(e=>e.vendor_id))).map(e=>{let t=s.find(t=>t.vendor_id===e);return(0,n.jsx)(N.Z,{value:null==t?void 0:t.vendor_id,children:null==t?void 0:t.vendor_name_label},null==t?void 0:t.vendor_id)})})]}),(0,n.jsxs)(R.Z,{fullWidth:!0,size:"small",disabled:!f[r],children:[(0,n.jsx)(E.Z,{sx:{fontSize:"0.85rem"},children:c("event_type")}),(0,n.jsx)(H.Z,{value:j[r]||"",label:c("event_type"),MenuProps:W,onChange:e=>X(r,e.target.value),children:s.filter(e=>e.vendor_id===f[r]).map(e=>(0,n.jsx)(N.Z,{value:e.hazard_id,children:e.hazard_name_label},e.hazard_id))})]}),(0,n.jsxs)(R.Z,{fullWidth:!0,size:"small",disabled:!j[r],children:[(0,n.jsx)(E.Z,{sx:{fontSize:"0.85rem"},children:c("location_range")}),(0,n.jsx)(H.Z,{value:v[r]?"".concat(v[r].start_count,"-").concat(v[r].end_count):"",label:c("location_range"),MenuProps:W,onChange:e=>{let t=s.find(t=>t.vendor_id===f[r]&&t.hazard_id===j[r]&&"".concat(t.start_count,"-").concat(t.end_count)===e.target.value);t&&G(r,t)},children:s.filter(e=>e.vendor_id===f[r]&&e.hazard_id===j[r]).map(e=>(0,n.jsxs)(N.Z,{value:"".concat(e.start_count,"-").concat(e.end_count),children:[e.end_count," locations"]},"".concat(e.start_count,"-").concat(e.end_count)))})]})]})]})]})]})},r)}),(0,n.jsx)(a.Z,{sx:{minWidth:350,maxWidth:350,display:"flex",flexDirection:"column"},children:(0,n.jsxs)(a.Z,{sx:{border:"1px solid rgba(138, 58, 117, 0.3)",borderRadius:"16px",p:3,height:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:"rgba(20, 20, 30, 0.5)",backdropFilter:"blur(10px)",transition:"all 0.3s ease","&:hover":{borderColor:"rgba(138, 58, 117, 0.6)",backgroundColor:"rgba(30, 30, 45, 0.6)"}},children:[(0,n.jsx)(i.Z,{variant:"h6",sx:{color:e=>e.palette.text.primary,fontSize:"1.1rem",fontWeight:500,mb:1,minHeight:50,maxHeight:50,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:"Digital SOV"}),(0,n.jsx)(a.Z,{sx:{minHeight:225,maxHeight:250,mt:2,mb:2,overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:(0,n.jsx)(F.Z,{sx:{p:0},children:["Create and share digital SOVs","Basic document management","Limited processing","Up to 1,000 locations","Community support"].map((e,t)=>(0,n.jsxs)(I.ZP,{sx:{px:0,py:.5},children:[(0,n.jsx)(L.Z,{sx:{minWidth:28,mt:.3},children:(0,n.jsx)(B.Z,{sx:{fontSize:"1rem",borderRadius:"50%",color:"#4CAF50",padding:"2px",backgroundColor:"rgba(76, 175, 80, 0.1)"}})}),(0,n.jsx)(M.Z,{primary:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary,fontSize:"0.9rem",lineHeight:1.5},children:e})})]},t))})}),(0,n.jsxs)(a.Z,{sx:{mt:"auto",pt:2},children:[(0,n.jsx)(A.Z,{sx:{borderColor:"rgba(138, 58, 117, 0.3)",mb:2}}),(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:(0,n.jsx)(i.Z,{variant:"h4",sx:{color:e=>e.palette.text.primary,fontWeight:500,mb:.5},children:"$0"})})]})]})})]})]})},q=r(2734),X=()=>{let e=(0,q.Z)(),t=(0,O.useTranslations)();return(0,n.jsx)(a.Z,{sx:{borderRadius:"100px",border:"1px solid ".concat(e.palette.divider),backgroundColor:e.palette.action.hover,backdropFilter:"blur(12px)",px:{xs:2,sm:3},py:{xs:.5,sm:1},display:{xs:"block",sm:"inline-block"},width:{xs:"calc(100% - 32px)",sm:"auto"},mx:{xs:2,sm:0},textAlign:{xs:"center",sm:"left"}},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e.palette.text.primary},children:t("package_page_title")})})},J=()=>{let e=(0,O.useTranslations)();return(0,n.jsxs)(a.Z,{textAlign:"center",children:[(0,n.jsx)(i.Z,{variant:"h3",sx:{background:"linear-gradient(180deg, #FFF 30%, #888 100%)",backgroundClip:"text",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",fontSize:{xs:"1.4rem",sm:"1.8rem",md:"2.8rem"}},children:e("packge_main_title_up")}),(0,n.jsx)(i.Z,{variant:"h3",sx:{background:"linear-gradient(180deg, #FFF 30%, #888 100%)",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",fontSize:{xs:"1.4rem",sm:"1.8rem",md:"2.8rem"}},children:e("package_main_title_down")})]})},K=r(95752),Q=r(12754),ee=r(23078),et=r(37115),er=r(11163),en=r(86155),ea=r(45007),ei=r(21740),eo=r(36288),el=r(23279),es=r.n(el),ed=r(55678),ec=r(74393),eu=(r(36238),r(30310)),ep=()=>{let e=(0,O.useTranslations)(),t=(0,K.Z)(),r=(0,er.useRouter)(),{fetchClaims:l}=(0,ec.C)(),[s,c]=(0,d.useState)(null),u=(0,ea.v9)(e=>{var t,r;return null===(r=e.auth.auth)||void 0===r?void 0:null===(t=r.customAttributes)||void 0===t?void 0:t.isIndividual}),[p,x]=(0,d.useState)(!1),[h,m]=(0,d.useState)([]),[g,b]=(0,d.useState)([]),[v,_]=(0,d.useState)([]),[f,y]=(0,d.useState)([]),[j,Z]=(0,d.useState)([]),[P,F]=(0,d.useState)("idle"),[I,L]=(0,d.useState)([]),[M,A]=d.useState(""),[R,E]=(0,d.useState)([]),[H,N]=(0,d.useState)(""),[D,B]=(0,d.useState)(""),[T,Y]=(0,d.useState)(!1),[$,U]=(0,d.useState)(!1),[V,q]=(0,d.useState)(!1),el=(j.length,async()=>{var e;let t=await l();c((null==t?void 0:null===(e=t.has_hazard_license_count)||void 0===e?void 0:e.left_credits)||0)});(0,d.useEffect)(()=>{el()},[]),(0,d.useEffect)(()=>{ep()},[]),(0,d.useEffect)(()=>{(async()=>{try{var e;let r=await t.get("".concat(Q.AJ.list,'/""'));_((null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.result)||[])}catch(e){(0,ee.f)(e,"Error while fetching vendor list")}})()},[]),(0,d.useEffect)(()=>{(async()=>{try{var e;let r=await t.get(Q.AJ.hazard_list),n=(null===(e=r.data)||void 0===e?void 0:e.result)||[];if(null==n?void 0:n.length){let e=n.map(e=>{var t;return{label:null==e?void 0:null===(t=e.hazard_name)||void 0===t?void 0:t.replaceAll("_"," "),value:e.id}});y(e)}}catch(e){(0,ee.f)(e,"Error fetching hazard list")}})()},[]),(0,d.useEffect)(()=>{if(g.length>0){let e=setTimeout(()=>b([]),0);return()=>clearTimeout(e)}},[g]);let ep=async()=>{let e=(0,ei.r)(),r=(0,ei.g4)(e,"fetchPackages");r.start(),x(!0);try{r.putAttribute("isIndividual",String(!!u)),r.putAttribute("willFilterUserCost",String(!!u));let e=performance.now(),l=await t.get(Q.K3.get),s=performance.now()-e;if(r.putAttribute("apiDuration",s.toFixed(2)),r.putAttribute("apiDurationCategory",s<1e3?"fast":s<3e3?"medium":"slow"),null==l?void 0:l.data){var n,a,i,o;let e=(null===(a=l.data)||void 0===a?void 0:null===(n=a.result)||void 0===n?void 0:n.length)||0,t=u?null===(i=l.data)||void 0===i?void 0:i.result.filter(e=>"user_cost"!==e.plan_type):null===(o=l.data)||void 0===o?void 0:o.result,s=(null==t?void 0:t.length)||0;m(t),r.putAttribute("originalPackageCount",String(e)),r.putAttribute("filteredPackageCount",String(s)),r.putAttribute("packagesFiltered",String(e-s)),r.putAttribute("success","true")}}catch(e){r.putAttribute("success","false"),r.putAttribute("error",String(e)),(0,ee.f)(e,"Failed to fetch packages")}finally{x(!1),r.stop()}},ex=async()=>{F("loading");try{var e,n;let a={data:{amount:100*Number(j.reduce((e,t)=>{let r="string"==typeof t.range.range_price?parseFloat(t.range.range_price):Number(t.range.range_price||0);return e+r},0).toFixed(2)),plans:j.map(e=>{let{plan:t,cycle:r,range:n,vendor:a,event_type:i}=e,o="string"==typeof n.range_price?parseFloat(n.range_price):Number(n.range_price||0),l="hurricane_kineticast"===t.plan_type||"earthquake_usgs"===t.plan_type?"1-".concat(n.end_count):"".concat(n.start_count,"-").concat(n.end_count),s={plan_id:t.plan_id,plan_type_id:t.plan_type,plan_type:r.toLowerCase(),selected_plan:l,plan_name:t.plan_name,price:Number(o.toFixed(2))};return"event_cost"===t.plan_type?(("Monthly"===r?t.range_month:t.range_year).find(e=>e.start_count===n.start_count&&e.end_count===n.end_count&&e.vendor_name_label===a&&e.hazard_name_label===i)||console.error("No matching range found for:",{cycle:r,vendor:a,event_type:i,range:"".concat(n.start_count,"-").concat(n.end_count)}),{...s,selected_plan:"".concat(n.start_count,"-").concat(n.end_count),price:Number(n.range_price||0),vendor:a||"",event_type:i||""}):s})}},i=await t.post("".concat(Q.K3.paymentSession),a);(null===(e=i.data)||void 0===e?void 0:e.session_id)&&(r.push("/payment?session_id=".concat(null===(n=i.data)||void 0===n?void 0:n.session_id)),F("idle"))}catch(e){F("idle"),(0,ee.f)(e,"Failed to subscribe")}},eh=async e=>{try{var r;let n=await t.get("".concat(null===Q._w||void 0===Q._w?void 0:Q._w.get),{params:{search:e}});(null===(r=n.data)||void 0===r?void 0:r.result)&&L(n.data.result)}catch(e){(0,ee.f)(e,"Error while fetching users")}},em=d.useCallback(es()(e=>{e.trim().length>=2&&eh(e)},300),[]);d.useEffect(()=>()=>{em.cancel()},[em]);let eg=async()=>{Y(!0);try{var e;let r={recipient_email:null===(e=R[0])||void 0===e?void 0:e.email,credits:Number(H),expire_days:Number(D),message:""},n=await t.post(null===Q.Tx||void 0===Q.Tx?void 0:Q.Tx.post,r);(null==n?void 0:n.data)&&(el(),E([]),N(""),A(""),B(""),Y(!1),ed.Am.success(n.data.message))}catch(e){(0,ee.f)(e,"Error sending credits"),Y(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,n.jsx)(X,{}),(0,n.jsx)(a.Z,{sx:{mt:2},children:(0,n.jsx)(J,{})}),(0,n.jsx)(i.Z,{variant:"body1",sx:{textAlign:"center",fontSize:{xs:"0.8rem",md:"1rem"},color:e=>e.palette.text.secondary,mt:1,mb:2},children:e("package_subtitle")})]}),p?(0,n.jsx)(et.Z,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.ZP,{container:!0,spacing:3,children:(0,n.jsx)(o.ZP,{item:!0,xs:12,md:12,children:(0,n.jsxs)(a.Z,{sx:{borderRadius:"12px 12px 16px 16px",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)"},children:[(0,n.jsx)(G,{vendorData:v,hazardNameList:f,plans:h,onSelectionChange:Z,resetPlanIds:g,showCustomPackages:!0,onBundlePurchase:()=>U(!0)}),u?"":(0,n.jsx)(eo.Z,{users:I,availableCredits:s,handleSearchChange:e=>{let t=e.target.value;A(t),em(t)},search:M,selectedUsers:R,setSelectedUsers:E,locationCount:H,setLocationCount:N,days:D,setDays:B,sendCredits:eg,submitLoader:T})]})})})}),j.length>0&&(0,n.jsx)(k,{color:"primary","aria-label":"cart",onClick:()=>U(!0),sx:{position:"fixed",bottom:24,right:24,zIndex:1e3},children:(0,n.jsx)(C.Z,{badgeContent:j.length,color:"error",children:(0,n.jsx)(w.Z,{})})}),(0,n.jsx)(S.ZP,{anchor:"right",open:$,onClose:()=>U(!1),PaperProps:{sx:{width:{xs:"100%",sm:400},background:e=>e.palette.background.paper}},children:(0,n.jsxs)(a.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"2px s
1olid rgba(138, 58, 117, 0.4)"},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{variant:"h6",sx:{color:e=>e.palette.text.primary},children:"Subscription Summary"}),j.some(e=>e.isBundle)&&(0,n.jsx)(i.Z,{variant:"caption",sx:{color:e=>e.palette.primary.main,fontWeight:500},children:"Basic Package Bundle"})]}),(0,n.jsx)(z.Z,{onClick:()=>U(!1),sx:{color:e=>e.palette.text.primary},children:(0,n.jsx)(W.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{flex:1,overflowY:"auto",p:2},children:j.map((e,t)=>{let{plan:r,cycle:l,range:s,vendor:d,event_type:c,isBundle:u}=e;return(0,n.jsxs)(a.Z,{sx:{position:"relative",mt:t>0?2:0,p:2,mb:2,border:"2px solid rgba(138, 58, 117, 0.4)",borderRadius:"12px",background:"rgba(0, 0, 0, 0.2)"},children:[!u&&(0,n.jsx)(a.Z,{onClick:()=>{b([r.plan_id]),Z(e=>e.filter(e=>e.plan.plan_id!==r.plan_id))},sx:{position:"absolute",right:1,top:0,width:28,height:28,borderRadius:"50%",backgroundColor:"rgba(255, 0, 0, 0.12)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{backgroundColor:"rgba(255, 0, 0, 0.2)"}},children:(0,n.jsx)(i.Z,{sx:{color:"red",fontSize:"18px"},children:"\xd7"})}),(0,n.jsx)(i.Z,{variant:"subtitle1",sx:{fontWeight:600,color:e=>e.palette.text.primary,pr:4},children:null==r?void 0:r.plan_name}),(0,n.jsxs)(o.ZP,{container:!0,sx:{mt:1},children:[(null==r?void 0:r.plan_type)==="event_cost"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.ZP,{item:!0,xs:6,children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"Vendor"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:d||"N/A"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"Event Type"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:c||"N/A"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"Location Range"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:s.start_count===s.end_count?s.start_count:"".concat(s.start_count,"â").concat(s.end_count)})})]}),(null==r?void 0:r.plan_type)!=="event_cost"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.ZP,{item:!0,xs:6,children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"Count"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:s.start_count===s.end_count?s.start_count:"".concat(s.start_count,"â").concat(s.end_count)})})]}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"Billing"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:l})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsx)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.secondary},children:"License pricing"})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sx:{mt:1},children:(0,n.jsxs)(i.Z,{variant:"body2",sx:{color:e=>e.palette.text.primary,textAlign:"right"},children:[(0,n.jsxs)(a.Z,{component:"span",sx:{fontWeight:600},children:["$",s.price_per_user]})," ",(null==r?void 0:r.plan_type)==="user_cost"?"/ user":(null==r?void 0:r.plan_type)==="event_cost"?"/ event":(null==r?void 0:r.plan_type)==="location_improvement_cost"||(null==r?void 0:r.plan_type)==="location_hazard"?"/ location":(null==r?void 0:r.plan_type)==="hurricane_kineticast"||(null==r?void 0:r.plan_type)==="earthquake_usgs"?"/ location":""]})})]})]},r.plan_id)})}),(0,n.jsxs)(a.Z,{sx:{p:2,borderTop:"2px solid rgba(138, 58, 117, 0.4)",background:"rgba(112, 46, 117, 0.05)"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(i.Z,{variant:"subtitle1",sx:{fontWeight:600,color:e=>e.palette.text.primary},children:"Total Pricing"}),(0,n.jsxs)(i.Z,{variant:"subtitle1",sx:{fontWeight:600,color:e=>e.palette.text.primary},children:["$",j.reduce((e,t)=>
1{var r,n;return e+("string"==typeof(null===(r=t.range)||void 0===r?void 0:r.range_price)?parseFloat(t.range.range_price):Number((null===(n=t.range)||void 0===n?void 0:n.range_price)||0))},0).toFixed(2)]})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(en.Z,{variant:"outlined",text:"Cancel",btnState:"idle",onClick:()=>{U(!1)},sx:{width:"50%",fontWeight:500}}),(0,n.jsx)(en.Z,{variant:"contained",text:"Subscribe Now",btnState:P,onClick:ex,sx:{width:"50%",fontWeight:500}})]})]})]})}),!1,(0,n.jsx)(eu.Z,{open:V,onClose:()=>q(!1),page:"purchase",endpoint:"purchase"})]})},ex=r(32050),eh=r(88310),em=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(eh.Z,{showSidebar:!0,secured:!0,children:[(0,n.jsx)(ex.Z,{}),(0,n.jsx)(ep,{})]})})}},function(e){e.O(0,[589,4514,1935,2395,121,858,7566,135,9971,7918,6886,6021,8310,2050,310,2888,9774,179],function(){return e(e.s=26480)}),_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.