1import{r as m,j as e,L as K,h as ue,i as E}from"./react-vendor-AbT4BmHZ.js";import{M as L,aR as ne,n5 as T,hc as re,np as ie,h9 as U,h8 as C,nq as he,gM as pe,nr as fe,ha as X,ns as ge,a1 as je,hj as be}from"./index-Zz13HMKG.js";import{C as w,c as B,d as R,b as M,f as V,S as O}from"./checkbox-DqKGSW3s.js";import{k as N,u as S}from"./redux-vendor-D6tsYLgP.js";import{B as ye}from"./BackToBoardButton-CG6vqJu0.js";import{C as Ne}from"./Cart-bVhtrldL.js";import{B as y,c as ce,t as Y}from"./App-tN5SdoE9.js";import{a0 as ke,bD as oe,C as de,a2 as we,bE as ve,bp as D,f as Ce}from"./lucide-D97_elQA.js";import{u as Se,a as Pe,b as Ie,g as Le,c as Me,f as Z}from"./data-table-Bi2audlt.js";import{T as Ee,a as Ae,b as q,c as Te,d as Re,e as ee}from"./table-CmqZI_BE.js";import{S as xe}from"./switch-CSu9sZ7l.js";import{L as Be}from"./label-CvFzyiNL.js";import{A as De,b as Fe,a as _e}from"./alert-BQN2fR0z.js";import{I as Ue,a as Ke,b as We}from"./UBP-DuKbhypr.js";import{d as me}from"./index-obPoDw8p.js";import{D as $e,a as Ve,b as Ye,f as A}from"./LinkNav.component-DCvMKrhb.js";import"./analytics-D9fFn5Ey.js";import"./filestack-CLcfot1_.js";import"./tours-DNlFWm7f.js";import"./date-utils-TpC3Vao7.js";import"./select-D_QHZO8r.js";import"./ui-vendor-CEz_DxgW.js";import"./socket-CDWkPsom.js";import"./immer-CgiGShya.js";import"./accordion-CF-fnNhC.js";import"./payments-DATBEqIX.js";import"./carousel-DzQN9drj.js";import"./carousel-CfXhsGjX.js";import"./charts-BxwOLyBT.js";import"./editor-PO597bpM.js";import"./colorpicker-MRQ2Ga09.js";import"./share-B2rj7Cgs.js";import"./phone-input-CsdZPsc5.js";import"./index-CiDmXwfP.js";import"./FlatInput-Ct8mcwLD.js";import"./EyeOpen-CZkGInyj.js";import"./CaretDown-B85b6PDi.js";import"./inboxBus-CSdnFHjc.js";import"./FeatureGating-gbeWPvKN.js";import"./textarea-DC8bG-u4.js";import"./index-BD1Nqb0_.js";import"./login.index-Rg0cmUm9.js";import"./index-CfDcEeyL.js";import"./react-icons-aT43gldt.js";import"./PasswordStrengthChecker-B89x3qfc.js";import"./avatar-Bhcoz7W5.js";import"./Menu-CPadOmnB.js";import"./helmet-7sOH0HJN.js";const qe=()=>{const s=m.useContext(L);return m.useEffect(()=>{s.trackFailedLicenseUpgrade()},[]),e.jsxs(w,{className:"flex flex-col justify-center items-center",children:[e.jsxs(B,{className:"flex justify-center items-center",children:[e.jsx(ke,{className:"w-20 h-20 text-red-500"}),e.jsx(R,{children:"Subscription Failed."})]}),e.jsx(M,{children:e.jsx(K,{to:"../licenses",children:e.jsx(y,{variant:"default",children:"Try again."})})})]})},Oe=()=>{const s=m.useContext(L);return m.useEffect(()=>{s.trackCompletedLicenseUpgrade()},[]),e.jsxs(w,{className:"flex flex-col justify-center items-center",children:[e.jsxs(B,{className:"flex justify-center items-center",children:[e.jsx(oe,{className:"w-20 h-20 text-green-500"}),e.jsx(R,{children:"Subscription successful."})]}),e.jsx(M,{children:e.jsx(K,{to:"../licenses",children:e.jsx(y,{variant:"default",children:"Continue"})})})]})},se=[{accessorKey:"type",header:"Screen Type",cell:({row:s})=>e.jsx(y,{variant:null,children:e.jsx("div",{className:"capitalize",children:s.getValue("type")})})},{accessorKey:"plan",header:()=>e.jsx(y,{variant:"ghost",children:"License Type"}),cell:({row:s})=>e.jsx("div",{className:"capitalize",children:s.getValue("plan")})},{accessorKey:"used",header:()=>e.jsx(y,{variant:"ghost",children:"Used"}),cell:({row:s})=>e.jsx("div",{className:"lowercase",children:s.getValue("used")})},{accessorKey:"available",header:()=>e.jsx(y,{variant:"ghost",children:"Available"}),cell:({row:s})=>e.jsx("div",{className:"lowercase",children:s.getValue("available")})}];function He({subscriptions:s}){var g;const o=m.useContext(L),[l,d]=m.useState([]),[j,n]=m.useState([]),[i,t]=m.useState({}),[r,c]=m.useState({}),u=Se({data:s,columns:se,onSortingChange:d,onColumnFiltersChange:n,getCoreRowModel:Me(),getPaginationRowModel:Le(),getSortedRowModel:Ie(),getFilteredRowModel:Pe(),onColumnVisibilityChange:t,onRowSelectionChange:c,state:{sorting:l,columnFilters:j,columnVisibility:i,rowSelection:r}});return m.useEffect(()=>{o.trackViewedMyPremiumLicensesPage()},[]),e.jsxs("div",{className:"w-full space-y-4",children:[e.jsx("div",{children:e.jsx("h2",{className:"scroll-m-2
10 border-b pb-2 text-xl font-semibold tracking-tight first:mt-0",children:"Your Subscriptions"})}),e.jsx("div",{className:"rounded-md border",children:e.jsxs(Ee,{children:[e.jsx(Ae,{children:u.getHeaderGroups().map(h=>e.jsx(q,{children:h.headers.map(b=>e.jsx(Te,{children:b.isPlaceholder?null:Z(b.column.columnDef.header,b.getContext())},b.id))},h.id))}),e.jsx(Re,{children:(g=u.getRowModel().rows)!=null&&g.length?u.getRowModel().rows.map(h=>e.jsx(q,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(b=>e.jsx(ee,{children:Z(b.column.columnDef.cell,b.getContext())},b.id))},h.id)):e.jsx(q,{children:e.jsx(ee,{colSpan:se.length,className:"h-24 text-center",children:"No results."})})})]})})]})}const Ge=()=>{var i;const{fetchPricingPlansForBoardStatus:s}=N(t=>t.pricing),o=S(),l=N(t=>{var r;return(r=t.activeBoard)==null?void 0:r.boardId}),d=N(t=>t.manageScreens.screens),j=N(t=>{var r,c;return((c=(r=t.activeBoard)==null?void 0:r.boardDetails)==null?void 0:c.rawStripeSubscriptions)||{}}),n=(i=Object.values(j))==null?void 0:i.map(t=>{const r=d.filter(u=>{if((u.screenType.toLowerCase()===(t==null?void 0:t.internalLicenseTypeCode)||(t==null?void 0:t.internalLicenseTypeCode)==="dgs"&&u.screenType.toLowerCase()==="stc")&&Number(u.screenLicenseValue)>0)return u}),c=(t==null?void 0:t.tier)==="2"?"1":(t==null?void 0:t.tier)==="3"?"2":"";return{type:(t==null?void 0:t.internalLicenseTypeCode)==="int"?"Interactive Screen":(t==null?void 0:t.internalLicenseTypeCode)==="dgs"?"Digital Signage":"",plan:t==null?void 0:t.simpleName,used:r.filter(u=>u.screenLicenseValue===c).length,available:t==null?void 0:t.quantity}});return m.useEffect(()=>{(!d||d.length===0)&&o(ne({boardId:l}))},[l]),s===T.PENDING?e.jsx("span",{children:"Please.....wait"}):s===T.REJECTED?e.jsx("span",{children:"Failed to fetch existing subscriptions."}):e.jsx(He,{subscriptions:n})},Qe=s=>{const o=S(),{isYearlyPricing:l}=N(d=>d.pricing);return e.jsxs("div",{className:"flex flex-col justify-start items-start space-y-4",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-baseline lg:items-center w-full",children:[e.jsx("div",{className:"flex flex-1",children:e.jsx("h2",{className:"scroll-m-20 border-b pb-2 text-sm lg:text-xl font-semibold tracking-tight first:mt-0",children:s.title||"Pricing Plans"})}),e.jsx("div",{className:"flex items-center space-x-4",children:e.jsxs("div",{className:"flex flex-row justify-start items-center space-x-2 m-0",children:[e.jsx("p",{className:"text-red-600 font-semibold",children:"Save 15% on yearly"}),e.jsx(xe,{id:"airplane-mode",checked:l,onCheckedChange:d=>{o(re({})),o(ie({pricingInterval:d?"year":"month"}))}}),e.jsx(Be,{htmlFor:"airplane-mode",children:"Yearly"})]})})]}),s.children]})},te=({children:s})=>e.jsx(w,{className:"flex flex-col w-full justify-start items-start",children:e.jsx(M,{className:"text-center w-full",children:s})}),F=({title:s,children:o,showAddToCartButton:l,className:d})=>e.jsxs(w,{className:"flex flex-col w-full justify-start items-start border-none shadow-none p-0 lg:p-2",children:[e.jsxs(B,{className:"p-2 flex flex-row justify-between items-center w-full pt-8 lg:pt-0",children:[e.jsx(R,{className:"text-lg lg:text-xl",children:s}),l?e.jsx(y,{variant:"default",children:"Add to Cart"}):null]}),e.jsx(M,{className:"w-full p-2",children:e.jsx("div",{className:ce("flex flex-col sm:flex-row justify-start items-start space-y-2 sm:space-y-0 sm:space-x-4",d),children:o})})]}),ze=({item:s})=>e.jsxs("div",{className:"flex flex-row justify-start items-start space-x-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"my-auto min-w-fit min-h-fit text-primary",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{className:"flex flex-row justify-start items-center text-sm",children:s.name})]},s.name),_=({name:s,price:o,unit:l,interval:d,features:j,buttonLabel:n,canSelect:i,onSelectHandler:t,selected:r,selectedLabel:c,disabled:u,className:g,cannotSelectLabel:h,billingText:b})=>e.jsxs(w,{className:ce("w-full xs:w-1/4 sm:w-1/3 text-card-foreground",g),children:[e.jsxs(B,{className:"space-y-2",children:[e.jsx(R,{className:"text-xl",children:s}),e.jsxs(R,{className:"text-xl text-primary",children:["$",Number.parseInt(o)/100," ",l?`/${l}`:"","/",d,b!==""&&e.jsx("p",{className:"text-sm text-muted-foreground",children:b})]})]}),r?e.jsx(V,{className:"flex justify-start items-center",children:e.jsx(y,{disabled:r||u,className:"w-full",onClick:t,variant:"outline",children:c})}):i?e.jsx(V,{className:"flex justify-start items-center",children:e.jsx(y,{disabled:u,className:"w-full",onClick:t,variant:"default",children:n})}):h?e.jsx(V,{className:"flex justify-start items-center",children:e.jsx(y,{disabled:!0,className:"w-full",onClick:()=>{},variant:"outline",children:h})}):null,e.jsx(M,{className:"text-left space-y-4",children:j.map((P,v)=>e.jsx(ze,{item:P},v))})]}),Je=s=>{const o=[{heading:"Travel Kiosks Bundle",description:"Keep travelers informed and engaged right at your kiosk."},{heading:"Workplace Kiosks Bundle",description:"Simplify workplace communication through your kiosk at office
1s."},{heading:"Guest Experiences Bundle",description:"Elevate guest engagement with an interactive kiosk experience."}];return e.jsxs("section",{className:"bg-[#fafaf9] rounded-sm mx-6 my-5 px-20 py-10 flex justify-items-start gap-36",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold leading-8",children:["Transform Your Screen with ",e.jsx("br",{})," ",e.jsx("span",{className:"text-hb-brand-blue",children:"Kiosk Bundles"})]}),e.jsxs("p",{className:"text-neutral-400 text-lg mt-3",children:["Get everything your kiosk needs in one simple package. Easy, ",e.jsx("br",{})," affordable, and built to enhance your visitor's experience."]}),e.jsx(y,{className:"h-11 rounded-full bg-[#21c45d] font-semibold text-black px-12 py-4 mt-6 hover:bg-[#21c45d] hover:opacity-90",onClick:()=>s.setActiveLicenseTab("bundles"),children:"Explore Bundles"})]}),e.jsx("div",{className:"max-w-lg space-y-4",children:o==null?void 0:o.map((l,d)=>e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-semibold",children:l.heading}),e.jsx("p",{className:"text-neutral-400",children:l.description})]},d))})]})},Xe=({setActiveLicenseTab:s})=>{const o=[{icon:Ue,title:"Interactive Screen Subscription",price:"$35",features:["Unlimited Hoots and Lists visible","Unlimited Kiosk Engagement Units"],ctaState:"kiosk"},{icon:Ke,title:"Digital Signage Subscription",price:"$10",features:["Split Screen feature","Content Scheduler"],ctaState:"signage"},{icon:We,title:"HootBoard for Web & Mobile",price:"$0.3",features:["Can view public hoots and apps.","Can post, view private hoots and apps"],ctaState:"webAndMobile"}],l=S(),d=N(n=>{var i;return(i=n.activeBoard)==null?void 0:i.boardId}),j=N(n=>{var i;return(i=n.manageScreens)==null?void 0:i.screens});return m.useEffect(()=>{(!j||j.length===0)&&l(ne({boardId:d}))},[d]),e.jsxs(w,{className:"py-2",children:[e.jsxs("div",{className:"px-6 py-4 space-y-1 lg:space-y-0",children:[e.jsx("h2",{className:"text-lg lg:text-xl font-bold",children:"Subscriptions"}),e.jsx("p",{className:"text-sm lg:text-base",children:"This is an overview of our subscription plans. Explore our plans to find the best fit for your needs."})]}),e.jsx("section",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 justify-around lg:mx-2",children:o.map((n,i)=>{var t;return e.jsxs(w,{className:"m-4 p-4 flex flex-col space-y-5",children:[e.jsxs("div",{className:"flex space-x-4 items-center",children:[e.jsx("img",{src:n==null?void 0:n.icon,className:"w-16 h-16 lg:w-20 lg:h-20"}),e.jsx("h2",{className:"text-base lg:text-lg font-bold",children:n==null?void 0:n.title})]}),e.jsxs("div",{className:"flex px-2 space-x-3 items-center",children:[e.jsxs("span",{className:"text-xs lg:text-sm leading-4",children:["Starting ",e.jsx("br",{})," from just"]}),e.jsxs("p",{className:"text-lg font-bold text-neutral-700",children:[n==null?void 0:n.price,"/month"]})]}),e.jsx(O,{}),e.jsxs("div",{children:[(t=n.features)==null?void 0:t.map((r,c)=>e.jsxs("div",{className:"flex space-x-2 space-y-1 items-center",children:[e.jsx(de,{color:"#0067F9"}),e.jsx("p",{className:"text-xs lg:text-sm",children:r})]},c)),e.jsxs("div",{className:"flex space-x-2 items-center mt-1",children:[e.jsx(oe,{color:"#0067F9"}),e.jsx("p",{className:"text-xs lg:text-sm",children:"More"})]})]}),e.jsx(y,{onClick:()=>s(n==null?void 0:n.ctaState),children:"Learn More"})]},i)})}),e.jsx(Je,{setActiveLicenseTab:s})]})},Ze=s=>{var j,n,i,t,r,c,u;const o=m.useContext(L),l=S(),d=g=>{var b;const h={licenseName:g.name,licensePrice:`$ ${parseInt((b=g.price)==null?void 0:b.unit_amount)/100}`,billingInterval:s.isYearly?"Yearly":"monthly"};o.trackAddedLicenseToCart(h),l(U({item:g,quantity:1}))};return e.jsxs(w,{className:"max-w-md px-6 py-4",children:[e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xl font-semibold",children:(j=s.product)==null?void 0:j.name}),e.jsxs("p",{className:"text-3xl font-bold text-amber-500",children:["$",((i=(n=s.product)==null?void 0:n.price)==null?void 0:i.unit_amount)/100,"/month"]}),s.isYearly&&e.jsx(me,{className:"bg-muted text-neutral-700 pointer-events-none",children:"billed annually"})]}),e.jsx("p",{className:"text-neutral-500 text-sm pt-3",children:(r=(t=s.product)==null?void 0:t.rawItem)==null?void 0:r.description}),e.jsx(O,{className:"my-4"}),e.jsx(y,{disabled:s.addedToCart,className:"w-full mb-1",onClick:()=>d(s.product),children:s.addedToCart?"Added to Cart":"Add to Cart"}),e.jsx("div",{className:"py-3 space-y-1.5",children:(u=(c=s.product)==null?void 0:c.features)==null?void 0:u.map((g,h)=>e.jsxs("div",{className:"flex space-x-2 items-center",children:[e.jsx(de,{className:"w-5 text-hb-brand-blue pt-1"}),e.jsx("p",{className:"text-sm",children:g.name})]},h))})]})},es=()=>{const s=S(),o=N(r=>{var c;return(c=r.pricing)==null?void 0:c.pricingPlans}),l=N(r=>{var c;
1return(c=r.pricing)==null?void 0:c.isYearlyPricing}),d=N(r=>{var c;return(c=r.pricing)==null?void 0:c.cart}),j=r=>d.items.findIndex(c=>r.price.id===c.price.id)!==-1,n=r=>{s(re({})),s(ie({pricingInterval:r?"year":"month"}))},i=C({stripePricingPlans:o,productTypeLookupKey:"PR2024_Q2_HBE",isYearlyPricing:l}),t=i==null?void 0:i.sort((r,c)=>{var u,g;return((u=r.metadata)==null?void 0:u.sequencingOrder)-((g=c.metadata)==null?void 0:g.sequencingOrder)});return e.jsxs("div",{className:"bg-neutral-100 rounded-sm",children:[e.jsxs("div",{className:"px-8 pt-8 pb-4 space-y-4 border-b-2 border-neutral-50",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"HootBoard Essentials"}),e.jsx("p",{className:"text-neutral-600",children:"Get the most out of hootboard, all in one subscription. At a much lower price."})]}),e.jsxs("div",{className:"flex gap-3 items-center pt-2 justify-end",children:[e.jsx("p",{className:"font-semibold",children:"Monthly"}),e.jsx(xe,{checked:l,onCheckedChange:r=>n(r)}),e.jsx("p",{className:"font-semibold",children:"Yearly"}),e.jsx(me,{className:"bg-red-600 -ml-1.5 pointer-events-none",children:"Save 15%"})]})]}),e.jsx("div",{className:"px-6 py-8 grid grid-cols-3 justify-center gap-4",children:t==null?void 0:t.map(r=>{var c;return e.jsx(Ze,{product:r,isYearly:l,addedToCart:j(r)},(c=r.rawItem)==null?void 0:c.id)})})]})},ae=({activeLicenseTab:s,setActiveLicenseTab:o})=>{var H,G;const l=m.useContext(L),d=S(),{fetchPricingPlansForBoardStatus:j,pricingPlans:n,isYearlyPricing:i,members:t,cart:r}=N(a=>a.pricing),c=N(a=>{var x;return(x=a==null?void 0:a.activeBoard)==null?void 0:x.boardId}),u=N(a=>{var x,p,k;return(k=(p=(x=a.activeBoard)==null?void 0:x.boardDetails)==null?void 0:p.featureGateSettings)==null?void 0:k.totalAvailableEngagementUnits}),g=N(a=>{var x,p;return((p=(x=a==null?void 0:a.activeBoard)==null?void 0:x.boardDetails)==null?void 0:p.rawStripeSubscriptions)||{}}),h=N(a=>{var x;return(x=a.manageScreens)==null?void 0:x.screens}),[b,P]=m.useState(0);m.useEffect(()=>{if(h){const a=h==null?void 0:h.reduce((x,p)=>(!(p!=null&&p.screenLicenseActive)&&(p==null?void 0:p.screenType)==="INT"&&(x+=1),x),0);P(a)}},[h]),m.useEffect(()=>{var a;if(g&&b>0){const x=(a=Object.values(g))==null?void 0:a.filter(k=>(k==null?void 0:k.internalLicenseTypeCode)==="dir"||(k==null?void 0:k.internalLicenseTypeCode)==="cg"),p=x==null?void 0:x.map(k=>{var z;const Q=n==null?void 0:n.find($=>$.metadata.internalLicenseTypeCode===k.internalLicenseTypeCode);return Q?(z=Q.prices)==null?void 0:z.find($=>{var J;return((J=$.recurring)==null?void 0:J.interval)===(i?"year":"month")}):[]});d(he(p))}},[g,n,i,b]),m.useEffect(()=>{j!==T.FULFILLED&&d(pe({boardId:c}))},[c]),m.useEffect(()=>{s==="kiosk"&&l.trackViewedInteractiveKioskLicenses(),s==="signage"&&l.trackViewedDigitalSignageLicenses(),s==="webAndMobile"&&l.trackViewedWebAndMobileLicenses(),s==="bundles"&&l.trackViewedKioskBundleLicenses()},[s]);const v=a=>r.items.findIndex(x=>a.price.id===x.price.id)!==-1,I=Object.keys(g).includes("WMPU:2");if(!n.length&&j===T.PENDING)return e.jsx("small",{children:"Pending...."});if(!n.length&&j===T.REJECTED)return e.jsx("small",{children:"Rejected...."});if(!(n!=null&&n.length))return null;const W=a=>{var p;const x={licenseName:a.name,licensePrice:"$"+parseInt((p=a.price)==null?void 0:p.unit_amount)/100,billingInterval:i?"Yearly":"monthly"};l.trackAddedLicenseToCart(x)};return s==="bundles"?e.jsx(es,{}):s==="overview"?e.jsx(Xe,{setActiveLicenseTab:o}):e.jsxs(Qe,{title:"Subscriptions Plans",children:[s!=="webAndMobile"&&e.jsx(te,{title:"Screen License",children:e.jsxs("div",{className:"w-full",children:[s==="kiosk"&&e.jsx("section",{className:"w-full space-y-4",children:e.jsx(F,{title:"Interactive Kiosk License",showAddToCartButton:!1,children:(H=C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_INT",isYearlyPricing:i}).sort((a,x)=>{var p,k;return((p=a.metadata)==null?void 0:p.sequencingOrder)-((k=x.metadata)==null?void 0:k.sequencingOrder)}))==null?void 0:H.map((a,x)=>e.jsx(_,{name:a.name,color:"black",canSelect:x!==0,disabled:!1,onSelectHandler:()=>{W(a),d(U({item:a,quantity:1})),Y({variant:"default",title:"Item added to cart."})},stockLevel:20,price:a.price.unit_amount,buttonLabel:"Add to Cart",unit:"screen",interval:a.price.recurring.interval,features:a.features,selected:v(a
1),selectedLabel:"Added to cart",billingText:i?"billed annually":""},a.price.lookup_key))})}),s==="signage"&&e.jsx("section",{className:"w-ful space-y-4",children:e.jsx(F,{title:"Digital Signage",showAddToCartButton:!1,children:(G=C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_DGS",isYearlyPricing:i}).sort((a,x)=>{var p,k;return((p=a.metadata)==null?void 0:p.sequencingOrder)-((k=x.metadata)==null?void 0:k.sequencingOrder)}))==null?void 0:G.map((a,x)=>e.jsx(_,{name:a.name,color:"black",canSelect:x!==0,disabled:!1,onSelectHandler:()=>{W(a),d(U({item:a,quantity:1})),Y({variant:"default",title:"Item added to cart."})},stockLevel:20,price:a.price.unit_amount,buttonLabel:"Add to Cart",unit:"screen",interval:a.price.recurring.interval,features:a.features,selected:v(a),selectedLabel:"Added to cart",billingText:i?"billed annually":""},a.price.lookup_key))})})]})}),s==="webAndMobile"&&e.jsxs(te,{title:"Web & Mobile License",children:[I?null:e.jsx(F,{title:"Free Tier",showAddToCartButton:!1,children:e.jsxs(De,{className:"text-left space-x-3 flex flex-row justify-start items-center",children:[e.jsx(we,{className:"h-7 w-7",color:"#38b47c"}),e.jsxs("div",{children:[e.jsx(Fe,{className:"text-xl",children:"Running FREE!"}),e.jsxs(_e,{className:"text-sm",children:["You're currently running on our free plan of ",u," Engagement units/month. Once you hit the limit, one or more functionalities will be restricted."]})]})]})}),e.jsxs(F,{title:"Pay per user plan for Web & Mobile usage.",showAddToCartButton:!1,className:"shadown-sm border rounded",children:[C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_WMPU",isYearlyPricing:i}).map(a=>e.jsx(_,{className:"border-none shadow-none text-left",name:`${t[a.metadata.productLookupKey]} x ${a.name}`,stockLevel:1,color:"black",canSelect:!1,disabled:!1,onSelectHandler:()=>{},price:a.price.unit_amount,buttonLabel:"Add to Cart",unit:"user",interval:a.price.recurring.interval,features:a.features,selected:!1,selectedLabel:"Added to cart",billingText:i?"billed annually":""},a.price.lookup_key)),e.jsx(_,{cannotSelectLabel:"Currently Active",className:"border-none shadow-none text-left",name:`Total(${t.total})`,color:"black",canSelect:!I,disabled:!1,onSelectHandler:()=>{C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_WMPU",isYearlyPricing:i}).map(a=>{d(U({item:a,quantity:1})),W(a),Y({variant:"default",title:"Item added to cart."})})},price:fe(C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_WMPU",isYearlyPricing:i}),t,["PR2024_Q2_WMPU_MEM_DEFAULT","PR2024_Q2_WMPU_FOL_DEFAULT"]).toString(),buttonLabel:"Add to Cart",unit:"",interval:"month",features:[],selected:v(C({stripePricingPlans:n,productTypeLookupKey:"PR2024_Q2_WMPU",isYearlyPricing:i})[0]),selectedLabel:"Added to cart",billingText:i?"billed annually":""},"total")]})]})]})},le=[{name:"Buy Licenses",to:"licenses",isExternalLink:!1}],Xs=()=>{var P,v;const s=m.useContext(L),{boardDetails:o}=N(f=>f.activeBoard),{customerPortalUrl:l,fetchCustomerPortalUrlStatus:d}=N(f=>f.pricing),j=S(),i=d===X.FULFILLED&&l?[...le,{name:"Manage Billing",to:l,isExternalLink:!0}
1]:le,[t,r]=m.useState("overview"),{cart:c}=N(f=>f.pricing),u=(P=c==null?void 0:c.items)==null?void 0:P.length;m.useEffect(()=>{if(d!==X.FULFILLED){const{boardId:f,boardName:I}=o;j(ge({boardId:o.boardId,returnUrl:`${je(f,I)}/manage/upgrade`}))}},[]),m.useEffect(()=>{s.trackViewedLicensesPage()},[]);const g=f=>{f==="Manage Billing"&&s.trackClickedCustomerPortalLink(),f==="Buy Licenses"&&r("overview")},[h,b]=m.useState(!1);return m.useEffect(()=>{const f=()=>{b(window.innerWidth<=768)};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]),e.jsxs(e.Fragment,{children:[e.jsx(ye,{}),e.jsxs(w,{className:"container",style:{maxWidth:"100%"},children:[e.jsxs(B,{className:"flex flex-col lg:flex-row items-baseline lg:items-center justify-between",children:[e.jsxs("div",{className:"mb-2 lg:mb-0",children:[e.jsx("h2",{className:"text-xl lg:text-2xl font-bold tracking-tight",children:"Subscription Center"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage your subscriptions across the HootBoard Platform."})]}),u?e.jsxs(y,{className:"space-x-2 relative flex flex-row items-center bg-hb-brand-blue",onClick:()=>{j(be({}))},children:[e.jsx("span",{className:"text-base",children:"Your Cart"}),e.jsx(ve,{}),u?e.jsx("span",{className:"absolute top-2 right-2",children:c.items.length}):null]}):null]}),e.jsx(O,{className:"mb-3 lg:mb-0 lg:my-4"}),e.jsx(M,{children:e.jsxs("div",{className:"flex flex-col lg:flex-row justify-start items-start w-full space-x-8",children:[e.jsxs("aside",{className:"flex flex-col justify-start items-start space-y-2 min-w-[200px] mb-2 lg:mb-0",children:[i.map((f,I)=>e.jsx(K,{to:f.to,relative:"route",className:"w-full hover:no-underline",children:!h&&e.jsx(ss,{activeLicenseTab:t,isBuyLicenseSelected:f.name==="Buy Licenses",label:f.name,onClick:()=>{},isExternalLink:f==null?void 0:f.isExternalLink,setActiveLicenseTab:r,handleSidebarNavClick:g})},I)),h&&e.jsx(ts,{activeLicenseTab:t,setActiveLicenseTab:r,handleSidebarNavClick:g,manageBilling:((v=i[i.length-1])==null?void 0:v.name)==="Manage Billing"&&i[i.length-1]})]}),e.jsx("div",{className:"flex-1 my-4 lg:my-0",style:{marginLeft:h?"0px":"32px"},children:e.jsxs(ue,{children:[e.jsx(E,{index:!0,path:"/*",element:e.jsx(ae,{activeLicenseTab:t,setActiveLicenseTab:r})}),e.jsx(E,{path:"/licenses/*",element:e.jsx(ae,{activeLicenseTab:t,setActiveLicenseTab:r})}),e.jsx(E,{path:"/licenses/checkout/success",element:e.jsx(Oe,{})}),e.jsx(E,{path:"/licenses/checkout/canceled",element:e.jsx(qe,{})}),e.jsx(E,{path:"/subscriptions/*",element:e.jsx(Ge,{})})]})})]})})]}),e.jsx(Ne,{})]})},ss=({activeLicenseTab:s,label:o,setActiveLicenseTab:l,handleSidebarNavClick:d})=>e.jsxs("nav",{className:"flex flex-1 justify-start items-start space-x-2 flex-col lg:space-x-0 lg:space-y-1 rounded",children:[e.jsx(y,{variant:"ghost",className:`font-normal font-sans space-x-2 flex items-center w-full ${s==="overview"&&o==="Buy Licenses"?"bg-muted text-black":"text-black hover:bg-muted"}`,onClick:()=>d(o),children:e.jsx("span",{children:o})}),o!=="Manage Billing"&&e.jsxs("section",{className:"space-y-2 w-full pt-2 lg:pt-1 border-b border-slate-500 pb-3",style:{marginLeft:"0px"},children:[e.jsxs(y,{variant:"ghost",className:`flex space-x-2 items-center w-full text-left ${s==="kiosk"?"bg-muted text-black":"text-black hover:bg-muted"}`,onClick:()=>l("kiosk"),children:[e.jsx(D,{className:"text-neutral-500"})," ",e.jsx("span",{children:"Interactive Kiosk"})]}),e.jsxs(y,{variant:"ghost",className:`flex space-x-2 items-center w-full text-left ${s==="signage"?"bg-muted text-black":"text-black hover:bg-muted"}`,onClick:()=>l("signage"),children:[e.jsx(D,{className:"text-neutral-500"})," ",e.jsx("span",{children:"Digital Signage"})]}),e.jsxs(y,{variant:"ghost",className:`flex space-x-2 items-center w-full text-left ${s==="webAndMobile"?"bg-muted text-black":"text-black hover:bg-muted"}`,onClick:()=>l("webAndMobile"),children:[e.jsx(D,{className:"text-neutral-500"})," ",e.jsx("span",{children:"Web & Mobile"})]}),e.jsxs(y,{variant:"ghost",className:`flex space-x-2 items-center w-full text-left ${s==="bundles"?"bg-muted text-black":"text-black hover:bg-muted"}`,onClick:()=>l("bundles"),children:[e.jsx(D,{className:"text-neutral-500"})," ",e.jsx("span",{children:"Kiosk Bundles"})]})]})]}),ts=({activeLicenseTab:s,setActiveLicenseTab:o,manageBilling:l})=>e.jsxs("nav",{className:"px-1 flex space-x-2",children:[e.jsxs($e,{children:[e.jsxs(Ve,{className:"border border-neutral-200 px-4 py-2 rounded-md flex space-x-2 items-center",children:[e.jsx("span",{children:s==="overview"?"Buy Licenses":s==="kiosk"?"Interactive Kiosk":s==="signage"?"Digital Signage":s==="webAndMobile"?"Web & Mobile":"Kiosk Bundles"}),e.jsx(Ce,{className:"w-6 h-6 pt-1"})]}),e.jsxs(Ye,{children:[e.jsx(A,{checked:s==="overview",onClick:()=>o("overview"),children:"Buy Licenses"}),e.jsx(A,{checked:s==="kiosk",onClick:()=>o("kiosk"),children:"Interactive Kiosk"}),e.jsx(A,{checked:s==="signage",onClick:()=>o("signage"),children:"Digital Signage"}),e.jsx(A,{checked:s==="webAndMobile",onClick:()=>o("webAndMobile"),children:"Web & Mobile"}),e.jsx(A,{checked:s==="bundles",onClick:()=>o("bundles"),children:"Kiosk Bundles"})]})]}),(l==null?void 0:l.name)&&e.jsx(K,{className:"bg-muted px-4 py-2 rounded-md",to:l==null?void 0:l.to,children:l==null?void 0:l.name})]});
1export{Xs as Pricing};
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.